Tizen 2.1 base
[platform/framework/web/download-provider.git] / provider / include / download-provider-request.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_PROVIDER2_REQUEST_H
18 #define DOWNLOAD_PROVIDER2_REQUEST_H
19
20 #include "download-provider.h"
21
22 // for Debugging
23 char *dp_print_state(dp_state_type state);
24 char *dp_print_errorcode(dp_error_type errorcode);
25
26 char *dp_strdup(char *src);
27
28 dp_error_type dp_request_create(int id, dp_client_group *group, dp_request** empty_slot);
29 dp_error_type dp_request_set_url(int id, dp_request *request, char *url);
30 dp_error_type dp_request_set_destination(int id, dp_request *request, char *dest);
31 dp_error_type dp_request_set_filename(int id, dp_request *request, char *filename);
32 dp_error_type dp_request_set_notification(int id, dp_request *request, unsigned enable);
33 dp_error_type dp_request_set_auto_download(int id, dp_request *request, unsigned enable);
34 dp_error_type dp_request_set_state_event(int id, dp_request *request, unsigned enable);
35 dp_error_type dp_request_set_progress_event(int id, dp_request *request, unsigned enable);
36 dp_error_type dp_request_set_network_type(int id, dp_request *request, int type);
37 char *dp_request_get_url(int id, dp_request *request, dp_error_type *errorcode);
38 char *dp_request_get_destination(int id, dp_request *request, dp_error_type *errorcode);
39 char *dp_request_get_filename(int id, dp_request *request, dp_error_type *errorcode);
40 char *dp_request_get_contentname(int id, dp_request *request, dp_error_type *errorcode);
41 char *dp_request_get_etag(int id, dp_request *request, dp_error_type *errorcode);
42 char *dp_request_get_savedpath(int id, dp_request *request, dp_error_type *errorcode);
43 char *dp_request_get_tmpsavedpath(int id, dp_request *request, dp_error_type *errorcode);
44 char *dp_request_get_mimetype(int id, dp_request *request, dp_error_type *errorcode);
45 dp_request *dp_request_load_from_log(int id, dp_error_type *errorcode);
46 #endif