NorMIT-nav  2023.01.05-dev+develop.0da12
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
cxServiceTrackerListener.h
cx::VideoServicePtr
boost::shared_ptr< class VideoService > VideoServicePtr
Definition: cxLogicManager.h:26
cx::VideoService
Provides access to all video sources in the system, and connection stuff for the sources.
Definition: cxVideoService.h:75
cx
Namespace for all CustusX production code.
Definition: cx_dev_group_definitions.h:13
cx::PlaybackTimePtr
boost::shared_ptr< class PlaybackTime > PlaybackTimePtr
Definition: cxTrackingSystemBronchoscopyService.h:42
cx::VideoSourcePtr
boost::shared_ptr< class VideoSource > VideoSourcePtr
Definition: cxForwardDeclarations.h:109
cx::VideoServiceProxy
Definition: cxVideoServiceProxy.h:27
cx::StreamerServicePtr
boost::shared_ptr< class StreamerService > StreamerServicePtr
Definition: cxPlusConnectWidget.h:26
cxVideoService.h