void ConfCertDialog::applyDialog() { std::cerr << "ConfCertDialog::applyDialog() called" << std::endl ; RsPeerDetails detail; if (!rsPeers->getPeerDetails(mId, detail)) { if (!rsPeers->getGPGDetails(mId, detail)) { QMessageBox::information(this, tr("RetroShare"), tr("Error : cannot get peer details.")); close(); return; } } //check the GPG trustlvl if (ui.radioButton_trust_fully->isChecked() && detail.trustLvl != RS_TRUST_LVL_FULL) { //trust has changed to fully rsPeers->trustGPGCertificate(detail.id, RS_TRUST_LVL_FULL); } else if (ui.radioButton_trust_marginnaly->isChecked() && detail.trustLvl != RS_TRUST_LVL_MARGINAL) { rsPeers->trustGPGCertificate(detail.id, RS_TRUST_LVL_MARGINAL); } else if (ui.radioButton_trust_never->isChecked() && detail.trustLvl != RS_TRUST_LVL_NEVER) { rsPeers->trustGPGCertificate(detail.id, RS_TRUST_LVL_NEVER); } if (!detail.isOnlyGPGdetail) { /* check if the data is the same */ bool localChanged = false; bool extChanged = false; bool dnsChanged = false; /* set local address */ if ((detail.localAddr != ui.localAddress->text().toStdString()) || (detail.localPort != ui.localPort -> value())) localChanged = true; if ((detail.extAddr != ui.extAddress->text().toStdString()) || (detail.extPort != ui.extPort -> value())) extChanged = true; if ((detail.dyndns != ui.dynDNS->text().toStdString())) dnsChanged = true; /* now we can action the changes */ if (localChanged) rsPeers->setLocalAddress(mId, ui.localAddress->text().toStdString(), ui.localPort->value()); if (extChanged) rsPeers->setExtAddress(mId,ui.extAddress->text().toStdString(), ui.extPort->value()); if (dnsChanged) rsPeers->setDynDNS(mId, ui.dynDNS->text().toStdString()); if(localChanged || extChanged || dnsChanged) emit configChanged(); } setServiceFlags() ; loadAll(); close(); }
Service::Service(int argc, char **argv) : QtService<QCoreApplication>(argc, argv, "Securepoint VPN"), server (0) { setServiceDescription("OpenVPN wrapper to connect to an OpenVPN server without administrator permission"); setServiceFlags(QtServiceBase::CanBeSuspended); }
void ConfCertDialog::applyDialog() { std::cerr << "ConfCertDialog::applyDialog() called" << std::endl ; RsPeerDetails detail; if (!rsPeers->getPeerDetails(peerId, detail)) { if (!rsPeers->getGPGDetails(pgpId, detail)) { QMessageBox::information(this, tr("RetroShare"), tr("Error : cannot get peer details.")); close(); return; } } if(!detail.isHiddenNode) { /* check if the data is the same */ bool localChanged = false; bool extChanged = false; bool dnsChanged = false; /* set local address */ if ((detail.localAddr != ui.localAddress->text().toStdString()) || (detail.localPort != ui.localPort -> value())) localChanged = true; if ((detail.extAddr != ui.extAddress->text().toStdString()) || (detail.extPort != ui.extPort -> value())) extChanged = true; if ((detail.dyndns != ui.dynDNS->text().toStdString())) dnsChanged = true; /* now we can action the changes */ if (localChanged) rsPeers->setLocalAddress(peerId, ui.localAddress->text().toStdString(), ui.localPort->value()); if (extChanged) rsPeers->setExtAddress(peerId,ui.extAddress->text().toStdString(), ui.extPort->value()); if (dnsChanged) rsPeers->setDynDNS(peerId, ui.dynDNS->text().toStdString()); if(localChanged || extChanged || dnsChanged) emit configChanged(); } else { if((detail.hiddenNodeAddress != ui.localAddress->text().toStdString()) || (detail.hiddenNodePort != ui.localPort->value())) { rsPeers->setHiddenNode(peerId,ui.localAddress->text().toStdString(), ui.localPort->value()); emit configChanged(); } } setServiceFlags() ; loadAll(); close(); }
Service::Service(int argc, char **argv, const QString &serviceName, const QString &description) :QtService<QCoreApplication>(argc, argv, serviceName) { setServiceDescription(description); setServiceFlags(QtServiceBase::CanBeSuspended); }
HttpService::HttpService(int argc, char **argv) : QtService<QCoreApplication>(argc, argv, g_serviceName) { setServiceDescription("WaterMate, a local search engine"); setServiceFlags(QtServiceBase::CanBeSuspended); Configer::LoadConfiger(); Configer::getConfigerPort(m_listenPort); }
CHoruxService::CHoruxService(int argc, char **argv) : QtService<QCoreApplication>(argc, argv, "Horux Core service") { setServiceDescription("Horux Core service"); setServiceFlags(QtServiceBase::Default); QCoreApplication::setOrganizationName ( "Letux Sàrl" ); QCoreApplication::setOrganizationDomain ( "letux.ch" ); QCoreApplication::setApplicationName ( "HoruxCore" ); ptr_horux = NULL; }
Service(int argc, char **argv) : QtService<QCoreApplication>(argc, argv, "Elephant Service") { setServiceDescription("No description yet."); qApp->setApplicationName(serviceName()); qApp->setOrganizationName("GKHY"); qApp->setOrganizationDomain("www.gkhy.com.cn"); setServiceFlags(QtService::Default); setStartupType(QtServiceController::AutoStartup); }
MyService::MyService(int argc, char **argv) : QtService<QCoreApplication>(argc,argv,"MyService") { try { //Set the service information setServiceDescription("This is my service."); setServiceFlags(QtServiceBase::CanBeSuspended); } catch(...) { qCritical() << "An unknown error in the constructor"; } }
void ConfCertDialog::makeFriend() { std::string gpg_id = rsPeers->getGPGId(mId); if (ui.signGPGKeyCheckBox->isChecked()) { rsPeers->signGPGCertificate(gpg_id); } rsPeers->addFriend(mId, gpg_id); setServiceFlags() ; loadAll(); emit configChanged(); }
cursoService::cursoService(int argc, char * argv[]) : QtService<QCoreApplication>(argc, argv, m_servName) , m_tcpServer(0) { // description; setServiceDescription(m_servDescription); // flags (vai usar "pause"? ) setServiceFlags(QtServiceBase::Default); // não pode ser pausado, mas pode ser terminado // setServiceFlags(QtServiceBase::CanBeSuspended); // poderia ser pausado // modo de 'startup' ('AutoStartup' ou 'ManualStartup') setStartupType (QtServiceController::AutoStartup); }
DataService::DataService(int argc, char **argv):QtService<QCoreApplication>(argc,argv,"DataService") { try { setServiceDescription("DataService first release"); setServiceFlags(QtService::CanBeSuspended); } catch(...) { qCritical()<< "Unknown error!"; } }
MainService::MainService(int argc, char* argv[]) { setServiceDescription("The daemon for monitoring and handling the g15 macro service"); setServiceFlags(QtServiceBase::Default); //Stopped but not suspended thread_keys = new KeyThread(); connect(thread_keys, SIGNAL(writeDbg(const QString)), this, SLOT(writeDbg(const QString))); connect(this, SIGNAL(sendExit()), thread_keys, SLOT(setExit())); thread_x = new XThread(); connect(thread_x, SIGNAL(writeDbg(const QString)), this, SLOT(writeDbg(const QString))); connect(this, SIGNAL(sendExit()), thread_x, SLOT(setExit())); connect(thread_keys, SIGNAL(sendRecordingStatus(bool, int, int)), thread_x, SLOT(setRecordingStatus(bool, int, int))); connect(thread_keys, SIGNAL(playbackMacro(int, int)), thread_x, SLOT(playbackMacro(int, int))); }
InteractiveService::InteractiveService(int argc, char **argv) : QtService<QApplication>(argc, argv, "Qt Interactive Service"), gui(0) { setServiceDescription("A Qt service with user interface."); setServiceFlags(QtServiceBase::CanBeSuspended); }
MyService::MyService(int argc, char ** argv) : QtService<QCoreApplication>(argc, argv, APPNAME) { setServiceDescription(DESCRIPTION); setServiceFlags(QtServiceBase::CanBeSuspended); }