eVaf
cli.h
Go to the documentation of this file.
1 
20 #ifndef __PSWGEN_CLI_CLI_H
21 # define __PSWGEN_CLI_CLI_H
22 
23 #include "version.h"
24 
25 #include <Plugins/iPlugin>
26 
27 #include <QObject>
28 #include <QString>
29 
30 class QEvent;
31 
32 namespace eVaf {
33 namespace PswGen {
34  struct iGenerator;
35  struct iStorage;
36 
42 namespace CLI {
43 
47 class Module : public Plugins::iPlugin
48 {
49  Q_OBJECT
50  Q_INTERFACES(eVaf::Plugins::iPlugin)
51  Q_PLUGIN_METADATA(IID VER_MODULE_NAME_STR)
52 
53 public:
54 
55  Module();
56 
57  virtual ~Module();
58 
59  virtual bool init(QString const & args);
60 
61  virtual void done();
62 
63  virtual bool isReady() const { return mReady; }
64 
65  virtual bool event(QEvent *);
66 
67 
68 private: // Members
69 
70  static int const DefaultPasswordLength;
71 
73  bool mReady;
74 
76  eVaf::PswGen::iGenerator * mGenerator;
77 
79  eVaf::PswGen::iStorage * mStorage;
80 
82  uint mEvReady;
83 
84 
85 private: // Methods
86 
87  QString readPassword();
88 
89  void generatePassword();
90 
91 };
92 
93 } // namespace eVaf::PswGen::CLI
94 } // namespace eVaf::PswGen
95 } // namespace eVaf
96 
97 #endif // cli.h
Command line interface for the PswGen application.
Definition: cli.h:47
Version information for eVaf modules.
#define VER_MODULE_NAME_STR
Module/library name (shall end with \0)
Definition: version.h:38
Global eVaf namespace.
Definition: engine.h:37
Password generator interface.
Definition: igenerator.h:34
Common interface for all the eVaf modules.
Definition: iplugin.h:38
Password storage interface.
Definition: istorage.h:117