The SWORD Project  1.9.0.svnversion
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
installmgr.cpp
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * installmgr.cpp - commandline InstallMgr utility
4  *
5  * $Id: installmgr.cpp 3788 2020-08-30 12:46:21Z scribe $
6  *
7  * Copyright 2003-2013 CrossWire Bible Society (http://www.crosswire.org)
8  * CrossWire Bible Society
9  * P. O. Box 2528
10  * Tempe, AZ 85280-2528
11  *
12  * This program is free software; you can redistribute it and/or modify it
13  * under the terms of the GNU General Public License as published by the
14  * Free Software Foundation version 2.
15  *
16  * This program is distributed in the hope that it will be useful, but
17  * WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19  * General Public License for more details.
20  *
21  */
22 
23 #ifdef _MSC_VER
24  #pragma warning( disable: 4251 )
25 #endif
26 
27 #include <swmgr.h>
28 #include <installmgr.h>
29 #include <remotetrans.h>
30 #include <filemgr.h>
31 #include <iostream>
32 #include <map>
33 #include <swmodule.h>
34 #include <swoptfilter.h>
35 #include <stdio.h>
36 #include <swlog.h>
37 #include <swversion.h>
38 
39 using namespace sword;
40 using std::cout;
41 using std::cerr;
42 using std::cin;
43 using std::map;
44 
45 
46 SWMgr *mgr = 0;
49 SWBuf baseDir;
50 SWBuf confPath;
51 
54 
55 
56 void usage(const char *progName = 0, const char *error = 0);
57 
58 
59 class MyInstallMgr : public InstallMgr {
60 
61 public:
62  MyInstallMgr(const char *privatePath = "./", StatusReporter *sr = 0) : InstallMgr(privatePath, sr) {}
63 
64 
65  /*************************************************************
66  * Provide the necessary user disclaimer. This is CrossWire
67  * policy to show this disclaimer before enabling Internet
68  * features. Please follow this policy.
69  */
70  virtual bool isUserDisclaimerConfirmed() const {
71  // override this and show user disclaimer in whatever
72  // display your UI prefers. Here, we just use the
73  // InstallMgr-provided default which sends the disclaimer
74  // to std::cout and asks for confirmation with fgets
75  //
76  // This is unnecessarily duplicated here for your
77  // convenience as an example.
78  // you can copy and adjust for your frontend
79 
80  if (!userDisclaimerConfirmed) {
81  std::cout << "\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n";
82  std::cout << " -=+* WARNING *+=- -=+* WARNING *+=-\n\n\n";
83  std::cout << "Although Install Manager provides a convenient way for installing\n";
84  std::cout << "and upgrading SWORD components, it also uses a systematic method\n";
85  std::cout << "for accessing sites which gives packet sniffers a target to lock\n";
86  std::cout << "into for singling out users. \n\n\n";
87  std::cout << "IF YOU LIVE IN A PERSECUTED COUNTRY AND DO NOT WISH TO RISK DETECTION,\n";
88  std::cout << "YOU SHOULD *NOT* USE INSTALL MANAGER'S REMOTE SOURCE FEATURES.\n\n\n";
89  std::cout << "Also, Remote Sources other than CrossWire may contain less than\n";
90  std::cout << "quality modules, modules with unorthodox content, or even modules\n";
91  std::cout << "which are not legitimately distributable. Many repositories\n";
92  std::cout << "contain wonderfully useful content. These repositories simply\n";
93  std::cout << "are not reviewed or maintained by CrossWire and CrossWire\n";
94  std::cout << "cannot be held responsible for their content. CAVEAT EMPTOR.\n\n\n";
95  std::cout << "If you understand this and are willing to enable remote source features\n";
96  std::cout << "then type yes at the prompt\n\n";
97  std::cout << "enable? [no] ";
98 
99  char prompt[10];
100  fgets(prompt, 9, stdin);
101  userDisclaimerConfirmed = (!strcmp(prompt, "yes\n"));
102  std::cout << "\n";
103  }
104  return userDisclaimerConfirmed;
105  }
106 
107 };
108 
109 
111  static bool allowed = false;
112 
113  if (isUnvPeerAllowed) {
114  allowed = true;
115  }
116  if (!allowed) {
117  cout << "\n\n";
118  cout << "While connecting to an encrypted install source, SWORD can allow\n";
119  cout << "unverified peers, e.g., self-signed certificates. While this is\n";
120  cout << "generally considered safe because SWORD only retrieves Bible content\n";
121  cout << "and does not send any data to the server, it could still possibly\n";
122  cout << "allow a malicious actor to sit between you and the server, as with\n";
123  cout << "unencrypted sources. Type no to turn this off.\n\n";
124  cout << "Would you like to allow unverified peers? [yes] ";
125 
126  char prompt[10];
127  fgets(prompt, 9, stdin);
128  allowed = (strcmp(prompt, "no\n"));
129  cout << "\n";
130  }
131  return allowed;
132 }
133 
135  int last;
136  virtual void update(unsigned long totalBytes, unsigned long completedBytes) {
137  int p = (totalBytes > 0) ? (int)(74.0 * ((double)completedBytes / (double)totalBytes)) : 0;
138  for (;last < p; ++last) {
139  if (!last) {
140  SWBuf output;
141  output.setFormatted("[ File Bytes: %ld", totalBytes);
142  while (output.size() < 75) output += " ";
143  output += "]";
144  cout << output.c_str() << "\n ";
145  }
146  cout << "-";
147  }
148  cout.flush();
149  }
150  virtual void preStatus(long totalBytes, long completedBytes, const char *message) {
151  SWBuf output;
152  output.setFormatted("[ Total Bytes: %ld; Completed Bytes: %ld", totalBytes, completedBytes);
153  while (output.size() < 75) output += " ";
154  output += "]";
155  cout << "\n" << output.c_str() << "\n ";
156  int p = (int)(74.0 * (double)completedBytes/totalBytes);
157  for (int i = 0; i < p; ++i) { cout << "="; }
158  cout << "\n\n" << message << "\n";
159  last = 0;
160  }
161 };
162 
163 
164 void init() {
165  if (!mgr) {
166  mgr = new SWMgr();
167 
168  if (!mgr->config)
169  usage(0, "ERROR: SWORD configuration not found. Please configure SWORD before using this program.");
170 
171  SWBuf baseDir = FileMgr::getSystemFileMgr()->getHomeDir();
172  if (baseDir.length() < 1) baseDir = ".";
173  baseDir += "/.sword/InstallMgr";
174  confPath = baseDir + "/InstallMgr.conf";
176  installMgr = new MyInstallMgr(baseDir, statusReporter);
177  if (isConfirmedByForce) {
179  }
180  }
181 }
182 
183 
184 // clean up and exit if status is 0 or negative error code
185 void finish(int status) {
186  delete statusReporter;
187  delete installMgr;
188  delete mgr;
189 
190  installMgr = 0;
191  mgr = 0;
192 
193  if (status < 1) {
194  cout << "\n";
195  exit(status);
196  }
197 }
198 
199 
200 void createBasicConfig(bool enableRemote, bool addCrossWire, bool unverifiedPeerAllowed) {
201 
203  remove(confPath.c_str());
204 
205  InstallSource is("FTP");
206  is.caption = "CrossWire";
207  is.source = "ftp.crosswire.org";
208  is.directory = "/pub/sword/raw";
209 
210  SWConfig config(confPath.c_str());
211  config["General"]["PassiveFTP"] = "true";
212  config["General"]["TimeoutMillis"] = "10000";
213  config["General"]["UnverifiedPeerAllowed"] = (unverifiedPeerAllowed) ? "true" : "false";
214  if (enableRemote) {
215  config["Sources"]["FTPSource"] = is.getConfEnt();
216  }
217  config.save();
218 }
219 
220 
221 void initConfig() {
222  init();
223 
224  bool enable = installMgr->isUserDisclaimerConfirmed();
225  bool allowed = isUnverifiedPeerAllowed();
226 
227  createBasicConfig(enable, true, allowed);
228 
229  cout << "\n\nInitialized basic config file at [" << confPath << "]\n";
230  cout << "with remote source features " << ((enable) ? "ENABLED" : "DISABLED") << "\n";
231  cout << "with unverified peers " << ((allowed) ? "ALLOWED" : "DISALLOWED") << "\n";
232 }
233 
234 
235 void syncConfig() {
236  init();
237 
238  if (!installMgr->isUserDisclaimerConfirmed()) { // assert disclaimer is accepted
239  cout << "\n\nDisclaimer not accepted. Aborting.";
240  return;
241  }
242 
243  // be sure we have at least some config file already out there
244  if (!FileMgr::existsFile(confPath.c_str())) {
245  createBasicConfig(true, false, false);
246  finish(1); // cleanup and don't exit
247  init(); // re-init with InstallMgr which uses our new config
248  }
249 
251  cout << "\nSync'd config file with master remote source list.\n";
252  else cout << "\nFailed to sync config file with master remote source list.\n";
253 }
254 
255 
256 void uninstallModule(const char *modName) {
257  init();
258  SWModule *module = mgr->getModule(modName);
259  if (!module) {
260  fprintf(stderr, "Couldn't find module [%s] to remove\n", modName);
261  finish(-2);
262  }
263  installMgr->removeModule(mgr, module->getName());
264  cout << "Removed module: [" << modName << "]\n";
265 }
266 
267 
269  init();
270  cout << "Remote Sources:\n\n";
271  for (InstallSourceMap::iterator it = installMgr->sources.begin(); it != installMgr->sources.end(); it++) {
272  cout << "[" << it->second->caption << "]\n";
273  cout << "\tType : " << it->second->type << "\n";
274  cout << "\tSource : " << it->second->source << "\n";
275  cout << "\tDirectory: " << it->second->directory << "\n";
276  }
277 }
278 
279 
280 void refreshRemoteSource(const char *sourceName) {
281  init();
282  InstallSourceMap::iterator source = installMgr->sources.find(sourceName);
283  if (source == installMgr->sources.end()) {
284  fprintf(stderr, "Couldn't find remote source [%s]\n", sourceName);
285  finish(-3);
286  }
287 
288  if (!installMgr->refreshRemoteSource(source->second))
289  cout << "\nRemote Source Refreshed\n";
290  else cerr << "\nError Refreshing Remote Source\n";
291 }
292 
293 
294 void listModules(SWMgr *otherMgr = 0, bool onlyNewAndUpdates = false, bool utilModules = false) {
295  init();
296  SWModule *module;
297  if (!otherMgr) otherMgr = mgr;
298  std::map<SWModule *, int> mods = InstallMgr::getModuleStatus(*mgr, *otherMgr, utilModules);
299  for (std::map<SWModule *, int>::iterator it = mods.begin(); it != mods.end(); it++) {
300  module = it->first;
301  SWBuf version = module->getConfigEntry("Version");
302  SWBuf status = " ";
303  if (it->second & InstallMgr::MODSTAT_NEW) status = "*";
304  if (it->second & InstallMgr::MODSTAT_OLDER) status = "-";
305  if (it->second & InstallMgr::MODSTAT_UPDATED) status = "+";
306 
307  if (!onlyNewAndUpdates || status == "*" || status == "+") {
308  cout << status << "[" << module->getName() << "] \t(" << version << ") \t- " << module->getDescription() << "\n";
309  }
310  }
311 }
312 
313 
314 void remoteListModules(const char *sourceName, bool onlyNewAndUpdated = false, bool utilModules = false) {
315  init();
316  cout << "Available Modules:\n(be sure to refresh remote source (-r) first for most current list)\n\n";
317  InstallSourceMap::iterator source = installMgr->sources.find(sourceName);
318  if (source == installMgr->sources.end()) {
319  fprintf(stderr, "Couldn't find remote source [%s]\n", sourceName);
320  finish(-3);
321  }
322  listModules(source->second->getMgr(), onlyNewAndUpdated, utilModules);
323 }
324 
325 
326 void remoteDescribeModule(const char *sourceName, const char *modName) {
327  init();
328  InstallSourceMap::iterator source = installMgr->sources.find(sourceName);
329  if (source == installMgr->sources.end()) {
330  fprintf(stderr, "Couldn't find remote source [%s]\n", sourceName);
331  finish(-3);
332  }
333  SWMgr *mgr = source->second->getMgr();
334  SWModule *m = mgr->getModule(modName);
335  if (!m) {
336  fprintf(stderr, "Couldn't find module [%s] in source [%s]\n", modName, sourceName);
337  finish(-3);
338  }
339  cout << "Module Description\n\n";
340  for (ConfigEntMap::const_iterator it = m->getConfig().begin(); it != m->getConfig().end(); ++it) {
341  cout << "[" << it->first << "]:" << it->second << "\n";
342  }
343  cout << "\nOption Features available for module: " << m->getName() << "\n\n";
344  for (OptionFilterList::const_iterator it = m->getOptionFilters().begin(); it != m->getOptionFilters().end(); ++it) {
345  cout << (*it)->getOptionName() << " (" << (*it)->getOptionTip() << ")\n";
346  StringList optionValues = (*it)->getOptionValues();
347  for (StringList::const_iterator it2 = optionValues.begin(); it2 != optionValues.end(); ++it2) {
348  cout << "\t" << *it2 << "\n";
349  }
350  }
351 }
352 
353 
354 void localDirListModules(const char *dir) {
355  cout << "Available Modules:\n\n";
356  SWMgr mgr(dir);
357  listModules(&mgr);
358 }
359 
360 
361 void remoteInstallModule(const char *sourceName, const char *modName) {
362  init();
363  InstallSourceMap::iterator source = installMgr->sources.find(sourceName);
364  if (source == installMgr->sources.end()) {
365  fprintf(stderr, "Couldn't find remote source [%s]\n", sourceName);
366  finish(-3);
367  }
368  InstallSource *is = source->second;
369  SWMgr *rmgr = is->getMgr();
370  SWModule *module = rmgr->getModule(modName);
371  if (!module) {
372  fprintf(stderr, "Remote source [%s] does not make available module [%s]\n", sourceName, modName);
373  finish(-4);
374  }
375 
376  int error = installMgr->installModule(mgr, 0, module->getName(), is);
377  if (error) {
378  cout << "\nError installing module: [" << module->getName() << "] (write permissions?)\n";
379  } else cout << "\nInstalled module: [" << module->getName() << "]\n";
380 }
381 
382 
383 void localDirInstallModule(const char *dir, const char *modName) {
384  init();
385  SWMgr lmgr(dir);
386  SWModule *module = lmgr.getModule(modName);
387  if (!module) {
388  fprintf(stderr, "Module [%s] not available at path [%s]\n", modName, dir);
389  finish(-4);
390  }
391  int error = installMgr->installModule(mgr, dir, module->getName());
392  if (error) {
393  cout << "\nError installing module: [" << module->getName() << "] (write permissions?)\n";
394  } else cout << "\nInstalled module: [" << module->getName() << "]\n";
395 }
396 
397 
398 void usage(const char *progName, const char *error) {
399 
400  if (error) fprintf(stderr, "\n%s: %s\n", (progName ? progName : "installmgr"), error);
401 
402  fprintf(stderr, "\nusage: %s [--allow...] <command> [command ...]\n"
403  "\t(SWORD: %s)\n"
404  "\n\t--allow-internet-access-and-risk-tracing-and-jail-or-martyrdom \n"
405  "\n\t This aptly named option will allow the program to connect to the internet without asking for user confirmation\n"
406  "\t In many places this may well be a risky or even foolish undertaking.\n"
407  "\t Please take special care before you use this option in scripts, particularly in scripts you want to offer for public download.\n"
408  "\t What may appear to be safe for you, may well not be safe for someone else, who uses your scripts. \n"
409  "\n\t--allow-unverified-tls-peer \n"
410  "\n\t This option will allow the program to connect to unverified peers\n"
411  "\t (e.g., hosts using self-signed certificates) without asking for user confirmation.\n"
412  "\n\t Commands (run in order they are passed):\n\n"
413  "\t -init\t\t\t\tcreate a basic user config file.\n"
414  "\t\t\t\t\t\tWARNING: overwrites existing.\n"
415  "\t -sc\t\t\t\tsync config with known remote repo list\n"
416  "\t\t\t\t\t\tNOTE: also creates if none exists\n"
417  "\t -s\t\t\t\tlist remote sources\n"
418  "\t -r <remoteSrcName>\t\trefresh remote source\n"
419  "\t -rl <remoteSrcName>\t\tlist available user modules from remote source\n"
420  "\t -rlu <remoteSrcName>\t\tlist available utility modules from remote source\n"
421  "\t -rd <remoteSrcName>\t\tlist new/updated user modules from remote source\n"
422  "\t -rdu <remoteSrcName>\t\tlist new/updated utility modules from remote source\n"
423  "\t -rdesc <remoteSrcName> <modName>\tdescribe module from remote source\n"
424  "\t -ri <remoteSrcName> <modName>\tinstall module from remote source\n"
425  "\t -l\t\t\t\tlist installed user modules\n"
426  "\t -lu\t\t\t\tlist installed utility modules\n"
427  "\t -u <modName>\t\t\tuninstall module\n"
428  "\t -ll <path>\t\t\tlist available modules at local path\n"
429  "\t -li <path> <modName>\t\tinstall module from local path\n"
430  "\t -d\t\t\t\tturn debug output on\n"
431  , (progName ? progName : "installmgr"), SWVersion::currentVersion.getText());
432  finish(-1);
433 }
434 
435 
436 int main(int argc, char **argv) {
437 
438  isConfirmedByForce = false;
439  isUnvPeerAllowed = false;
440 
441  if (argc < 2) usage(*argv);
442 
443  for (int i = 1; i < argc; i++) {
444  if (!strcmp(argv[i], "-d")) {
446  }
447  else if (!strcmp(argv[i], "--allow-internet-access-and-risk-tracing-and-jail-or-martyrdom")) {
448  isConfirmedByForce = true;
449  }
450  else if (!strcmp(argv[i], "--allow-unverified-tls-peer")) {
451  isUnvPeerAllowed = true;
452  }
453  else if (!strcmp(argv[i], "-init")) {
454  initConfig();
455  }
456  else if (!strcmp(argv[i], "-l")) { // list installed user modules
457  cout << "Installed User Modules:\n\n";
458  listModules();
459  }
460  else if (!strcmp(argv[i], "-lu")) { // list installed utility modules
461  cout << "Installed Utility Modules:\n\n";
462  listModules(0, false, true);
463  }
464  else if (!strcmp(argv[i], "-ll")) { // list from local directory
465  if (i+1 < argc) localDirListModules(argv[++i]);
466  else usage(*argv, "-ll requires <path>");
467  }
468  else if (!strcmp(argv[i], "-li")) { // install from local directory
469  if (i+2 < argc) {
470  const char *path = argv[++i];
471  const char *modName = argv[++i];
472  localDirInstallModule(path, modName);
473  }
474  else usage(*argv, "-li requires <path> <modName>");
475  }
476  else if (!strcmp(argv[i], "-u")) { // uninstall module
477  if (i+1 < argc) uninstallModule(argv[++i]);
478  else usage(*argv, "-u requires <modName>");
479  }
480  else if (!strcmp(argv[i], "-s")) { // list sources
482  }
483  else if (!strcmp(argv[i], "-sc")) { // sync config with master
484  syncConfig();
485  }
486  else if (!strcmp(argv[i], "-r")) { // refresh remote source
487  if (i+1 < argc) refreshRemoteSource(argv[++i]);
488  else usage(*argv, "-r requires <remoteSrcName>");
489  }
490  else if (!strcmp(argv[i], "-rl")) { // list remote user modules
491  if (i+1 < argc) remoteListModules(argv[++i]);
492  else usage(*argv, "-rl requires <remoteSrcName>");
493  }
494  else if (!strcmp(argv[i], "-rlu")) { // list remote utility modules
495  if (i+1 < argc) remoteListModules(argv[++i], false, true);
496  else usage(*argv, "-rlu requires <remoteSrcName>");
497  }
498  else if (!strcmp(argv[i], "-rd")) { // list differences between remote source and installed user modules
499  if (i+1 < argc) remoteListModules(argv[++i], true);
500  else usage(*argv, "-rd requires <remoteSrcName>");
501  }
502  else if (!strcmp(argv[i], "-rdu")) { // list differences between remote source and installed utility modules
503  if (i+1 < argc) remoteListModules(argv[++i], true, true);
504  else usage(*argv, "-rdu requires <remoteSrcName>");
505  }
506  else if (!strcmp(argv[i], "-rdesc")) { // describe remove module
507  if (i+2 < argc) {
508  const char *source = argv[++i];
509  const char *modName = argv[++i];
510  remoteDescribeModule(source, modName);
511  }
512  else usage(*argv, "-rdesc requires <remoteSrcName> <modName>");
513  }
514  else if (!strcmp(argv[i], "-ri")) { // install from remote directory
515  if (i+2 < argc) {
516  const char *source = argv[++i];
517  const char *modName = argv[++i];
518  remoteInstallModule(source, modName);
519  }
520  else usage(*argv, "-ri requires <remoteSrcName> <modName>");
521  }
522  else usage(*argv, (((SWBuf)"Unknown argument: ")+ argv[i]).c_str());
523  }
524 
525  finish(0);
526 
527  return 0;
528 }
static signed char existsFile(const char *ipath, const char *ifileName=0)
Definition: filemgr.cpp:337
virtual int refreshRemoteSourceConfiguration()
Definition: installmgr.cpp:645
bool isConfirmedByForce
Definition: installmgr.cpp:52
void finish(int status)
Definition: installmgr.cpp:185
SWMgr * getMgr()
Definition: installmgr.cpp:749
SWBuf baseDir
Definition: installmgr.cpp:49
static const unsigned int MODSTAT_OLDER
Definition: installmgr.h:99
void remoteListModules(const char *sourceName, bool onlyNewAndUpdated=false, bool utilModules=false)
Definition: installmgr.cpp:314
static SWLog * getSystemLog()
Definition: swlog.cpp:53
SWBuf confPath
Definition: installmgr.cpp:50
InstallMgr * installMgr
Definition: installmgr.cpp:47
SWText * module
Definition: osis2mod.cpp:105
MyInstallMgr(const char *privatePath="./", StatusReporter *sr=0)
Definition: installmgr.cpp:62
StatusReporter * statusReporter
Definition: installmgr.cpp:48
int main(int argc, char **argv)
Definition: addcomment.cpp:32
bool isUnverifiedPeerAllowed()
Definition: installmgr.cpp:110
static const unsigned int MODSTAT_NEW
Definition: installmgr.h:102
void localDirListModules(const char *dir)
Definition: installmgr.cpp:354
void initConfig()
Definition: installmgr.cpp:221
virtual void preStatus(long totalBytes, long completedBytes, const char *message)
Definition: installmgr.cpp:150
static std::map< SWModule *, int > getModuleStatus(const SWMgr &base, const SWMgr &other, bool utilModules=false)
Definition: installmgr.cpp:592
void init()
Definition: installmgr.cpp:164
void syncConfig()
Definition: installmgr.cpp:235
std::list< SWBuf > StringList
Definition: swmodule.cpp:91
void refreshRemoteSource(const char *sourceName)
Definition: installmgr.cpp:280
void uninstallModule(const char *modName)
Definition: installmgr.cpp:256
void localDirInstallModule(const char *dir, const char *modName)
Definition: installmgr.cpp:383
virtual bool isUserDisclaimerConfirmed() const
Definition: installmgr.cpp:70
void listModules(SWMgr *otherMgr=0, bool onlyNewAndUpdates=false, bool utilModules=false)
Definition: installmgr.cpp:294
InstallSourceMap sources
Definition: installmgr.h:111
static int createParent(const char *pName)
Definition: filemgr.cpp:426
virtual void update(unsigned long totalBytes, unsigned long completedBytes)
Definition: installmgr.cpp:136
bool isUnvPeerAllowed
Definition: installmgr.cpp:53
void setUserDisclaimerConfirmed(bool val)
Definition: installmgr.h:214
virtual int installModule(SWMgr *destMgr, const char *fromLocation, const char *modName, InstallSource *is=0)
Definition: installmgr.cpp:394
void usage(const char *app)
Definition: imp2gbs.cpp:65
void listRemoteSources()
Definition: installmgr.cpp:268
static SWVersion currentVersion
Definition: swversion.h:69
void setLogLevel(char level)
Definition: swlog.h:54
virtual int refreshRemoteSource(InstallSource *is)
Definition: installmgr.cpp:550
void createBasicConfig(bool enableRemote, bool addCrossWire, bool unverifiedPeerAllowed)
Definition: installmgr.cpp:200
static const unsigned int MODSTAT_UPDATED
Definition: installmgr.h:101
void remoteInstallModule(const char *sourceName, const char *modName)
Definition: installmgr.cpp:361
virtual int removeModule(SWMgr *manager, const char *modName)
Definition: installmgr.cpp:241
virtual bool isUserDisclaimerConfirmed() const
Definition: installmgr.cpp:777
void remoteDescribeModule(const char *sourceName, const char *modName)
Definition: installmgr.cpp:326
SWMgr * mgr
Definition: installmgr.cpp:46
virtual void save() const
Definition: swconfig.cpp:115
static const char LOG_DEBUG
Definition: swlog.h:46
static FileMgr * getSystemFileMgr()
Definition: filemgr.cpp:101