The download provider daemon is added newly.
[profile/ivi/download-provider.git] / src / agent / include / download-agent-http-misc.h
1 /*
2  * Download Agent
3  *
4  * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact: Jungki Kwak <jungki.kwak@samsung.com>, Keunsoon Lee <keunsoon.lee@samsung.com>
7  *
8  * Licensed under the Apache License, Version 2.0 (the "License");
9  * you may not use this file except in compliance with the License.
10  * You may obtain a copy of the License at
11  *
12  *     http://www.apache.org/licenses/LICENSE-2.0
13  *
14  * Unless required by applicable law or agreed to in writing, software
15  * distributed under the License is distributed on an "AS IS" BASIS,
16  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17  * See the License for the specific language governing permissions and
18  * limitations under the License.
19  *
20  * @file                download-agent-http-misc.h
21  * @brief               Including miscellaneous functions for http
22  * @author              Keunsoon Lee(keunsoon.lee@samsung.com)
23  ***/
24
25
26 #ifndef _Download_Agent_Http_Misc_H
27 #define _Download_Agent_Http_Misc_H
28
29 #include <string.h>
30
31 #include "download-agent-type.h"
32
33 #define SCHEME_HTTP             "http://"
34 #define SCHEME_HTTPS    "https://"
35 #define SCHEME_CID      "cid:"
36
37 #define METHOD_GET      "GET"
38 #define METHOD_POST     "POST"
39 #define METHOD_HEAD     "HEAD"
40
41 #define HTTP_TAG_UAGENT                 "User-Agent: "
42 #define HTTP_TAG_HOST                   "Host: "
43 #define HTTP_TAG_UAPROF                 "X-Wap-Profile: "
44 #define HTTP_TAG_CONTENT_LENGTH "Content-Length: "
45 #define HTTP_TAG_CONTENT_TYPE   "Content-Type: "
46 #define HTTP_TAG_IF_MATCH       "If-Match: "
47 #define HTTP_TAG_RANGE          "Range: "
48 #define HTTP_TAG_IF_RANGE       "If-Range: "
49
50 #define END_OF_FIELD            "\r\n"
51
52 char* get_user_agent();
53
54 da_bool_t is_supporting_protocol(const char* protocol);
55
56 #endif