CustusX  22.04-rc5
An IGT application
cxVideoServiceProxy.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 CXVIDEOSERVICEPROXY_H
13 #define CXVIDEOSERVICEPROXY_H
14 
15 #include "cxResourceExport.h"
16 
17 #include "cxVideoService.h"
19 class ctkPluginContext;
20 
21 namespace cx
22 {
23 
27 class cxResource_EXPORT VideoServiceProxy : public VideoService
28 {
29 public:
30  static VideoServicePtr create(ctkPluginContext *pluginContext);
31  VideoServiceProxy(ctkPluginContext *pluginContext);
32  bool isNull();
33 
34  virtual void setActiveVideoSource(QString uid);
35  virtual VideoSourcePtr getActiveVideoSource();
36  virtual std::vector<VideoSourcePtr> getVideoSources();
37 
38  virtual void setConnectionMethod(QString connectionMethod);
39  virtual QString getConnectionMethod();
40  virtual void openConnection();
41  virtual void closeConnection();
42  virtual bool isConnected() const;
43 
44  virtual void setPlaybackMode(PlaybackTimePtr controller);
45  virtual std::vector<TimelineEvent> getPlaybackEvents();
46 
47  virtual StreamerServicePtr getStreamerService(QString uid);
48  virtual QList<StreamerServicePtr> getStreamerServices();
49 private:
50  void initServiceListener();
51  void onVideoServiceAdded(VideoService* service);
52  void onVideoServiceRemoved(VideoService *service);
53 
54  ctkPluginContext *mPluginContext;
55  VideoServicePtr mVideoService;
56  boost::shared_ptr<ServiceTrackerListener<VideoService> > mVideoServiceListener;
57 };
58 } //cx
59 #endif // CXVIDEOSERVICEPROXY_H
boost::shared_ptr< class VideoService > VideoServicePtr
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
Provides access to all video sources in the system, and connection stuff for the sources.
boost::shared_ptr< class StreamerService > StreamerServicePtr
Namespace for all CustusX production code.