C++ (Qt)class Service : public QtService<QCoreApplication>{public: Service(int argc, char **argv) : QtService<QCoreApplication>(argc, argv, "Camera control service"); RealCU2000M realt; Sony sony; ... protected: void start(); void stop();};
C++ (Qt)class Logger : public QObject{ Q_OBJECT public: Logger(Service*, QObject *parent = 0);...private: Service *service;};
C++ (Qt)Logger::Logger(Service *serv, QObject *parent) : QObject(parent){ service = serv;}
C++ (Qt)service->logMessage("Service started", QtServiceBase::Information);