2 * Copyright 2012 Samsung Electronics Co., Ltd
4 * Licensed under the Flora License, Version 1.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.tizenopensource.org/license
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
17 #ifndef MMSPLUGINHTTP_H
18 #define MMSPLUGINHTTP_H
23 #include "MmsPluginTypes.h"
36 class MmsPluginHttpAgent
39 static MmsPluginHttpAgent *instance();
41 int cmdRequest(MMS_HTTP_CMD_TYPE_T cmdType);
43 int setSession(mmsTranQEntity *qEntity);
49 MMS_PLUGIN_HTTP_DATA_S *getHttpConfigData();
50 MMS_PLUGIN_HTTP_CONTEXT_S *getMmsPldCd();
52 MMS_PLUGIN_HTTP_DATA_S httpConfigData;
55 static MmsPluginHttpAgent *pInstance;
58 ~MmsPluginHttpAgent();
60 MMS_PLUGIN_HTTP_CONTEXT_S mmsPlgCd;
62 std::map<MMS_HTTP_CMD_TYPE_T,int(*)(MMS_PLUGIN_HTTP_DATA_S *)> httpCmdHandler;
66 #define MSG_MMS_HH_CONTENT_TYPE "application/vnd.wap.mms-message"
67 #define MSG_MMS_HH_ACCEPT "application/vnd.wap.mms-message, */*"
68 #define MSG_MMS_HH_CHARSET "utf-8"
69 #define MSG_MMS_HH_LANGUAGE "zh-cn, en"
70 #define MSG_MMS_HH_ENCODING "deflate,gzip"
72 #define MSG_MMS_HH_USER_AGENT "Mozilla/5.0 (Linux; U; Tizen 1.0; en-us) AppleWebKit/534.46 (KHTML, like Gecko) Mobile Tizen Browser/1.0"
73 #define MSG_MMS_WAP_PROFILE ""
75 typedef unsigned int MMS_HTTP_HEADER_FIELD_T;
78 enum _MMS_HTTP_HEADER_FIELD_E {
82 MMS_HH_ACCEPT_CHARSET,
83 MMS_HH_ACCEPT_LANGUAGE,
84 MMS_HH_ACCEPT_ENCODING,