MHEG5  15.3.0
source/http/inc/http_platform.h
Go to the documentation of this file.
00001 /*******************************************************************************
00002  * Copyright © 2014 The DTVKit Open Software Foundation Ltd (www.dtvkit.org)
00003  * Copyright © 2010 Ocean Blue Software Ltd
00004  *
00005  * This file is part of a DTVKit Software Component
00006  * You are permitted to copy, modify or distribute this file subject to the terms
00007  * of the DTVKit 1.0 Licence which can be found in licence.txt or at www.dtvkit.org
00008  * 
00009  * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND,
00010  * EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED WARRANTIES
00011  * OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.
00012  * 
00013  * If you or your organisation is not a member of DTVKit then you have access
00014  * to this source code outside of the terms of the licence agreement
00015  * and you are expected to delete this and any associated files immediately.
00016  * Further information on DTVKit, membership and terms can be found at www.dtvkit.org
00017  *******************************************************************************/
00025 #ifndef _PM_HTTP_H
00026 #define _PM_HTTP_H
00027 
00028 
00029 /*---includes for this file--------------------------------------------------*/
00030 #include <techtype.h>
00031 #include <httptype.h>
00032 
00033 /*---Constant and macro definitions for public use---------------------------*/
00034 
00035 /*---Enumerations for public use---------------------------------------------*/
00036 
00037 /*---Global type defs for public use-----------------------------------------*/
00038 
00039 /* HTTP request type */
00040 typedef enum
00041 {
00042    HTTP_REQUEST_GET,
00043    HTTP_REQUEST_HEAD,
00044    HTTP_REQUEST_POST,
00045    HTTP_REQUEST_STREAM
00046 } E_HttpRequestType;
00047 
00048 /*---Global variable declarations for public use-----------------------------*/
00049 
00050 /*---Global Function prototypes for public use-------------------------------*/
00051 
00057 E_HttpErr HP_Initialise(void);
00058 
00059 
00067 E_HttpErr HP_SetUserAgent(U8BIT *user_agent);
00068 
00069 
00082 E_HttpErr HP_SetTimeout(U16BIT timeout);
00083 
00084 
00098 E_HttpErr HP_CreateRequest(U8BIT *url, E_HttpRequestType type,
00099    void **handle);
00100 
00101 
00109 E_HttpErr HP_StartRequest(void *handle);
00110 
00111 
00119 E_HttpErr HP_ResumeRequest(void *handle);
00120 
00121 
00129 E_HttpErr HP_StopRequest(void *handle);
00130 
00131 
00139 E_HttpErr HP_DestroyRequest(void *handle);
00140 
00141 
00150 E_HttpErr HP_SetUserData(void *handle, void *userdata);
00151 
00152 
00161 E_HttpErr HP_AddHeader(void *handle, U8BIT *header);
00162 
00163 
00172 E_HttpErr HP_SetPostData(void *handle, U8BIT *postdata);
00173 
00174 
00183 E_HttpErr HP_SetRange(void *handle, U8BIT *range);
00184 
00185 
00194 E_HttpErr HP_GetRedirectUrl(void *handle, U8BIT **url);
00195 
00196 
00205 E_HttpErr HP_AddTlsCertificate(U8BIT *cert, U32BIT len);
00206 
00207 
00213 E_HttpErr HP_ClearTlsCertificates(void);
00214 
00215 
00224 E_HttpErr HP_WaitForAction(void);
00225 
00226 
00235 E_HttpErr HP_Process(U16BIT *active_count);
00236 
00237 
00247 void HP_HeaderCallback(void *userdata, S32BIT response_code,
00248    U8BIT *data, U32BIT len);
00249 
00250 
00262 BOOLEAN HP_ContentCallback(void *userdata, U8BIT *data, U32BIT len);
00263 
00264 
00272 void HP_EndCallback(void *userdata, E_HttpStatus status);
00273 
00274 
00280 E_HttpErr HP_Terminate(void);
00281 
00282 
00283 #endif /*_PM_HTTP_H*/
 All Data Structures Files Functions Variables Typedefs Defines