joey shelton / LED_Demo

Dependencies:   MAX44000 PWM_Tone_Library nexpaq_mdk

Fork of LED_Demo by Maxim nexpaq

Embed: (wiki syntax)

« Back to documentation index

HTTPMap Class Reference

Map of key/value pairs Used to transmit POST data using the application/x-www-form-urlencoded encoding. More...

#include <HTTPMap.h>

Inherits IHTTPDataOut, and IHTTPDataOut.

Public Member Functions

 HTTPMap ()
 Instantiates HTTPMap It supports at most 32 key/values pairs.
void put (const char *key, const char *value)
 Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called.
void clear ()
 Clear table.
 HTTPMap ()
 Instantiates HTTPMap It supports at most 32 key/values pairs.
void put (const char *key, const char *value)
 Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called.
void clear ()
 Clear table.

Protected Member Functions

virtual void readReset ()
 Reset stream to its beginning Called by the HTTPClient on each new request.
virtual int read (char *buf, size_t len, size_t *pReadLen)
 Read a piece of data to be transmitted.
virtual int getDataType (char *type, size_t maxTypeLen)
 Get MIME type.
virtual bool getIsChunked ()
 Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.
virtual size_t getDataLen ()
 If the data is not chunked, get its size Used for Content-Length header.
virtual int read (char *buf, size_t len, size_t *pReadLen)
 Read a piece of data to be transmitted.
virtual int getDataType (char *type, size_t maxTypeLen)
 Get MIME type.
virtual bool getIsChunked ()
 Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.
virtual size_t getDataLen ()
 If the data is not chunked, get its size Used for Content-Length header.

Friends

class HTTPClient

Detailed Description

Map of key/value pairs Used to transmit POST data using the application/x-www-form-urlencoded encoding.

Definition at line 31 of file cellular/http/common/HTTPClient/data/HTTPMap.h.


Constructor & Destructor Documentation

HTTPMap (  )

Instantiates HTTPMap It supports at most 32 key/values pairs.

Definition at line 30 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.

HTTPMap (  )

Instantiates HTTPMap It supports at most 32 key/values pairs.


Member Function Documentation

void clear ( void   )

Clear table.

Definition at line 46 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.

void clear (  )

Clear table.

size_t getDataLen (  ) [protected, virtual]

If the data is not chunked, get its size Used for Content-Length header.

Implements IHTTPDataOut.

Definition at line 150 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.

virtual size_t getDataLen (  ) [protected, virtual]

If the data is not chunked, get its size Used for Content-Length header.

Implements IHTTPDataOut.

int getDataType ( char *  type,
size_t  maxTypeLen 
) [protected, virtual]

Get MIME type.

Parameters:
typeInternet media type from Content-Type header

Implements IHTTPDataOut.

Definition at line 138 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.

virtual int getDataType ( char *  type,
size_t  maxTypeLen 
) [protected, virtual]

Get MIME type.

Parameters:
typeInternet media type from Content-Type header

Implements IHTTPDataOut.

virtual bool getIsChunked (  ) [protected, virtual]

Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.

Implements IHTTPDataOut.

bool getIsChunked (  ) [protected, virtual]

Determine whether the HTTP client should chunk the data Used for Transfer-Encoding header.

Implements IHTTPDataOut.

Definition at line 145 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.

void put ( const char *  key,
const char *  value 
)

Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called.

Parameters:
keyThe key to use
valueThe corresponding value
void put ( const char *  key,
const char *  value 
)

Put Key/Value pair The references to the parameters must remain valid as long as the clear() function is not called.

Parameters:
keyThe key to use
valueThe corresponding value

Definition at line 35 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.

int read ( char *  buf,
size_t  len,
size_t *  pReadLen 
) [protected, virtual]

Read a piece of data to be transmitted.

Parameters:
bufPointer to the buffer on which to copy the data
lenLength of the buffer
pReadLenPointer to the variable on which the actual copied data length will be stored

Implements IHTTPDataOut.

Definition at line 57 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.

virtual int read ( char *  buf,
size_t  len,
size_t *  pReadLen 
) [protected, virtual]

Read a piece of data to be transmitted.

Parameters:
bufPointer to the buffer on which to copy the data
lenLength of the buffer
pReadLenPointer to the variable on which the actual copied data length will be stored

Implements IHTTPDataOut.

void readReset (  ) [protected, virtual]

Reset stream to its beginning Called by the HTTPClient on each new request.

Implements IHTTPDataOut.

Definition at line 52 of file cellular/http/common/HTTPClient/data/HTTPMap.cpp.