14 #include <boost/bind.hpp>
15 #include <ctkPluginContext.h>
28 mPluginContext(context),
31 this->initServiceListener();
34 void AcquisitionServiceProxy::initServiceListener()
38 boost::bind(&AcquisitionServiceProxy::onServiceAdded,
this, _1),
40 boost::bind(&AcquisitionServiceProxy::onServiceRemoved,
this, _1)
42 mServiceListener->open();
44 void AcquisitionServiceProxy::onServiceAdded(AcquisitionService* service)
46 mAcquisitionService.reset(service, null_deleter());
58 if(mAcquisitionService->isNull())
59 reportWarning(
"AcquisitionServiceProxy::onServiceAdded mAcquisitionService->isNull()");
66 void AcquisitionServiceProxy::onServiceRemoved(AcquisitionService *service)
87 return mAcquisitionService->isNull();
92 return mAcquisitionService->getLatestSession();
97 return mAcquisitionService->getSessions();
102 return mAcquisitionService->isReady(context);
107 return mAcquisitionService->getInfoText(context);
112 return mAcquisitionService->getState();
117 mAcquisitionService->startRecord(context, category, session);
122 mAcquisitionService->stopRecord();
127 mAcquisitionService->cancelRecord();
132 mAcquisitionService->startPostProcessing();
137 mAcquisitionService->stopPostProcessing();
142 return mAcquisitionService->getNumberOfSavingThreads();