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-mgr.h
21 * @brief Including functions regarding http mgr
22 * @author Keunsoon Lee(keunsoon.lee@samsung.com)
26 #ifndef _Download_Agent_Http_Mgr_H
27 #define _Download_Agent_Http_Mgr_H
31 #include "download-agent-type.h"
32 #include "download-agent-dl-mgr.h"
33 #include "download-agent-http-queue.h"
35 #define DA_MAX_SESSION_INFO DA_MAX_DOWNLOAD_ID
36 #define DA_MAX_TRANSACTION_INFO 10
37 #define DA_MAX_TRANSACTION_MUTEX DA_MAX_SESSION_INFO*DA_MAX_TRANSACTION_INFO
39 typedef struct _http_mgr_t
42 da_bool_t is_http_init;
45 extern http_mgr_t http_mgr;
47 da_result_t init_http_mgr(void);
48 void deinit_http_mgr(void);
49 da_result_t make_req_dl_info_http(stage_info *stage, req_dl_info *out_info);
50 da_result_t request_http_download(stage_info *stage);
51 da_result_t request_to_cancel_http_download(stage_info *stage);
52 da_result_t request_to_abort_http_download(stage_info *stage);
53 da_result_t request_to_suspend_http_download(stage_info *stage);
54 da_result_t request_to_resume_http_download(stage_info *stage);