1 /* Copyright (C) 2021 Free Software Foundation, Inc.
4 This file is part of GNU Binutils.
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 3, or (at your option)
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, 51 Franklin Street - Fifth Floor, Boston,
19 MA 02110-1301, USA. */
26 #include "DbeSession.h"
27 #include "DbeApplication.h"
28 #include "LoadObject.h"
29 #include "Experiment.h"
30 #include "PreviewExp.h"
32 #include "Hist_data.h"
34 #include "DataObject.h"
36 #include "CallStack.h"
42 DbeApplication *theDbeApplication;
44 DbeApplication::DbeApplication (int argc, char *argv[], char* _run_dir)
45 : Application (argc, argv, _run_dir)
47 theDbeApplication = this;
51 if (strcmp (argv[1], NTXT ("-IPC")) == 0
52 || strcmp (argv[1], NTXT ("-DIPC")) == 0)
57 // Instantiate a session
58 (void) new DbeSession (settings, ipcMode, rdtMode);
61 DbeApplication::~DbeApplication ()
64 theDbeApplication = NULL;
68 DbeApplication::initApplication (char *fdhome, char *licpath, ProgressFunc func)
70 // set the home directory
74 // Set progress function
75 set_progress_func (func);
78 char *license_err = NULL;
85 lic_err = dbe_strdup (DbeApplication::get_version ());
86 sts = dbe_strdup (GTXT ("OK"));
88 else if (lic_found == 2)
90 lic_err = dbe_strdup (license_err);
91 sts = dbe_strdup (GTXT ("WARN"));
93 else if (lic_found == 3)
95 lic_err = dbe_strdup (license_err);
96 sts = dbe_strdup (GTXT ("FATAL"));
100 lic_err = dbe_strdup (license_err);
101 sts = dbe_strdup (GTXT ("ERROR"));
106 lic_err = dbe_strdup (DbeApplication::get_version ());
107 sts = dbe_strdup (GTXT ("OK"));
109 Vector<char*> *data = new Vector<char*>(2);
110 data->store (0, sts);
111 data->store (1, lic_err);