Interface to a typical HGL Suite application. More...
#include <iapplication.h>

Public Types | |
| enum | NOTIFYOPT { DEFAULT, UPDATE, CLOSE } |
Behaviour options to be passed to the | |
Public Member Functions | |
| virtual bool | hasTerminated () const =0 |
| Indicates if the application got a termination signal and should prepare to shutdown. | |
| virtual bool | notificationsAvailable () const =0 |
| Checks if notifications are available and enabled. | |
| virtual void | notifyError (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const =0 |
| Emits an error desktop notification if possible. | |
| virtual void | notifyFatal (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const =0 |
| 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 =0 |
| Emits an information desktop notification if possible. | |
| virtual void | notifyWarn (const std::string &msg, NOTIFYOPT opt=DEFAULT, const std::string &summary=std::string()) const =0 |
| Emits a warning desktop notification if possible. | |
| virtual void | registerApplicationObserver (const IApplicationObserver *const iao)=0 |
| Registers an IApplicationObserver. | |
| virtual void | unregisterApplicationObserver (const IApplicationObserver *const iao)=0 |
| Unregisters an IApplicationObserver. | |
Interface to a typical HGL Suite application.
A typical HGL Suite application should implement this interface, resp. derive from HGL::Common::Application.
Since version 0.5.25 it is tried to register with a desktop notification daemon. If there is such one and the config value enable-notifications is true a desktop notification can be emitted by calling notifyInfo, notifyWarn or notifyError else if the config value enable-notifications is true a console log to the respective logger is emitted.
| virtual bool HGL::Common::IApplication::hasTerminated | ( | ) | const [pure 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 Implemented in HGL::Common::Application.
| virtual bool HGL::Common::IApplication::notificationsAvailable | ( | ) | const [pure virtual] |
Checks if notifications are available and enabled.
true if notifications are available, false otherwiseImplemented in HGL::Common::Application.
| virtual void HGL::Common::IApplication::notifyError | ( | const std::string & | msg, | |
| NOTIFYOPT | opt = DEFAULT, |
|||
| const std::string & | summary = std::string() | |||
| ) | const [pure virtual] |
Emits an error desktop notification if possible.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
Implemented in HGL::Common::Application.
| virtual void HGL::Common::IApplication::notifyFatal | ( | const std::string & | msg, | |
| NOTIFYOPT | opt = DEFAULT, |
|||
| const std::string & | summary = std::string() | |||
| ) | const [pure virtual] |
Emits an fatal error desktop notification if possible.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
Implemented in HGL::Common::Application.
| virtual void HGL::Common::IApplication::notifyInfo | ( | const std::string & | msg, | |
| NOTIFYOPT | opt = DEFAULT, |
|||
| const std::string & | summary = std::string() | |||
| ) | const [pure virtual] |
Emits an information desktop notification if possible.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
Implemented in HGL::Common::Application.
| virtual void HGL::Common::IApplication::notifyWarn | ( | const std::string & | msg, | |
| NOTIFYOPT | opt = DEFAULT, |
|||
| const std::string & | summary = std::string() | |||
| ) | const [pure virtual] |
Emits a warning desktop notification if possible.
| msg | the message to display | |
| opt | behaviour option | |
| summary | an optional summary |
Implemented in HGL::Common::Application.
| virtual void HGL::Common::IApplication::registerApplicationObserver | ( | const IApplicationObserver *const | iao | ) | [pure virtual] |
Registers an IApplicationObserver.
| iao | an IApplicationObserver to register |
Implemented in HGL::Common::Application.
| virtual void HGL::Common::IApplication::unregisterApplicationObserver | ( | const IApplicationObserver *const | iao | ) | [pure virtual] |
Unregisters an IApplicationObserver.
| iao | an IApplicationObserver to unregister |
Implemented in HGL::Common::Application.
1.6.1