CPPMyth
Library to interoperate with MythTV server
Loading...
Searching...
No Matches
NSROOT::WSRequest Class Reference
Collaboration diagram for NSROOT::WSRequest:

Public Member Functions

 WSRequest (const std::string &server, unsigned port)
 WSRequest (const std::string &server, unsigned port, bool secureURI)
 WSRequest (const URIParser &uri, WS_METHOD method=WS_METHOD_Get)
 WSRequest (const WSRequest &o, const URIParser &redirection)
void RequestService (const std::string &url, WS_METHOD method=WS_METHOD_Get)
void RequestAccept (const std::string &contentType)
void RequestAcceptEncoding (bool yesno)
void SetUserAgent (const std::string &value)
void SetHeader (const std::string &field, const std::string &value)
void ClearHeader (const std::string &field)
void SetContentParam (const std::string &param, const std::string &value)
void SetContentCustom (const std::string &contentType, const char *content)
const std::string & GetContent () const
void ClearContent ()
const std::string & GetServer () const
unsigned GetPort () const
bool IsSecureURI () const
WS_METHOD GetMethod () const
const std::string & GetService () const
bool WriteMessage (WSRequestStreamSink &sink) const

Private Types

typedef std::pair< std::string, std::string > header_t

Private Member Functions

bool WriteCommonHeading (WSRequestStreamSink &sink) const
bool WriteMessageGET (WSRequestStreamSink &sink, const char *method) const
bool WriteMessagePOST (WSRequestStreamSink &sink, const char *method) const

Private Attributes

std::string m_server
unsigned m_port
bool m_secure_uri
std::string m_service_url
WS_METHOD m_service_method
std::string m_charset
std::string m_accept
WS_CTYPE m_contentType
std::string m_contentTypeStr
std::string m_contentData
std::map< std::string, header_t > m_headers
std::string m_userAgent

Detailed Description

Definition at line 47 of file wsrequest.h.

Member Typedef Documentation

◆ header_t

typedef std::pair<std::string, std::string> NSROOT::WSRequest::header_t
private

Definition at line 90 of file wsrequest.h.

Constructor & Destructor Documentation

◆ WSRequest() [1/4]

WSRequest::WSRequest ( const std::string & server,
unsigned port )

Definition at line 33 of file wsrequest.cpp.

◆ WSRequest() [2/4]

WSRequest::WSRequest ( const std::string & server,
unsigned port,
bool secureURI )

Definition at line 51 of file wsrequest.cpp.

◆ WSRequest() [3/4]

WSRequest::WSRequest ( const URIParser & uri,
WS_METHOD method = WS_METHOD_Get )

Definition at line 67 of file wsrequest.cpp.

◆ ~WSRequest()

WSRequest::~WSRequest ( )

Definition at line 101 of file wsrequest.cpp.

◆ WSRequest() [4/4]

WSRequest::WSRequest ( const WSRequest & o,
const URIParser & redirection )

Definition at line 105 of file wsrequest.cpp.

Member Function Documentation

◆ ClearContent()

void WSRequest::ClearContent ( )

Definition at line 221 of file wsrequest.cpp.

◆ ClearHeader()

void WSRequest::ClearHeader ( const std::string & field)

Definition at line 196 of file wsrequest.cpp.

◆ GetContent()

const std::string & NSROOT::WSRequest::GetContent ( ) const
inline

Definition at line 68 of file wsrequest.h.

◆ GetMethod()

WS_METHOD NSROOT::WSRequest::GetMethod ( ) const
inline

Definition at line 74 of file wsrequest.h.

◆ GetPort()

unsigned NSROOT::WSRequest::GetPort ( ) const
inline

Definition at line 72 of file wsrequest.h.

◆ GetServer()

const std::string & NSROOT::WSRequest::GetServer ( ) const
inline

Definition at line 71 of file wsrequest.h.

◆ GetService()

const std::string & NSROOT::WSRequest::GetService ( ) const
inline

