b9698bbb7a9a4e78b08f6f1d64b071bc27c4b1db
[platform/framework/web/download-provider.git] / src / agent / include / download-agent-plugin-http-interface.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_Plugin_Http_Interface_H
18 #define _Download_Agent_Plugin_Http_Interface_H
19
20 #include "download-agent-type.h"
21 #include "download-agent-http-msg-handler.h"
22
23 typedef enum {
24         PI_HTTP_METHOD_GET = 1,
25         PI_HTTP_METHOD_POST = 2,
26         PI_HTTP_METHOD_HEAD = 3
27 } pi_http_method_t;
28
29
30 typedef struct _input_for_tranx_t {
31         pi_http_method_t http_method;
32
33         char *proxy_addr;
34         queue_t *queue;
35
36         http_msg_request_t* http_msg_request;
37 } input_for_tranx_t;
38
39
40
41 da_result_t  PI_http_init(void);
42 void PI_http_deinit(void);
43
44 da_result_t  PI_http_start_transaction(const input_for_tranx_t *input_for_tranx, int *out_tranx_id);
45 da_result_t  PI_http_cancel_transaction(int in_tranx_id, da_bool_t abort_option);
46 da_result_t  PI_http_disconnect_transaction(int in_tranx_id);
47 void PI_http_pause_transaction(int transaction_id);
48 void PI_http_unpause_transaction(int transaction_id);
49
50 #endif
51