Platinum UPnP SDK  1.0.5.13
Protected Member Functions | List of all members
PLT_MediaServer Class Reference

The PLT_MediaServer class implements the base class for a UPnP AV Media Server device. More...

#include <PltMediaServer.h>

Inheritance diagram for PLT_MediaServer:
PLT_DeviceHost PLT_DeviceData PLT_SsdpPacketListener PLT_FileMediaServer

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. More...
 
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. More...
 
virtual NPT_Result SetupServices ()
 Required method for setting up UPnP services of device host (and any embedded). More...
 
- Protected Member Functions inherited from PLT_DeviceHost
NPT_Result Announce (NPT_HttpRequest &request, NPT_UdpSocket &socket, PLT_SsdpAnnounceType type)
 Called during SSDP announce. More...
 
virtual NPT_Result OnSsdpPacket (const NPT_HttpRequest &request, const NPT_HttpRequestContext &context)
 PLT_SsdpPacketListener method called when a M-SEARCH SSDP packet is received. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual NPT_Result SetupDevice ()
 Default implementation for setting up device host. More...
 
virtual NPT_Result SetupIcons ()
 Default implementation for registering device icon resources. More...
 
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. More...
 
virtual NPT_Result Start (PLT_SsdpListenTask *task)
 Called by PLT_TaskManager when the device is started. More...
 
virtual NPT_Result Stop (PLT_SsdpListenTask *task)
 Called by PLT_TaskManager when the device is stoped. More...
 

Additional Inherited Members

- Public Member Functions inherited from PLT_DeviceHost
 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. More...
 
virtual NPT_Result AddIcon (const PLT_DeviceIcon &icon, const char *fileroot, const char *urlroot="/")
 Add UPnP icon information to serve from file system. More...
 
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. More...
 
virtual NPT_UInt16 GetPort ()
 Returns the port used by the internal HTTP server for all incoming requests. More...
 
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. More...
 
NPT_Result SetLeaseTime (NPT_TimeInterval lease_time)
 Sets the lease time. More...
 
- Static Protected Member Functions inherited from PLT_DeviceHost
static NPT_Result Announce (PLT_DeviceData *device, NPT_HttpRequest &request, NPT_UdpSocket &socket, PLT_SsdpAnnounceType type)
 Static method similar to Announce. More...
 
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. More...
 

Detailed Description

The PLT_MediaServer class implements the base class for a UPnP AV Media Server device.

Member Function Documentation

virtual NPT_Result PLT_MediaServer::OnAction ( PLT_ActionReference &  action,
const PLT_HttpRequestContext context 
)
protectedvirtual

This mehod is called when an action performed by a control point has been received and needs to be answered.

Parameters
actionthe action information to answer
contextthe context information including the HTTP request and local and remote socket information (IP & port).

Reimplemented from PLT_DeviceHost.

virtual NPT_Result PLT_MediaServer::ProcessHttpGetRequest ( NPT_HttpRequest &  request,
const NPT_HttpRequestContext &  context,
NPT_HttpResponse &  response 
)
protectedvirtual

This method is called when a "GET" request for a resource other than the device description, SCPD, or icons has been received.

Parameters
requestthe HTTP request
contextthe context information including local and remote socket information.
responsethe response to setup.

Reimplemented from PLT_DeviceHost.

virtual NPT_Result PLT_MediaServer::SetupServices ( )
protectedvirtual

Required method for setting up UPnP services of device host (and any embedded).

Called when device starts.

Implements PLT_DeviceHost.


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