PTLib Version 2.12.9

- Main Page
- Related Pages
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PSSDP Class Reference

Simple Service Discovery Protocol. More...

`#include <ssdp.h>`

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

## Public Types
enum | Commands { M_SEARCH = PHTTP::NumCommands, NOTIFY, NumCommands }
Public Types inherited from PHTTP
enum | Commands { GET, HEAD, POST, PUT, DELETE, TRACE, OPTIONS, CONNECT, NumCommands }
enum | StatusCode { BadResponse = 1, ContentProcessorError, UnknownTransferEncoding, Continue = 100, SwitchingProtocols, RequestOK = 200, Created, Accepted, NonAuthoritativeInformation, NoContent, ResetContent, PartialContent, MultipleChoices = 300, MovedPermanently, MovedTemporarily, SeeOther, NotModified, UseProxy, BadRequest = 400, UnAuthorised, PaymentRequired, Forbidden, NotFound, MethodNotAllowed, NoneAcceptable, ProxyAuthenticationRequired, RequestTimeout, Conflict, Gone, LengthRequired, UnlessTrue, InternalServerError = 500, NotImplemented, BadGateway, ServiceUnavailable, GatewayTimeout }

## Public Member Functions
| PSSDP ()
| Create a TCP/IP HTTP protocol channel. More...
bool | Listen ()
| Listen for service notifications. More...
bool | Search (const PString &urn, PMIMEInfo &reply)
| Search for device with the specified URN. More...
bool | GetNotify (PMIMEInfo &mime, const PString &urnRegex=".*")
| Read a notification. More...

## Static Public Member Functions
static const PCaselessString & | MXTag ()
static const PCaselessString & | STTag ()
static const PCaselessString & | MANTag ()
static const PCaselessString & | USNTag ()
static const PCaselessString & | NickNameTag ()
Static Public Member Functions inherited from PHTTP
static const PCaselessString & | HostTag ()
static const PCaselessString & | AllowTag ()
static const PCaselessString & | AuthorizationTag ()
static const PCaselessString & | ContentEncodingTag ()
static const PCaselessString & | ContentLengthTag ()
static const PCaselessString & | ContentTypeTag ()
static const PCaselessString & | DateTag ()
static const PCaselessString & | ExpiresTag ()
static const PCaselessString & | FromTag ()
static const PCaselessString & | IfModifiedSinceTag ()
static const PCaselessString & | LastModifiedTag ()
static const PCaselessString & | LocationTag ()
static const PCaselessString & | PragmaTag ()
static const PCaselessString & | PragmaNoCacheTag ()
static const PCaselessString & | RefererTag ()
static const PCaselessString & | ServerTag ()
static const PCaselessString & | UserAgentTag ()
static const PCaselessString & | WWWAuthenticateTag ()
static const PCaselessString & | MIMEVersionTag ()
static const PCaselessString & | ConnectionTag ()
static const PCaselessString & | KeepAliveTag ()
static const PCaselessString & | TransferEncodingTag ()
static const PCaselessString & | ChunkedTag ()
static const PCaselessString & | ProxyConnectionTag ()
static const PCaselessString & | ProxyAuthorizationTag ()
static const PCaselessString & | ProxyAuthenticateTag ()
static const PCaselessString & | ForwardedTag ()
static const PCaselessString & | SetCookieTag ()
static const PCaselessString & | CookieTag ()

## Protected Member Functions
bool | Close ()
| Close the channel. More...
Protected Member Functions inherited from PHTTP
| PHTTP ()
| Create a TCP/IP HTTP protocol channel. More...
| PHTTP (const char *defaultServiceName)
virtual PINDEX | ParseResponse (const PString &line)
| Parse a response line string into a response code and any extra info on the line. More...
Protected Member Functions inherited from PInternetProtocol
| PInternetProtocol (const char *defaultServiceName, PINDEX cmdCount, char const *const *cmdNames)
Protected Member Functions inherited from PIndirectChannel
virtual PBoolean | OnOpen ()
| This callback is executed when the Open() function is called with open channels. More...
Protected Member Functions inherited from PChannel
| PChannel (const PChannel &)
PChannel & | operator= (const PChannel &)
virtual PBoolean | ConvertOSError (P_INT_PTR libcReturnValue, ErrorGroup group=LastGeneralError)
| Convert an operating system error into platform independent error. More...
int | ReadCharWithTimeout (PTimeInterval &timeout)
| Read a character with specified timeout. More...
PBoolean | ReceiveCommandString (int nextChar, const PString &reply, PINDEX &pos, PINDEX start)
PBoolean | PXSetIOBlock (PXBlockType type, const PTimeInterval &timeout)
P_INT_PTR | GetOSHandleAsInt () const
int | PXClose ()
| PChannel ()
| Create the channel. More...
Protected Member Functions inherited from PObject
| PObject ()
| Constructor for PObject, made protected so cannot ever create one on its own. More...

## Protected Attributes
bool | m_listening

## Additional Inherited Members
Protected Types inherited from PInternetProtocol
enum | StuffState { DontStuff, StuffIdle, StuffCR, StuffCRLF, StuffCRLFdot, StuffCRLFdotCR }
Friends inherited from PObject

## Detailed Description

Simple Service Discovery Protocol.

## Member Enumeration Documentation

enum PSSDP::Commands

Enumerator
M_SEARCH |
NOTIFY |
NumCommands |

## Constructor & Destructor Documentation

PSSDP::PSSDP | ( |  | ) |

Create a TCP/IP HTTP protocol channel.

## Member Function Documentation

bool PSSDP::Close | ( |  | ) |
| protected virtual

Close the channel.

This will detach itself from the read and write channels and delete both of them if they are auto delete.

Returns
  true if the channel is closed.

Reimplemented from PIndirectChannel.

bool PSSDP::GetNotify | ( | PMIMEInfo & | mime,
|  | const PString & | urnRegex = `".*"`
| ) |  |

Read a notification.

bool PSSDP::Listen | ( |  | ) |

Listen for service notifications.

static const PCaselessString& PSSDP::MANTag | ( |  | ) |
| static

static const PCaselessString& PSSDP::MXTag | ( |  | ) |
| static

static const PCaselessString& PSSDP::NickNameTag | ( |  | ) |
| static

bool PSSDP::Search | ( | const PString & | urn,
|  | PMIMEInfo & | reply
| ) |  |

Search for device with the specified URN.

Note that the Listen() must not have been called for this function to work correctly.

Parameters

  urn | Resource identfier to search for
  reply | MIME for the reply

static const PCaselessString& PSSDP::STTag | ( |  | ) |
| static

static const PCaselessString& PSSDP::USNTag | ( |  | ) |
| static

## Member Data Documentation

bool PSSDP::m_listening
| protected

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

- ssdp.h