NAP
nap
system_modules
napapiwebsocket
src
apiwebsocketservice.h
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
* License, v. 2.0. If a copy of the MPL was not distributed with this
3
* file, You can obtain one at https://mozilla.org/MPL/2.0/. */
4
5
#pragma once
6
7
// Nap includes
8
#include <nap/service.h>
9
#include <apiservice.h>
10
#include <websocketservice.h>
11
12
namespace
nap
13
{
18
class
NAPAPI
APIWebSocketService
:
public
nap::Service
19
{
20
RTTI_ENABLE(
nap::Service
)
21
public
:
22
// Constructor
23
APIWebSocketService
(
ServiceConfiguration
* configuration);
24
25
// Initialization
26
virtual
bool
init(
nap::utility::ErrorState
& errorState)
override
;
27
31
APIService
& getAPIService();
32
36
const
APIService
& getAPIService()
const
;
37
41
WebSocketService
& getWebSocketService();
42
46
const
WebSocketService
& getWebSocketService()
const
;
47
48
protected
:
53
virtual
void
registerObjectCreators(
rtti::Factory
& factory)
override
;
54
58
virtual
void
getDependentServices(std::vector<rtti::TypeInfo>& dependencies)
override
;
59
60
// Creation
61
virtual
void
created()
override
;
62
63
private
:
64
APIService
* mAPIService =
nullptr
;
65
WebSocketService
* mWebSocketService =
nullptr
;
66
};
67
}
nap::WebSocketService
Definition:
websocketservice.h:23
nap::utility::ErrorState
Definition:
errorstate.h:19
nap::ServiceConfiguration
Definition:
service.h:28
nap::APIService
Definition:
apiservice.h:47
nap::Service
Definition:
templateservice.h:8
nap::rtti::Factory
Definition:
factory.h:78
nap
Definition:
templateapp.h:17
nap::APIWebSocketService
Definition:
apiwebsocketservice.h:18
Generated by doxygen