Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
CNetworkServices Class Reference

#include <NetworkServices.h>

Inheritance diagram for CNetworkServices:
ISettingCallback

Public Types

enum  ESERVERS {
  ES_WEBSERVER = 1 , ES_AIRPLAYSERVER , ES_JSONRPCSERVER , ES_UPNPRENDERER ,
  ES_UPNPSERVER , ES_EVENTSERVER , ES_ZEROCONF , ES_WSDISCOVERY
}
 

Public Member Functions

 CNetworkServices ()
 
 ~CNetworkServices () override
 
bool OnSettingChanging (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting is being changed.
 
void OnSettingChanged (const std::shared_ptr< const CSetting > &setting) override
 The value of the given setting has changed.
 
bool OnSettingUpdate (const std::shared_ptr< CSetting > &setting, const char *oldSettingId, const TiXmlNode *oldSettingNode) override
 The given setting needs to be updated.
 
void Start ()
 
void Stop (bool bWait)
 
bool StartServer (enum ESERVERS server, bool start)
 
bool StartWebserver ()
 
bool IsWebserverRunning ()
 
bool StopWebserver ()
 
bool StartAirPlayServer ()
 
bool IsAirPlayServerRunning ()
 
bool StopAirPlayServer (bool bWait)
 
bool StartAirTunesServer ()
 
bool IsAirTunesServerRunning ()
 
bool StopAirTunesServer (bool bWait)
 
bool StartJSONRPCServer ()
 
bool IsJSONRPCServerRunning ()
 
bool StopJSONRPCServer (bool bWait)
 
bool StartEventServer ()
 
bool IsEventServerRunning ()
 
bool StopEventServer (bool bWait, bool promptuser)
 
bool RefreshEventServer ()
 
bool StartUPnP ()
 
bool StopUPnP (bool bWait)
 
bool StartUPnPClient ()
 
bool IsUPnPClientRunning ()
 
bool StopUPnPClient ()
 
bool StartUPnPController ()
 
bool IsUPnPControllerRunning ()
 
bool StopUPnPController ()
 
bool StartUPnPRenderer ()
 
bool IsUPnPRendererRunning ()
 
bool StopUPnPRenderer ()
 
bool StartUPnPServer ()
 
bool IsUPnPServerRunning ()
 
bool StopUPnPServer ()
 
bool StartRss ()
 
bool IsRssRunning ()
 
bool StopRss ()
 
bool StartZeroconf ()
 
bool IsZeroconfRunning ()
 
bool StopZeroconf ()
 
bool StartWSDiscovery ()
 
bool IsWSDiscoveryRunning ()
 
bool StopWSDiscovery ()
 
- Public Member Functions inherited from ISettingCallback
virtual ~ISettingCallback ()=default
 
virtual void OnSettingAction (const std::shared_ptr< const CSetting > &setting)
 The given setting has been activated.
 
virtual void OnSettingPropertyChanged (const std::shared_ptr< const CSetting > &setting, const char *propertyName)
 The given property of the given setting has changed.
 

Member Enumeration Documentation

◆ ESERVERS

Enumerator
ES_WEBSERVER 
ES_AIRPLAYSERVER 
ES_JSONRPCSERVER 
ES_UPNPRENDERER 
ES_UPNPSERVER 
ES_EVENTSERVER 
ES_ZEROCONF 
ES_WSDISCOVERY 

Constructor & Destructor Documentation

◆ CNetworkServices()

CNetworkServices::CNetworkServices ( )

◆ ~CNetworkServices()

CNetworkServices::~CNetworkServices ( )
override

Member Function Documentation

◆ IsAirPlayServerRunning()

bool CNetworkServices::IsAirPlayServerRunning ( )

◆ IsAirTunesServerRunning()

bool CNetworkServices::IsAirTunesServerRunning ( )

◆ IsEventServerRunning()

bool CNetworkServices::IsEventServerRunning ( )

◆ IsJSONRPCServerRunning()

bool CNetworkServices::IsJSONRPCServerRunning ( )

◆ IsRssRunning()

bool CNetworkServices::IsRssRunning ( )

◆ IsUPnPClientRunning()

bool CNetworkServices::IsUPnPClientRunning ( )

◆ IsUPnPControllerRunning()

bool CNetworkServices::IsUPnPControllerRunning ( )

◆ IsUPnPRendererRunning()

bool CNetworkServices::IsUPnPRendererRunning ( )

◆ IsUPnPServerRunning()

bool CNetworkServices::IsUPnPServerRunning ( )

◆ IsWebserverRunning()

bool CNetworkServices::IsWebserverRunning ( )

◆ IsWSDiscoveryRunning()

bool CNetworkServices::IsWSDiscoveryRunning ( )

◆ IsZeroconfRunning()

bool CNetworkServices::IsZeroconfRunning ( )

◆ OnSettingChanged()

void CNetworkServices::OnSettingChanged ( const std::shared_ptr< const CSetting > & setting)
overridevirtual

The value of the given setting has changed.

This callback is triggered whenever the value of a setting has been successfully changed (i.e. none of the OnSettingChanging() handlers) has reverted the change.

Parameters
settingThe setting whose value has been changed
Todo
  • General way of handling setting changes that require restart

Reimplemented from ISettingCallback.

◆ OnSettingChanging()

bool CNetworkServices::OnSettingChanging ( const std::shared_ptr< const CSetting > & setting)
overridevirtual

The value of the given setting is being changed.

This callback is triggered whenever the value of a setting is being changed. The given CSetting already contains the new value and the handler of the callback has the possibility to allow or revert changing the value of the setting. In case of a revert OnSettingChanging() is called again to inform all listeners that the value change has been reverted.

Parameters
settingThe setting whose value is being changed (already containing the changed value)
Returns
True if the new value is acceptable otherwise false

Reimplemented from ISettingCallback.

◆ OnSettingUpdate()

bool CNetworkServices::OnSettingUpdate ( const std::shared_ptr< CSetting > & setting,
const char * oldSettingId,
const TiXmlNode * oldSettingNode )
overridevirtual

The given setting needs to be updated.

This callback is triggered when a setting needs to be updated because its value is outdated. This only happens when initially loading the value of a setting and will not be triggered afterwards.

Parameters
settingThe setting which needs to be updated.
oldSettingIdThe id of the previous setting.
oldSettingNodeThe old setting node
Returns
True if the setting has been successfully updated otherwise false

Reimplemented from ISettingCallback.

◆ RefreshEventServer()

bool CNetworkServices::RefreshEventServer ( )

◆ Start()

void CNetworkServices::Start ( )

◆ StartAirPlayServer()

bool CNetworkServices::StartAirPlayServer ( )

◆ StartAirTunesServer()

bool CNetworkServices::StartAirTunesServer ( )

◆ StartEventServer()

bool CNetworkServices::StartEventServer ( )

◆ StartJSONRPCServer()

bool CNetworkServices::StartJSONRPCServer ( )

◆ StartRss()

bool CNetworkServices::StartRss ( )

◆ StartServer()

bool CNetworkServices::StartServer ( enum ESERVERS server,
bool start )

◆ StartUPnP()

bool CNetworkServices::StartUPnP ( )

◆ StartUPnPClient()

bool CNetworkServices::StartUPnPClient ( )

◆ StartUPnPController()

bool CNetworkServices::StartUPnPController ( )

◆ StartUPnPRenderer()

bool CNetworkServices::StartUPnPRenderer ( )

◆ StartUPnPServer()

bool CNetworkServices::StartUPnPServer ( )

◆ StartWebserver()

bool CNetworkServices::StartWebserver ( )

◆ StartWSDiscovery()

bool CNetworkServices::StartWSDiscovery ( )

◆ StartZeroconf()

bool CNetworkServices::StartZeroconf ( )

◆ Stop()

void CNetworkServices::Stop ( bool bWait)

◆ StopAirPlayServer()

bool CNetworkServices::StopAirPlayServer ( bool bWait)

◆ StopAirTunesServer()

bool CNetworkServices::StopAirTunesServer ( bool bWait)

◆ StopEventServer()

bool CNetworkServices::StopEventServer ( bool bWait,
bool promptuser )

◆ StopJSONRPCServer()

bool CNetworkServices::StopJSONRPCServer ( bool bWait)

◆ StopRss()

bool CNetworkServices::StopRss ( )

◆ StopUPnP()

bool CNetworkServices::StopUPnP ( bool bWait)

◆ StopUPnPClient()

bool CNetworkServices::StopUPnPClient ( )

◆ StopUPnPController()

bool CNetworkServices::StopUPnPController ( )

◆ StopUPnPRenderer()

bool CNetworkServices::StopUPnPRenderer ( )

◆ StopUPnPServer()

bool CNetworkServices::StopUPnPServer ( )

◆ StopWebserver()

bool CNetworkServices::StopWebserver ( )

◆ StopWSDiscovery()

bool CNetworkServices::StopWSDiscovery ( )

◆ StopZeroconf()

bool CNetworkServices::StopZeroconf ( )

The documentation for this class was generated from the following files: