Base class of a typical HGL Suite application.
More...
#include "application.h"
|
| | Application (const OBSERVERS &obs, bool signals=true, bool initGPGMe=true) |
| | Constructor. More...
|
| |
| | Application (bool signals=true, bool initGPGMe=true) |
| |
| bool | hasTerminated () const |
| | Indicates if the application got a termination signal and should prepare to shutdown. More...
|
| |
| virtual bool | notificationsAvailable () const |
| | Checks if notifications are available and enabled. More...
|
| |
| virtual void | notifyError (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const |
| | Emits an error desktop notification if possible. More...
|
| |
| virtual void | notifyFatal (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const |
| | Emits an fatal error desktop notification if possible. More...
|
| |
| virtual void | notifyInfo (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const |
| | Emits an information desktop notification if possible. More...
|
| |
| virtual void | notifyWarn (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const |
| | Emits a warning desktop notification if possible. More...
|
| |
| void | registerApplicationObserver (const IApplicationObserver *const) |
| | Registers an IApplicationObserver. More...
|
| |
| void | unregisterApplicationObserver (const IApplicationObserver *const) |
| | Unregisters an IApplicationObserver. More...
|
| |
Base class of a typical HGL Suite application.
- Author
- Heiko Schäfer heiko.nosp@m.@hgl.nosp@m..rang.nosp@m.un.d.nosp@m.e
| Application::Application |
( |
const OBSERVERS & |
obs, |
|
|
bool |
signals = true, |
|
|
bool |
initGPGMe = true |
|
) |
| |
Constructor.
- Note
- the GPGMe subsystem is only needed if signing key actions are neccessary
- Parameters
-
| obs | an initial vector of IApplicationObserver to register |
| signals | if true than signal handling will be enabled |
| initGPGMe | if true than the GPGMe subsystem gets initialized |
| Application::Application |
( |
bool |
signals = true, |
|
|
bool |
initGPGMe = true |
|
) |
| |
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
| bool HGL::Common::Application::hasTerminated |
( |
| ) |
const |
|
virtual |
Indicates if the application got a termination signal and should prepare to shutdown.
- Returns
true if the application shut prepare to shut down, false otherwise
Implements HGL::Common::IApplication.
| bool Application::notificationsAvailable |
( |
| ) |
const |
|
virtual |
Checks if notifications are available and enabled.
- Returns
true if notifications are available, false otherwise
- Since
- 0.5.25
Implements HGL::Common::IApplication.
| void Application::notifyError |
( |
const std::string & |
msg, |
|
|
NOTIFYOPT |
opt = DEFAULT, |
|
|
const std::string & |
summary = std::string() |
|
) |
| const |
|
virtual |
Emits an error desktop notification if possible.
- Parameters
-
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
- Since
- 0.5.25
Implements HGL::Common::IApplication.
| void Application::notifyFatal |
( |
const std::string & |
msg, |
|
|
NOTIFYOPT |
opt = DEFAULT, |
|
|
const std::string & |
summary = std::string() |
|
) |
| const |
|
virtual |
Emits an fatal error desktop notification if possible.
- Parameters
-
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
- Since
- 0.5.25
Implements HGL::Common::IApplication.
| void Application::notifyInfo |
( |
const std::string & |
msg, |
|
|
NOTIFYOPT |
opt = DEFAULT, |
|
|
const std::string & |
summary = std::string() |
|
) |
| const |
|
virtual |
Emits an information desktop notification if possible.
- Parameters
-
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
- Since
- 0.5.25
Implements HGL::Common::IApplication.
| void Application::notifyWarn |
( |
const std::string & |
msg, |
|
|
NOTIFYOPT |
opt = DEFAULT, |
|
|
const std::string & |
summary = std::string() |
|
) |
| const |
|
virtual |
Emits a warning desktop notification if possible.
- Parameters
-
| msg | the message to display |
| opt | behaviour option |
| summary | an optional summary |
- Since
- 0.5.25
Implements HGL::Common::IApplication.