MHEG  17.9.0
 All Data Structures Files Functions Variables Typedefs Enumerations Macros Pages
Data Structures | Functions
mh5cookies.h File Reference

Functions relating to HTTP Cookie Store. More...

#include "mh5base.h"

Go to the source code of this file.

Data Structures

struct  MHEG5cookie_t
 

Functions

void MHEG5CookieParse (void *data, U32BIT data_len, char *url)
 Parse a Set-cookie header and add the new cookie to the store. If the header is not a set-cookie, or is not parseable it will be ignored. More...
 
U8BIT * MHEG5CookieGenerateHeader (U8BIT *url)
 Generate a "Cookie" header for the required http request, containing all valid cookies. More...
 
MHEG5Bool MHEG5CookieAdd (MHEG5cookie_t *cookie)
 Directly add a cookie to the store. More...
 
MHEG5Bool MHEG5CookieRetrieve (MHEG5cookie_t *cookie)
 Retrieve a specific cookie from the store, referenced by the identity string. More...
 
void MHEG5CookieClearStore (void)
 Delete all cookies from the temporary store. More...
 
void MHEG5CookieAckHeader (U8BIT *header)
 This function should be called once the header string returned by MHEG5CookieGenerateHeader has been used and is no longer needed. More...
 

Detailed Description

Functions relating to HTTP Cookie Store.

Date
22/02/2010
Author
Omri Barel

Function Documentation

void MHEG5CookieAckHeader ( U8BIT *  header)

This function should be called once the header string returned by MHEG5CookieGenerateHeader has been used and is no longer needed.

Parameters
headerpointer to the string to be released
Returns
nothing
MHEG5Bool MHEG5CookieAdd ( MHEG5cookie_t cookie)

Directly add a cookie to the store.

Parameters
cookiepointer to a structure containing all the required information to generate the cookie
Returns
MHEG5TRUE on success, MHEG5FALSE otherwise
void MHEG5CookieClearStore ( void  )

Delete all cookies from the temporary store.

Returns
nothing
U8BIT* MHEG5CookieGenerateHeader ( U8BIT *  url)

Generate a "Cookie" header for the required http request, containing all valid cookies.

Parameters
urlNULL terminated string containing the the url of the http request
Returns
Pointer to a NULL terminated string containing the Cookie header to be included in the http request. NULL if no cookies exist for the url.
void MHEG5CookieParse ( void *  data,
U32BIT  data_len,
char *  url 
)

Parse a Set-cookie header and add the new cookie to the store. If the header is not a set-cookie, or is not parseable it will be ignored.

Parameters
dataString containing the header to be parsed
data_lenLength of the header, in bytes
Returns
Nothing
MHEG5Bool MHEG5CookieRetrieve ( MHEG5cookie_t cookie)

Retrieve a specific cookie from the store, referenced by the identity string.

Parameters
cookiePointer to allocated cookie data structure, with its identity string set.
Returns
MHEG5TRUE if successful MHEG5FALSE otherwise