Definition at line 75 of file wsrequest.h.

◆ IsSecureURI()

bool NSROOT::WSRequest::IsSecureURI ( ) const
inline

Definition at line 73 of file wsrequest.h.

◆ RequestAccept()

void WSRequest::RequestAccept ( const std::string & contentType)

Definition at line 166 of file wsrequest.cpp.

◆ RequestAcceptEncoding()

void WSRequest::RequestAcceptEncoding ( bool yesno)

Definition at line 171 of file wsrequest.cpp.

◆ RequestService()

void WSRequest::RequestService ( const std::string & url,
WS_METHOD method = WS_METHOD_Get )

Definition at line 160 of file wsrequest.cpp.

◆ SetContentCustom()

void WSRequest::SetContentCustom ( const std::string & contentType,
const char * content )

Definition at line 214 of file wsrequest.cpp.

◆ SetContentParam()

void WSRequest::SetContentParam ( const std::string & param,
const std::string & value )

Definition at line 205 of file wsrequest.cpp.

◆ SetHeader()

void WSRequest::SetHeader ( const std::string & field,
const std::string & value )

Definition at line 189 of file wsrequest.cpp.

◆ SetUserAgent()

void WSRequest::SetUserAgent ( const std::string & value)

Definition at line 184 of file wsrequest.cpp.

◆ WriteCommonHeading()

bool WSRequest::WriteCommonHeading ( WSRequestStreamSink & sink) const
private

Definition at line 255 of file wsrequest.cpp.

◆ WriteMessage()

bool WSRequest::WriteMessage ( WSRequestStreamSink & sink) const

Definition at line 228 of file wsrequest.cpp.

◆ WriteMessageGET()

bool WSRequest::WriteMessageGET ( WSRequestStreamSink & sink,
const char * method ) const
private

Definition at line 300 of file wsrequest.cpp.

◆ WriteMessagePOST()

bool WSRequest::WriteMessagePOST ( WSRequestStreamSink & sink,
const char * method ) const
private

Definition at line 323 of file wsrequest.cpp.

Field Documentation

◆ m_accept

std::string NSROOT::WSRequest::m_accept
private

Definition at line 86 of file wsrequest.h.

◆ m_charset

std::string NSROOT::WSRequest::m_charset
private

Definition at line 85 of file wsrequest.h.

◆ m_contentData

std::string NSROOT::WSRequest::m_contentData
private

Definition at line 89 of file wsrequest.h.

◆ m_contentType

WS_CTYPE NSROOT::WSRequest::m_contentType
private

Definition at line 87 of file wsrequest.h.

◆ m_contentTypeStr

std::string NSROOT::WSRequest::m_contentTypeStr
private

Definition at line 88 of file wsrequest.h.

◆ m_headers

std::map<std::string, header_t> NSROOT::WSRequest::m_headers
private

Definition at line 91 of file wsrequest.h.

◆ m_port

unsigned NSROOT::WSRequest::m_port
private

Definition at line 81 of file wsrequest.h.

◆ m_secure_uri

bool NSROOT::WSRequest::m_secure_uri
private

Definition at line 82 of file wsrequest.h.

◆ m_server

std::string NSROOT::WSRequest::m_server
private

Definition at line 80 of file wsrequest.h.

◆ m_service_method

WS_METHOD NSROOT::WSRequest::m_service_method
private

Definition at line 84 of file wsrequest.h.

◆ m_service_url

std::string NSROOT::WSRequest::m_service_url
private

Definition at line 83 of file wsrequest.h.

◆ m_userAgent

std::string NSROOT::WSRequest::m_userAgent
private

Definition at line 92 of file wsrequest.h.


The documentation for this class was generated from the following files:
  • /home/jlb/src/janbar/PVR/cppmythlib/cppmyth/src/private/wsrequest.h
  • /home/jlb/src/janbar/PVR/cppmythlib/cppmyth/src/private/wsrequest.cpp