3bf137b8e4452f4a0de3a890d22a53cdd1f16698
[platform/framework/web/download-provider.git] / src / agent / include / download-agent-http-misc.h
1 /*
2  * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
3  *
4  * Licensed under the Apache License, Version 2.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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  */
16
17 #ifndef _Download_Agent_Http_Misc_H
18 #define _Download_Agent_Http_Misc_H
19
20 #include <string.h>
21
22 #include "download-agent-type.h"
23
24 #define SCHEME_HTTP             "http://"
25 #define SCHEME_HTTPS    "https://"
26 #define SCHEME_CID      "cid:"
27
28 #define METHOD_GET      "GET"
29 #define METHOD_POST     "POST"
30 #define METHOD_HEAD     "HEAD"
31
32 #define HTTP_TAG_UAGENT                 "User-Agent: "
33 #define HTTP_TAG_HOST                   "Host: "
34 #define HTTP_TAG_UAPROF                 "X-Wap-Profile: "
35 #define HTTP_TAG_CONTENT_LENGTH "Content-Length: "
36 #define HTTP_TAG_CONTENT_TYPE   "Content-Type: "
37 #define HTTP_TAG_IF_MATCH       "If-Match: "
38 #define HTTP_TAG_RANGE          "Range: "
39 #define HTTP_TAG_IF_RANGE       "If-Range: "
40
41 #define END_OF_FIELD            "\r\n"
42
43 char *get_user_agent();
44
45 da_bool_t is_supporting_protocol(const char *protocol);
46
47 #endif