Fraxinus  18.10
An IGT application
cxWebServerPluginActivator.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 CXNETWORKPLUGINACTIVATOR_H_
13 #define CXNETWORKPLUGINACTIVATOR_H_
14 
15 #include <ctkPluginActivator.h>
16 #include "boost/shared_ptr.hpp"
17 
18 class QHttpServer;
19 class QHttpRequest;
20 class QHttpResponse;
21 
22 namespace cx
23 {
24 //class ScreenVideoProvider;
25 typedef boost::shared_ptr<class RemoteAPI> RemoteAPIPtr;
26 typedef boost::shared_ptr<class HttpRequestHandler> HttpRequestHandlerPtr;
27 //typedef boost::shared_ptr<class RegisteredService> RegisteredServicePtr;
28 
31 class NetworkPluginActivator : public QObject, public ctkPluginActivator
32 {
33  Q_OBJECT
34  Q_INTERFACES(ctkPluginActivator)
35  Q_PLUGIN_METADATA(IID "org_custusx_webserver")
36 
37 public:
38 
41 
42  void start(ctkPluginContext* context);
43  void stop(ctkPluginContext* context);
44 
45 
46 private:
47  HttpRequestHandlerPtr mRequestHandler;
48  RemoteAPIPtr mAPI;
49  QHttpServer *server;
50 };
51 
52 } // namespace cx
53 
54 #endif /* CXNETWORKPLUGINACTIVATOR_H_ */
void stop(ctkPluginContext *context)
boost::shared_ptr< class HttpRequestHandler > HttpRequestHandlerPtr
boost::shared_ptr< class RemoteAPI > RemoteAPIPtr
void start(ctkPluginContext *context)
Namespace for all CustusX production code.