2 * Copyright (c) 2012 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
17 #ifndef DOWNLOAD_PROVIDER2_SOCKET_H
18 #define DOWNLOAD_PROVIDER2_SOCKET_H
20 #include "download-provider.h"
21 #include "download-provider-slots.h"
23 int dp_ipc_send_errorcode(int fd, dp_error_type errorcode);
24 int dp_ipc_send_event(int fd, int id, dp_state_type state,
25 dp_error_type errorcode, unsigned long long received_size);
27 int dp_ipc_send_progressinfo(int fd, int id,
28 unsigned long long received_size, unsigned long long file_size,
29 unsigned int chunk_size);
30 int dp_ipc_send_stateinfo(int fd, int id, dp_state_type state,
31 dp_error_type errorcode);
33 char *dp_ipc_read_string(int fd);
34 int dp_ipc_send_string(int fd, const char *str);
35 int dp_ipc_send_custom_type(int fd, void *value, size_t type_size);
36 int dp_ipc_read_custom_type(int fd, void *value, size_t type_size);
37 int dp_accept_socket_new();
38 int dp_socket_free(int sockfd);