ctkEventBusPlugin.cpp

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