Patronum
Loading...
Searching...
No Matches
Patronum Namespace Reference

The Patronum namespace - It is main name space of Patronum Library. The Patronum library support the two work mode. More...

Classes

class  Controller
 The Controller class provide control functionality for your service. More...
 
class  Feature
 The Feature class it is atomic type for describe service command. More...
 
class  IController
 The IController class This is base interface for the handling network events. More...
 
class  IService
 The IService class is base interface of the service. More...
 
class  Service
 The Service class it is class for create a services from daemons. More...
 
class  ServiceBase
 The ServiceBase class This is Base service class. Please for create your own services use the Patronum::Service class. More...
 

Enumerations

enum  PatronumError {
  Undefined , ServiceUnavailable , InvalidPackage , WrongCommand ,
  TimeOutError , SystemError , FailedToStart , UnsupportedPlatform
}
 The PatronumError enum - controller work error codes. More...
 

Functions

QString patronumLibVersion ()
 patronumLibVersion This method return current version of library.
 
void init ()
 
QString errorToString (PatronumError error)
 errorToString This method convert the PatronumError to QString.
 
QDataStream & operator<< (QDataStream &stream, const Feature &obj)
 
QDataStream & operator>> (QDataStream &stream, Feature &obj)
 
bool operator== (const Feature &left, const Feature &right)
 
uint qHash (const Feature &feature)
 

Detailed Description

The Patronum namespace - It is main name space of Patronum Library. The Patronum library support the two work mode.

  1. Single executable mode.
  2. Service-terminal mode.

Single executable mode

In this case you have a service with single executable file. All service operations (instalation deinstalation, send commnad and another) will sends from the one executable.

Fits one you need to start service executable as a daemon.

myservice daemon

For send any command to service use the service command.

myservice myCommand

Service-terminal mode.

In this mode you create two executable file.

  1. Service is Patronum::Service
  2. Terminal is Patronum::Controller

Fits one you need to start service executable as a daemon.

myservice daemon

For send any command to service use the terminal executable.

terminal myCommand

Enumeration Type Documentation

◆ PatronumError

The PatronumError enum - controller work error codes.

Enumerator
Undefined 

Unknown error.

ServiceUnavailable 

Service is unavailable. Try send start command or restart the service manually.

InvalidPackage 

Invalid package received.

WrongCommand 

Library unsupported command received.

TimeOutError 

Timeout error. service unavailable or not started.

SystemError 

Internal error of the work of the Patronum library. Contact the developers and provide them with an error report. https://github.com/QuasarApp/Patronum/issues.

FailedToStart 

This error ocured when user srvice failed to start.

UnsupportedPlatform 

This error ocured when service not supportded using platform.

Definition at line 27 of file Patronum_global.h.

Function Documentation

◆ errorToString()

QString Patronum::errorToString ( PatronumError  error)

errorToString This method convert the PatronumError to QString.

Parameters
errorThis is error id.
Returns
return text of error.

Definition at line 13 of file Patronum_global.cpp.

Here is the caller graph for this function:

◆ init()

void Patronum::init ( )

Definition at line 17 of file patronum.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator<<()

QDataStream & Patronum::operator<< ( QDataStream &  stream,
const Feature obj 
)

Definition at line 61 of file PFeature.cpp.

◆ operator==()

bool Patronum::operator== ( const Feature left,
const Feature right 
)

Definition at line 75 of file PFeature.cpp.

◆ operator>>()

QDataStream & Patronum::operator>> ( QDataStream &  stream,
Feature obj 
)

Definition at line 67 of file PFeature.cpp.

◆ patronumLibVersion()

QString Patronum::patronumLibVersion ( )

patronumLibVersion This method return current version of library.

Returns
current version of library

Definition at line 13 of file patronum.cpp.

◆ qHash()

uint PATRONUM_LIBRARYSHARED_EXPORT Patronum::qHash ( const Feature feature)

Definition at line 79 of file PFeature.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: