kodi
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PLT_SsdpListenTask Class Reference

The PLT_SsdpListenTask class is used to listen for incoming SSDP packets and keep track of a list of PLT_SsdpPacketListener listeners to notify when a new SSDP packet has arrived. More...

#include <PltSsdp.h>

Inheritance diagram for PLT_SsdpListenTask:
Inheritance graph
[legend]
Collaboration diagram for PLT_SsdpListenTask:
Collaboration graph
[legend]

Public Member Functions

 PLT_SsdpListenTask (NPT_Socket *socket)
 
NPT_Result AddListener (PLT_SsdpPacketListener *listener)
 
NPT_Result RemoveListener (PLT_SsdpPacketListener *listener)
 
void DoAbort () override
 This method to override in derived classes is called when the task is about to stop.
 
- Public Member Functions inherited from PLT_HttpServerSocketTask
 PLT_HttpServerSocketTask (NPT_Socket *socket, bool stay_alive_forever=false)
 
- Public Member Functions inherited from PLT_ThreadTask
NPT_Result Kill ()
 When a task is not managed by a PLT_TaskManager, the owner must call this to stop and destroy it.
 

Protected Member Functions

NPT_Result GetInputStream (NPT_InputStreamReference &stream) override
 
NPT_Result GetInfo (NPT_SocketInfo &info) override
 
NPT_Result SetupResponse (NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) override
 
- Protected Member Functions inherited from PLT_HttpServerSocketTask
void DoRun () override
 This method to override in derived classes is the main task loop.
 
- Protected Member Functions inherited from PLT_ThreadTask
virtual bool IsAborting (NPT_Timeout timeout)
 Return whether this task is in the process of stopping. More...
 
NPT_Result Start (PLT_TaskManager *task_manager=NULL, NPT_TimeInterval *delay=NULL, bool auto_destroy=true)
 Start a task by associating it with a task manager. More...
 
NPT_Result Stop (bool blocking=true)
 Stop the task. More...
 
virtual void DoInit ()
 This method to override in derived classes is called when the task is about to start.
 
 PLT_ThreadTask ()
 A PLT_ThreadTask base class is never instantiated directly.
 
 ~PLT_ThreadTask () override
 The task manager will destroy the task when finished if m_AutoDestroy is true otherwise the owner of this task must use the Kill method.
 

Protected Attributes

PLT_InputDatagramStreamReference m_Datagram
 
NPT_List< PLT_SsdpPacketListener * > m_Listeners
 
NPT_Mutex m_Mutex
 
- Protected Attributes inherited from PLT_HttpServerSocketTask
NPT_Socketm_Socket
 
bool m_StayAliveForever
 
- Protected Attributes inherited from PLT_ThreadTask
PLT_TaskManagerm_TaskManager
 

Detailed Description

The PLT_SsdpListenTask class is used to listen for incoming SSDP packets and keep track of a list of PLT_SsdpPacketListener listeners to notify when a new SSDP packet has arrived.


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