Platinum UPnP SDK
|
The PLT_MediaServer class implements the base class for a UPnP AV Media Server device. More...
#include <PltMediaServer.h>
Protected Member Functions | |
virtual NPT_Result | OnAction (PLT_ActionReference &action, const PLT_HttpRequestContext &context) |
This mehod is called when an action performed by a control point has been received and needs to be answered. | |
virtual NPT_Result | ProcessHttpGetRequest (NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) |
This method is called when a "GET" request for a resource other than the device description, SCPD, or icons has been received. | |
virtual NPT_Result | SetupServices () |
Required method for setting up UPnP services of device host (and any embedded). | |
![]() | |
NPT_Result | Announce (NPT_HttpRequest &request, NPT_UdpSocket &socket, bool byebye) |
Called during SSDP announce. | |
virtual NPT_Result | OnSsdpPacket (const NPT_HttpRequest &request, const NPT_HttpRequestContext &context) |
PLT_SsdpPacketListener method called when a M-SEARCH SSDP packet is received. | |
virtual NPT_Result | ProcessGetDescription (NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) |
This method is called when a control point is requesting the device description. | |
virtual NPT_Result | ProcessGetSCPD (PLT_Service *service, NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) |
This method is called when a control point is requesting a service SCPD. | |
virtual NPT_Result | ProcessHttpPostRequest (NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) |
This method is called when a "POST" request has been received. | |
virtual NPT_Result | ProcessHttpSubscriberRequest (NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) |
This method is called when a request from a subscriber has been received. | |
virtual NPT_Result | SendSsdpSearchResponse (NPT_HttpResponse &response, NPT_UdpSocket &socket, const char *st, const NPT_SocketAddress *addr=NULL) |
Called by PLT_SsdpDeviceSearchResponseTask when responding to a M-SEARCH SSDP request. | |
virtual NPT_Result | SetupDevice () |
Default implementation for setting up device host. | |
virtual NPT_Result | SetupIcons () |
Default implementation for registering device icon resources. | |
virtual NPT_Result | SetupResponse (NPT_HttpRequest &request, const NPT_HttpRequestContext &context, NPT_HttpResponse &response) |
NPT_HttpRequestHandler method for setting up the response of an incoming HTTP request. | |
virtual NPT_Result | Start (PLT_SsdpListenTask *task) |
Called by PLT_TaskManager when the device is started. | |
virtual NPT_Result | Stop (PLT_SsdpListenTask *task) |
Called by PLT_TaskManager when the device is stoped. | |
Additional Inherited Members | |
![]() | |
PLT_DeviceHost (const char *description_path="/", const char *uuid="", const char *device_type="", const char *friendly_name="", bool show_ip=false, NPT_UInt16 port=0, bool port_rebind=false) | |
Creates a new instance of UPnP Device Host. | |
virtual NPT_Result | AddIcon (const PLT_DeviceIcon &icon, const char *fileroot, const char *urlroot="/") |
Add UPnP icon information to serve from file system. | |
virtual NPT_Result | AddIcon (const PLT_DeviceIcon &icon, const void *data, NPT_Size size, bool copy=true) |
Add UPnP icon information to serve using static image. | |
virtual NPT_UInt16 | GetPort () |
Returns the port used by the internal HTTP server for all incoming requests. | |
virtual void | SetByeByeFirst (bool bye_bye_first) |
When a UPnP device comes up, the specifications require that a SSDP bye-bye sequence is sent to force the removal of the device in case it wasn't sent properly during the last shutdown. | |
NPT_Result | SetLeaseTime (NPT_TimeInterval lease_time) |
Sets the lease time. | |
![]() | |
static NPT_Result | Announce (PLT_DeviceData *device, NPT_HttpRequest &request, NPT_UdpSocket &socket, bool byebye) |
Static method similar to Announce. | |
static NPT_Result | SendSsdpSearchResponse (PLT_DeviceData *device, NPT_HttpResponse &response, NPT_UdpSocket &socket, const char *st, const NPT_SocketAddress *addr=NULL) |
Static method similar to SendSsdpSearchResponse. | |
The PLT_MediaServer class implements the base class for a UPnP AV Media Server device.
|
protectedvirtual |
This mehod is called when an action performed by a control point has been received and needs to be answered.
action | the action information to answer |
context | the context information including the HTTP request and local and remote socket information (IP & port). |
Reimplemented from PLT_DeviceHost.
|
protectedvirtual |
This method is called when a "GET" request for a resource other than the device description, SCPD, or icons has been received.
request | the HTTP request |
context | the context information including local and remote socket information. |
response | the response to setup. |
Reimplemented from PLT_DeviceHost.
|
protectedvirtual |
Required method for setting up UPnP services of device host (and any embedded).
Called when device starts.
Implements PLT_DeviceHost.