Fraxinus  22.09
An IGT application
cxAcquisitionServiceProxy.h
Go to the documentation of this file.
1 /*=========================================================================
2 This file is part of CustusX, an Image Guided Therapy Application.
3 
4 Copyright (c) SINTEF Department of Medical Technology.
5 All rights reserved.
6 
7 CustusX is released under a BSD 3-Clause license.
8 
9 See Lisence.txt (https://github.com/SINTEFMedtek/CustusX/blob/master/License.txt) for details.
10 =========================================================================*/
11 
12 #ifndef CXACQUISITIONSERVICEPROXY_H
13 #define CXACQUISITIONSERVICEPROXY_H
14 
15 #include "cxAcquisitionService.h"
17 namespace cx
18 {
19 
31 class org_custusx_acquisition_EXPORT AcquisitionServiceProxy : public AcquisitionService
32 {
33  Q_OBJECT
34 public:
35 // static AcquisitionServicePtr create(ctkPluginContext *pluginContext);
36  AcquisitionServiceProxy(ctkPluginContext *context);
38 
39  virtual bool isNull();
40 
41  virtual RecordSessionPtr getLatestSession();
42  virtual std::vector<RecordSessionPtr> getSessions();
43 
44  virtual bool isReady(TYPES context) const;
45  virtual QString getInfoText(TYPES context) const;
46  virtual STATE getState() const;
47  virtual void startRecord(TYPES context, QString category, RecordSessionPtr session);
48  virtual void stopRecord();
49  virtual void cancelRecord();
50  virtual void startPostProcessing();
51  virtual void stopPostProcessing();
52 
53  virtual int getNumberOfSavingThreads() const;
54 
55 private:
56  ctkPluginContext *mPluginContext;
57  AcquisitionServicePtr mAcquisitionService;
58  boost::shared_ptr<ServiceTrackerListener<AcquisitionService> > mServiceListener;
59 
60  void initServiceListener();
61  void onServiceAdded(AcquisitionService *service);
62  void onServiceRemoved(AcquisitionService *service);
63 };
64 
65 } //cx
66 #endif // CXACQUISITIONSERVICEPROXY_H
Acqusition services abstract interface.
boost::shared_ptr< class AcquisitionService > AcquisitionServicePtr
boost::shared_ptr< class RecordSession > RecordSessionPtr
Always provides an AcqusitionService.
Namespace for all CustusX production code.