0116c9236e48b172415c64dddb910c69e13a72ec
[framework/api/url-download.git] / include / url_download_private.h
1 /*
2  * Copyright (c) 2011 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
18 #ifndef __TIZEN_WEB_URL_DOWNLOAD_PRIVATE_H__
19 #define __TIZEN_WEB_URL_DOWNLOAD_PRIVATE_H__
20
21 #include <bundle.h>
22 #include <download-agent-interface.h>
23
24 #ifdef __cplusplus
25 extern "C"
26 {
27 #endif
28
29 typedef da_client_cb_t *url_download_agent_h;
30
31 /**
32  * url_download_cb_s
33  */
34 struct url_download_cb_s {
35         url_download_started_cb started;
36         void *started_user_data;
37
38         url_download_paused_cb paused;
39         void *paused_user_data;
40
41         url_download_completed_cb completed;
42         void *completed_user_data;
43
44         url_download_stopped_cb stopped;
45         void *stopped_user_data;
46
47         url_download_progress_cb progress;
48         void *progress_user_data;
49 };
50
51 struct url_download_s {
52         url_download_agent_h agent;
53         da_handle_t id;
54         struct url_download_cb_s callback;
55         url_download_state_e state;
56         char *url;
57         char *destination;
58         bundle *http_header;
59         char *completed_path;
60 };
61
62 #ifdef __cplusplus
63 }
64 #endif
65
66 #endif /* __TIZEN_WEB_URL_DOWNLOAD_PRIVATE_H__ */