Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Friends | List of all members
QtServiceBase Class Referenceabstract

#include <qtservice.h>

Inheritance diagram for QtServiceBase:
QtService< Application >

Public Types

enum  MessageType { Success = 0, Error, Warning, Information }
 
enum  ServiceFlag { Default = 0x00, CanBeSuspended = 0x01, CannotBeStopped = 0x02, NeedsStopOnShutdown = 0x04 }
 

Public Member Functions

 QtServiceBase (int argc, char **argv, const QString &name)
 
virtual ~QtServiceBase ()
 
QString serviceName () const
 
QString serviceDescription () const
 
void setServiceDescription (const QString &description)
 
QtServiceController::StartupType startupType () const
 
void setStartupType (QtServiceController::StartupType startupType)
 
ServiceFlags serviceFlags () const
 
void setServiceFlags (ServiceFlags flags)
 
int exec ()
 
void logMessage (const QString &message, MessageType type=Success, int id=0, uint category=0, const QByteArray &data=QByteArray())
 

Static Public Member Functions

static QtServiceBaseinstance ()
 

Protected Member Functions

virtual void start ()=0
 
virtual void stop ()
 
virtual void pause ()
 
virtual void resume ()
 
virtual void processCommand (int code)
 
virtual void createApplication (int &argc, char **argv)=0
 
virtual int executeApplication ()=0
 

Friends

class QtServiceSysPrivate
 

Detailed Description

Definition at line 102 of file qtservice.h.

Member Enumeration Documentation

Enumerator
Success 
Error 
Warning 
Information 

Definition at line 107 of file qtservice.h.

Enumerator
Default 
CanBeSuspended 
CannotBeStopped 
NeedsStopOnShutdown 

Definition at line 112 of file qtservice.h.

Constructor & Destructor Documentation

QtServiceBase::QtServiceBase ( int  argc,
char **  argv,
const QString &  name 
)
virtual QtServiceBase::~QtServiceBase ( )
virtual

Member Function Documentation

virtual void QtServiceBase::createApplication ( int &  argc,
char **  argv 
)
protectedpure virtual

Implemented in QtService< Application >.

int QtServiceBase::exec ( )
virtual int QtServiceBase::executeApplication ( )
protectedpure virtual

Implemented in QtService< Application >.

static QtServiceBase* QtServiceBase::instance ( )
static
void QtServiceBase::logMessage ( const QString &  message,
MessageType  type = Success,
int  id = 0,
uint  category = 0,
const QByteArray &  data = QByteArray() 
)
virtual void QtServiceBase::pause ( )
protectedvirtual
virtual void QtServiceBase::processCommand ( int  code)
protectedvirtual
virtual void QtServiceBase::resume ( )
protectedvirtual
QString QtServiceBase::serviceDescription ( ) const
ServiceFlags QtServiceBase::serviceFlags ( ) const
QString QtServiceBase::serviceName ( ) const
void QtServiceBase::setServiceDescription ( const QString &  description)
void QtServiceBase::setServiceFlags ( ServiceFlags  flags)
void QtServiceBase::setStartupType ( QtServiceController::StartupType  startupType)
virtual void QtServiceBase::start ( )
protectedpure virtual
QtServiceController::StartupType QtServiceBase::startupType ( ) const
virtual void QtServiceBase::stop ( )
protectedvirtual

Friends And Related Function Documentation

friend class QtServiceSysPrivate
friend

Definition at line 157 of file qtservice.h.


The documentation for this class was generated from the following file:

© 2007-2017 Witold Gantzke and Kirill Lepskiy