Arduino DLNA Server
Classes | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
tiny_dlna::HttpParameters Class Reference

API for http parameters: key=value&key1=value1. More...

#include <HttpParameters.h>

Collaboration diagram for tiny_dlna::HttpParameters:
Collaboration graph
[legend]

Public Member Functions

 HttpParameters (const int maxLen=256)
 Default Constructor. More...
 
 ~HttpParameters ()
 Destructor. More...
 
void parse (Stream &in)
 Parses the parameters in the client stream. More...
 
void parse (Stream &in, void(*callback)(const char *key, const char *value))
 
bool hasKey (const char *key)
 Checks if the parameter exists. More...
 
HttpParameterEntry * getParameter (const char *key)
 Returns a HttpParameterEntry for a parameter id. More...
 
const char * getValue (const char *key)
 Returns the value for a parameter id as string. More...
 
float getFloat (const char *key)
 Returns the value for a parameter id as float. More...
 
int getInt (const char *key)
 Returns the value for a parameter id as int. More...
 
void clear ()
 Clears all values. More...
 

Protected Member Functions

void urldecode2 (char *dst, const char *src)
 

Protected Attributes

Vector< HttpParameterEntry * > parameters
 
int max_len
 

Detailed Description

API for http parameters: key=value&key1=value1.

Constructor & Destructor Documentation

◆ HttpParameters()

tiny_dlna::HttpParameters::HttpParameters ( const int  maxLen = 256)
inline

Default Constructor.

◆ ~HttpParameters()

tiny_dlna::HttpParameters::~HttpParameters ( )
inline

Destructor.

Member Function Documentation

◆ clear()

void tiny_dlna::HttpParameters::clear ( )
inline

Clears all values.

◆ getFloat()

float tiny_dlna::HttpParameters::getFloat ( const char *  key)
inline

Returns the value for a parameter id as float.

◆ getInt()

int tiny_dlna::HttpParameters::getInt ( const char *  key)
inline

Returns the value for a parameter id as int.

◆ getParameter()

HttpParameterEntry* tiny_dlna::HttpParameters::getParameter ( const char *  key)
inline

Returns a HttpParameterEntry for a parameter id.

◆ getValue()

const char* tiny_dlna::HttpParameters::getValue ( const char *  key)
inline

Returns the value for a parameter id as string.

◆ hasKey()

bool tiny_dlna::HttpParameters::hasKey ( const char *  key)
inline

Checks if the parameter exists.

◆ parse() [1/2]

void tiny_dlna::HttpParameters::parse ( Stream &  in)
inline

Parses the parameters in the client stream.

◆ parse() [2/2]

void tiny_dlna::HttpParameters::parse ( Stream &  in,
void(*)(const char *key, const char *value)  callback 
)
inline

Parses the parameters in the client stream and provides the result via a callback method

◆ urldecode2()

void tiny_dlna::HttpParameters::urldecode2 ( char *  dst,
const char *  src 
)
inlineprotected

Member Data Documentation

◆ max_len

int tiny_dlna::HttpParameters::max_len
protected

◆ parameters

Vector<HttpParameterEntry *> tiny_dlna::HttpParameters::parameters
protected

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