ctkCLIPlugin.cpp

Go to the documentation of this file.
00001 /*
00002  * ctkCLIPlugin.cxx
00003  *
00004  *  Created on: Mar 11, 2010
00005  *      Author: zelzer
00006  */
00007 
00008 #include "ctkCLIPlugin.h"
00009 
00010 #include "ctkCLIRegistry.h"
00011 
00012 #include <QtPlugin>
00013 #include <QServiceInterfaceDescriptor>
00014 #include <QStringList>
00015 
00016 #include <iostream>
00017 
00018 using namespace QtMobility;
00019 
00020 void ctkCLIPlugin::start(ctkPluginContext* context)
00021 {
00022   ctkCLIRegistry* registry = new ctkCLIRegistry();
00023   context->registerService(QStringList("ctkCLIRegistry"), registry);
00024 
00025   std::cout << "Plugin A started\n";
00026 }
00027 
00028 void ctkCLIPlugin::stop(ctkPluginContext* context)
00029 {
00030   std::cout << "Plugin B stopped\n";
00031 }
00032 
00033 QObject* ctkCLIPlugin::createInstance(const QServiceInterfaceDescriptor& descriptor,
00034                             QServiceContext* context,
00035                             QAbstractSecuritySession* session)
00036 {
00037   std::cout << "Creating service instance for " << descriptor.interfaceName().toStdString() << std::endl;
00038   return 0;
00039 }
00040 
00041 Q_EXPORT_PLUGIN2(org_commontk_cli, ctkCLIPlugin)
00042 
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines

Generated on 21 May 2010 for CTK by  doxygen 1.6.1