Torc  0.1
Public Slots | Signals | Public Member Functions | Protected Member Functions | Properties | Friends | List of all members
TorcTime Class Reference

A simple time service to confirm the time (and date) the system is currently operating with. More...

#include <torctime.h>

Inheritance diagram for TorcTime:
[legend]

Public Slots

void SubscriberDeleted (QObject *Subscriber)
 
void Tick (void)
 
QString GetCurrentTime (void)
 
QString GetCurrentTimeUTC (void)
 

Signals

void currentTimeChanged (QString &Time)
 

Public Member Functions

virtual ~TorcTime ()=default
 
- Public Member Functions inherited from TorcHTTPService
 TorcHTTPService (QObject *Parent, const QString &Signature, const QString &Name, const QMetaObject &MetaObject, const QString &Blacklist=QStringLiteral(""))
 
virtual ~TorcHTTPService ()
 
void ProcessHTTPRequest (const QString &PeerAddress, int PeerPort, const QString &LocalAddress, int LocalPort, TorcHTTPRequest &Request) override
 
QVariantMap ProcessRequest (const QString &Method, const QVariant &Parameters, QObject *Connection, bool Authenticated) override
 
QString GetMethod (int Index)
 
QVariant GetProperty (int Index)
 Get the value of a given property. More...
 
QVariantMap GetServiceDetails (void)
 Return a QVariantMap describing the services methods and properties. More...
 
virtual QString GetUIName (void)
 
virtual QString GetPresentationURL (void)
 
- Public Member Functions inherited from TorcHTTPHandler
 TorcHTTPHandler (const QString &Signature, const QString &Name)
 
virtual ~TorcHTTPHandler ()
 
QString Signature (void) const
 
bool GetRecursive (void) const
 
QString Name (void) const
 

Protected Member Functions

 TorcTime ()
 
- Protected Member Functions inherited from TorcHTTPService
void HandleSubscriberDeleted (QObject *Subscriber)
 

Properties

QString currentTime
 

Friends

class TorcTimeObject
 

Additional Inherited Members

- Static Protected Member Functions inherited from TorcHTTPHandler
static bool MethodIsAuthorised (TorcHTTPRequest &Request, int Allowed)
 Check the current request is authorised and set the authentication header if not. More...
 
static void HandleOptions (TorcHTTPRequest &Request, int Allowed)
 
static void HandleFile (TorcHTTPRequest &Request, const QString &Filename, int Cache)
 
- Protected Attributes inherited from TorcHTTPService
QReadWriteLock m_httpServiceLock
 
- Protected Attributes inherited from TorcHTTPHandler
QString m_signature
 
bool m_recursive
 
QString m_name
 

Detailed Description

A simple time service to confirm the time (and date) the system is currently operating with.

Useful to confirm to the remote user that the system is operating as expected and also acts as a heartbeat over the websocket connection to the remote interface.

Todo:
Allow customisation of the time format.

Definition at line 12 of file torctime.h.

Constructor & Destructor Documentation

virtual TorcTime::~TorcTime ( )
virtualdefault
TorcTime::TorcTime ( )
explicitprotected

Definition at line 37 of file torctime.cpp.

Member Function Documentation

void TorcTime::currentTimeChanged ( QString &  Time)
signal
QString TorcTime::GetCurrentTime ( void  )
slot

Definition at line 51 of file torctime.cpp.

QString TorcTime::GetCurrentTimeUTC ( void  )
slot

Definition at line 57 of file torctime.cpp.

void TorcTime::SubscriberDeleted ( QObject *  Subscriber)
slot

Definition at line 82 of file torctime.cpp.

void TorcTime::Tick ( void  )
slot

Definition at line 63 of file torctime.cpp.

Friends And Related Function Documentation

friend class TorcTimeObject
friend

Definition at line 14 of file torctime.h.

Property Documentation

QString TorcTime::currentTime
read

Definition at line 19 of file torctime.h.


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