3 * Copyright (c) 2000-2012 Samsung Electronics Co., Ltd. All Rights Reserved.
5 * This file is part of msg-service.
7 * Contact: Jaeyun Jeong <jyjeong@samsung.com>
8 * Sangkoo Kim <sangkoo.kim@samsung.com>
9 * Seunghwan Lee <sh.cat.lee@samsung.com>
10 * SoonMin Jung <sm0415.jung@samsung.com>
11 * Jae-Young Lee <jy4710.lee@samsung.com>
12 * KeeBum Kim <keebum.kim@samsung.com>
14 * PROPRIETARY/CONFIDENTIAL
16 * This software is the confidential and proprietary information of
17 * SAMSUNG ELECTRONICS ("Confidential Information"). You shall not
18 * disclose such Confidential Information and shall use it only in
19 * accordance with the terms of the license agreement you entered
20 * into with SAMSUNG ELECTRONICS.
22 * SAMSUNG make no representations or warranties about the suitability
23 * of the software, either express or implied, including but not limited
24 * to the implied warranties of merchantability, fitness for a particular
25 * purpose, or non-infringement. SAMSUNG shall not be liable for any
26 * damages suffered by licensee as a result of using, modifying or
27 * distributing this software or its derivatives.
31 #ifndef MMSPLUGINHTTP_H
32 #define MMSPLUGINHTTP_H
37 #include "MmsPluginTypes.h"
40 #include <curl/curl.h>
51 class MmsPluginHttpAgent
54 static MmsPluginHttpAgent *instance();
57 void setHttpWaitingFlag(bool val);
58 bool getHttpWaitingFlag();
60 int cmdRequest(MMS_HTTP_CMD_TYPE_T cmdType);
62 int setSession(mmsTranQEntity *qEntity);
67 MMS_PLUGIN_HTTP_DATA_S *getHttpConfigData();
68 MMS_PLUGIN_HTTP_CONTEXT_S *getMmsPldCd();
70 MMS_PLUGIN_HTTP_DATA_S httpConfigData;
73 static MmsPluginHttpAgent *pInstance;
77 ~MmsPluginHttpAgent();
81 MMS_PLUGIN_HTTP_CONTEXT_S mmsPlgCd;
83 std::map<MMS_HTTP_CMD_TYPE_T,int(*)(MMS_PLUGIN_HTTP_DATA_S *)> httpCmdHandler;
87 #define MSG_MMS_HH_CONTENT_TYPE "application/vnd.wap.mms-message"
88 #define MSG_MMS_HH_ACCEPT "application/vnd.wap.mms-message, */*"
89 #define MSG_MMS_HH_CHARSET "utf-8"
90 #define MSG_MMS_HH_LANGUAGE "zh-cn, en"
91 #define MSG_MMS_HH_ENCODING "deflate,gzip"
93 #define MSG_MMS_HH_USER_AGENT "Tizen", "Mozilla/5.0 (Linux; U; Tizen 1.0; en-us) AppleWebKit/534.46 (KHTML, like Gecko) Mobile Tizen Browser/1.0"
94 #define MSG_MMS_WAP_PROFILE ""
96 typedef unsigned int MMS_HTTP_HEADER_FIELD_T;
98 enum _MMS_HTTP_HEADER_FIELD_E {
102 MMS_HH_ACCEPT_CHARSET,
103 MMS_HH_ACCEPT_LANGUAGE,
104 MMS_HH_ACCEPT_ENCODING,
108 void HttpHeaderInfo(curl_slist *responseHeaders, char *szUrl, int ulContentLen);
109 bool MsgMmsGetCustomHTTPHeader(MMS_HTTP_HEADER_FIELD_T httpHeaderItem, char *szHeaderBuffer);
110 void MsgMmsGetHost(char *szHost, int nBufferLen);