NAP
Public Member Functions | Protected Member Functions | List of all members
APIWebSocketService Class Reference

#include <apiwebsocketservice.h>

Public Member Functions

 APIWebSocketService (ServiceConfiguration *configuration)
 
virtual bool init (nap::utility::ErrorState &errorState) override
 
APIServicegetAPIService ()
 
const APIServicegetAPIService () const
 
WebSocketServicegetWebSocketService ()
 
const WebSocketServicegetWebSocketService () const
 
- Public Member Functions inherited from Service
UNPREFIXED_MODULE_NAME_INPUTCASE Service (ServiceConfiguration *configuration)
 
virtual void update (double deltaTime) override
 
virtual void shutdown () override
 
 Service (ServiceConfiguration *configuration)
 
virtual ~Service ()
 
CoregetCore ()
 
const CoregetCore () const
 
std::string getTypeName () const
 
const ModulegetModule () const
 
 Service (Service &)=delete
 
Serviceoperator= (const Service &)=delete
 
 Service (Service &&)=delete
 
Serviceoperator= (Service &&)=delete
 

Protected Member Functions

virtual void registerObjectCreators (rtti::Factory &factory) override
 
virtual void getDependentServices (std::vector< rtti::TypeInfo > &dependencies) override
 
virtual void created () override
 
- Protected Member Functions inherited from Service
virtual void preUpdate (double deltaTime)
 
virtual void update (double deltaTime)
 
virtual void postUpdate (double deltaTime)
 
virtual void preShutdown ()
 
virtual void shutdown ()
 
virtual void preResourcesLoaded ()
 
virtual void postResourcesLoaded ()
 
template<typename SERVICE_CONFIG >
SERVICE_CONFIG * getConfiguration ()
 
template<typename SERVICE_CONFIG >
const SERVICE_CONFIG * getConfiguration () const
 
std::string getIniFilePath () const
 
std::string getIniFilePath (const std::string &appendix) const
 

Description

Main interface for processing api web socket events in NAP. The service depends on both the nap::APIService and nap::WebSocketService.

Inheritance diagram for APIWebSocketService:
[legend]
Collaboration diagram for APIWebSocketService:
[legend]

Constructor & Destructor Documentation

◆ APIWebSocketService()

Member Function Documentation

◆ created()

virtual void created ( )
overrideprotectedvirtual

Invoked when the service has been constructed and Core is available. This occurs before service initialization

Reimplemented from Service.

◆ getAPIService() [1/2]

APIService& getAPIService ( )
Returns
the api service

◆ getAPIService() [2/2]

const APIService& getAPIService ( ) const
Returns
const ref to the api service

◆ getDependentServices()

virtual void getDependentServices ( std::vector< rtti::TypeInfo > &  dependencies)
overrideprotectedvirtual

This service depends on the api and web socket service

Reimplemented from Service.

◆ getWebSocketService() [1/2]

WebSocketService& getWebSocketService ( )
Returns
the web-socket service

◆ getWebSocketService() [2/2]

const WebSocketService& getWebSocketService ( ) const
Returns
const ref to the web-socket service

◆ init()

virtual bool init ( nap::utility::ErrorState errorState)
overridevirtual

Initializes the service

Parameters
errorStatecontains the error message on failure
Returns
if the video service was initialized correctly

Reimplemented from Service.

◆ registerObjectCreators()

virtual void registerObjectCreators ( rtti::Factory factory)
overrideprotectedvirtual

Registers all objects that need a specific way of construction.

Parameters
factorythe factory to register the object creators with.

Reimplemented from Service.