4 * Copyright (c) 2000 - 2012 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Jungki Kwak <jungki.kwak@samsung.com>, Keunsoon Lee <keunsoon.lee@samsung.com>
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
12 * http://www.apache.org/licenses/LICENSE-2.0
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.
20 * @file download-agent-http-misc.h
21 * @brief Including miscellaneous functions for http
22 * @author Keunsoon Lee(keunsoon.lee@samsung.com)
26 #ifndef _Download_Agent_Http_Misc_H
27 #define _Download_Agent_Http_Misc_H
31 #include "download-agent-type.h"
33 #define SCHEME_HTTP "http://"
34 #define SCHEME_HTTPS "https://"
35 #define SCHEME_CID "cid:"
37 #define METHOD_GET "GET"
38 #define METHOD_POST "POST"
39 #define METHOD_HEAD "HEAD"
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: "
50 #define END_OF_FIELD "\r\n"
52 char* get_user_agent();
54 da_bool_t is_supporting_protocol(const char* protocol);