Base class of a typical HGL Suite application. More...
#include <application.h>

Public Member Functions | |
| Application (bool signals=true, bool initGPGMe=true) | |
| Application (const OBSERVERS &obs, bool signals=true, bool initGPGMe=true) | |
| Constructor. | |
| bool | hasTerminated () const |
| Indicates if the application got a termination signal and should prepare to shutdown. | |
| virtual bool | notificationsAvailable () const |
| Checks if notifications are available and enabled. | |
| virtual void | notifyError (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const |
| Emits an error desktop notification if possible. | |
| 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. | |
| virtual void | notifyInfo (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const |
| Emits an information desktop notification if possible. | |
| virtual void | notifyWarn (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const |
| Emits a warning desktop notification if possible. | |
| void | registerApplicationObserver (const IApplicationObserver *const) |
| Registers an IApplicationObserver. | |
| void | unregisterApplicationObserver (const IApplicationObserver *const) |
| Unregisters an IApplicationObserver. | |
Base class of a typical HGL Suite application.
| Application::Application | ( | const OBSERVERS & | obs, | |
| bool | signals = true, |
|||
| bool | initGPGMe = true | |||
| ) |
Constructor.
| 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.
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.
true if notifications are available, false otherwiseImplements 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.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
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.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
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.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
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.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
Implements HGL::Common::IApplication.
| void Application::registerApplicationObserver | ( | const IApplicationObserver * | iao | ) | [virtual] |
Registers an IApplicationObserver.
| iao | an IApplicationObserver to register |
Implements HGL::Common::IApplication.
| void Application::unregisterApplicationObserver | ( | const IApplicationObserver * | iao | ) | [virtual] |
Unregisters an IApplicationObserver.
| iao | an IApplicationObserver to unregister |
Implements HGL::Common::IApplication.
1.6.1