HGL::Common::IApplication Interface Reference
[Utility classes]

Interface to a typical HGL Suite application. More...

#include <iapplication.h>

Inheritance diagram for HGL::Common::IApplication:
Inheritance graph
[legend]

List of all members.

Public Types

enum  NOTIFYOPT {
  DEFAULT,
  UPDATE,
  CLOSE
}
 

Behaviour options to be passed to the notifyXXX functions.

More...

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.

Detailed Description

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.

Author:
Heiko Schäfer <heiko@hgl.rangun.de>

Member Enumeration Documentation

Behaviour options to be passed to the notifyXXX functions.

Since:
0.5.25
Enumerator:
DEFAULT 

a default notification, which expires automatically

UPDATE 

an UPDATE notification, which expires never expires until CLOSEd

CLOSE 

closes the last emitted notification


Member Function Documentation

virtual bool HGL::Common::IApplication::hasTerminated (  )  const [pure 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

Implemented in HGL::Common::Application.

virtual bool HGL::Common::IApplication::notificationsAvailable (  )  const [pure virtual]

Checks if notifications are available and enabled.

Returns:
true if notifications are available, false otherwise
Since:
0.5.25

Implemented 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.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

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.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

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.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

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.

Parameters:
msg the message to display
opt behaviour option
summary an optional summary
Since:
0.5.25

Implemented in HGL::Common::Application.

virtual void HGL::Common::IApplication::registerApplicationObserver ( const IApplicationObserver *const   iao  )  [pure virtual]

Registers an IApplicationObserver.

Parameters:
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.

Parameters:
iao an IApplicationObserver to unregister

Implemented in HGL::Common::Application.


Generated on 9 Apr 2014 for hgl 0.5.26~svn by  doxygen 1.6.1