Get Support
Digital Barriers EdgeVis Decoder SDK
Toggle main menu visibility
Loading...
Searching...
No Matches
SDKs
EdgeVisDecoderSDK
Service.h
Go to the documentation of this file.
1
2
// Copyright (c) 2016 Digital Barriers
4
30
31
#pragma once
32
33
#include "
ServiceState.h
"
34
#include "Pimpl.h"
35
#include <string>
36
#include "EdgeVisSDK.h"
37
#include "
OpResult.h
"
38
39
class
ControlManager;
40
41
namespace
EdgeVisDecoderSDK
42
{
43
class
ServiceImpl;
44
class
IAsset
;
45
class
Server
;
46
class
IServiceListener
;
47
48
class
Service :
public
EdgeVisSDKPimpl<ServiceImpl>
49
{
50
public
:
51
Service() {}
52
Service(
53
const
std::wstring& serviceName,
54
std::weak_ptr<IAsset> parent = std::weak_ptr<IAsset>(),
55
int32_t keepAliveInterval = -1,
56
int32_t idleTimeoutInterval = -1
57
);
58
59
DB_EDGEVIS_SDK
virtual
~Service();
60
66
DB_EDGEVIS_SDK std::wstring
ServiceName
()
const
;
67
74
void
UpdateState
(
ServiceState
state, std::wstring user);
75
84
DB_EDGEVIS_SDK
bool
Started
()
const
;
85
92
DB_EDGEVIS_SDK int32_t
KeepAliveInterval
()
const
;
93
100
DB_EDGEVIS_SDK int32_t
IdleTimeoutInterval
()
const
;
101
108
DB_EDGEVIS_SDK
void
SetIdleTimeoutInterval
(int32_t idleTimeout);
109
115
DB_EDGEVIS_SDK
bool
KeepAliveTaskRunning
()
const
;
116
122
DB_EDGEVIS_SDK
bool
IdleTimeoutRunning
()
const
;
123
124
public
:
125
DB_EDGEVIS_SDK
virtual
OpResult
Start() = 0;
126
DB_EDGEVIS_SDK
virtual
OpResult
Stop() = 0;
127
134
DB_EDGEVIS_SDK
void
RegisterListener
(
IServiceListener
* listener);
135
142
DB_EDGEVIS_SDK
void
UnregisterListener
(
IServiceListener
* listener);
143
150
DB_EDGEVIS_SDK int64_t
GetServiceUptime
()
const
;
151
152
};
153
}
OpResult.h
OpResult
OpResult
Result of an operation.
Definition
OpResult.h:26
ServiceState.h
ServiceState
ServiceState
Service states.
Definition
ServiceState.h:23
EdgeVisDecoderSDK::IAsset
An Asset is a tangible asset on the system such as an Encoder or a Server.
Definition
IAsset.h:26
EdgeVisDecoderSDK::IServiceListener
Defines an interface for a class that listens for incoming state changes from a service.
Definition
IServiceListener.h:37
EdgeVisDecoderSDK::Server
A Server interface is used to make a connection to an EdgeVis server.
Definition
Server.h:56
EdgeVisDecoderSDK::Service::IdleTimeoutInterval
DB_EDGEVIS_SDK int32_t IdleTimeoutInterval() const
Retrieves the idle timeout interval for the service.
EdgeVisDecoderSDK::Service::ServiceName
DB_EDGEVIS_SDK std::wstring ServiceName() const
Gets the name of the Service.
EdgeVisDecoderSDK::Service::UnregisterListener
DB_EDGEVIS_SDK void UnregisterListener(IServiceListener *listener)
Removes the specified listener from the set of listeners to be notified about service state changes.
EdgeVisDecoderSDK::Service::KeepAliveTaskRunning
DB_EDGEVIS_SDK bool KeepAliveTaskRunning() const
Determines if the Keep alive task is currently running.
EdgeVisDecoderSDK::Service::IdleTimeoutRunning
DB_EDGEVIS_SDK bool IdleTimeoutRunning() const
Determines if the idle timeout is currently running.
EdgeVisDecoderSDK::Service::GetServiceUptime
DB_EDGEVIS_SDK int64_t GetServiceUptime() const
Retrieve the number of milliseconds since the service was started.
EdgeVisDecoderSDK::Service::KeepAliveInterval
DB_EDGEVIS_SDK int32_t KeepAliveInterval() const
Retrieves the keep alive interval for the service.
EdgeVisDecoderSDK::Service::Started
DB_EDGEVIS_SDK bool Started() const
Determines whether the service has been started or not.
EdgeVisDecoderSDK::Service::UpdateState
void UpdateState(ServiceState state, std::wstring user)
Updates the service's state.
EdgeVisDecoderSDK::Service::SetIdleTimeoutInterval
DB_EDGEVIS_SDK void SetIdleTimeoutInterval(int32_t idleTimeout)
Sets the idle timeout interval for the service.
EdgeVisDecoderSDK::Service::RegisterListener
DB_EDGEVIS_SDK void RegisterListener(IServiceListener *listener)
Registers the specified listener to be notified when the service state changes.
EdgeVisDecoderSDK
The EdgeVis Decoder SDK namespace.
Generated on
for Digital Barriers EdgeVis Decoder SDK by
1.18.0