Esempio n. 1
0
QTM_USE_NAMESPACE

/*
 * This is a test service which provides an interface for testing
 * the OOP service mechanism provided by Qt Mobility Service Framework.
 * This main function of sfwtest service publishes
 * its entires/services.
 */
int main(int argc, char *argv[])
{
    QCoreApplication a(argc, argv);
	
    QRemoteServiceRegister *serviceRegisterSfwTest = new QRemoteServiceRegister();
    QRemoteServiceRegister::Entry serviceUriHandler = serviceRegisterSfwTest->createEntry<
        SfwTestService> ("SfwTestService", "com.nokia.qt.SfwTest", "1.0");

    serviceUriHandler.setInstantiationType(QRemoteServiceRegister::GlobalInstance);
    serviceRegisterSfwTest->publishEntries("sfwtest");

    serviceRegisterSfwTest->setQuitOnLastInstanceClosed(false);

    
    return a.exec();
}