4 * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
6 * Contact: Hocheol Seo <hocheol.seo@samsung.com>
7 * Girishashok Joshi <girish.joshi@samsung.com>
8 * Chanyeol Park <chanyeol.park@samsung.com>
10 * Licensed under the Apache License, Version 2.0 (the "License");
11 * you may not use this file except in compliance with the License.
12 * You may obtain a copy of the License at
14 * http://www.apache.org/licenses/LICENSE-2.0
16 * Unless required by applicable law or agreed to in writing, software
17 * distributed under the License is distributed on an "AS IS" BASIS,
18 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19 * See the License for the specific language governing permissions and
20 * limitations under the License.
25 #ifndef _BT_SERVICE_OPP_CLIENT_H_
26 #define _BT_SERVICE_OPP_CLIENT_H_
29 #include <sys/types.h>
30 #include "bluetooth-api.h"
31 #include "bt-internal-types.h"
37 #define BT_OBEX_CLIENT_AGENT_PATH "/org/obex/client_agent"
40 BT_TRANSFER_STATUS_QUEUED = 0x00,
41 BT_TRANSFER_STATUS_STARTED,
42 BT_TRANSFER_STATUS_PROGRESS,
43 BT_TRANSFER_STATUS_COMPLETED,
44 } bt_transfer_status_t;
47 char path[BT_FILE_PATH_MAX];
52 DBusGProxy *properties_proxy;
56 bt_transfer_status_t transfer_status;
66 char **file_name_array;
71 DBusGProxyCall *sending_proxy;
72 bt_transfer_info_t *transfer_info;
83 int _bt_opp_client_push_files(int request_id, DBusGMethodInvocation *context,
84 bluetooth_device_address_t *remote_address,
85 char **file_path, int file_count);
87 int _bt_opp_client_cancel_push(void);
89 int _bt_opp_client_cancel_all_transfers(void);
91 int _bt_opp_client_is_sending(gboolean *sending);
93 void _bt_sending_files(void);
95 void _bt_opc_disconnected(const char *session_path);
97 gboolean _bt_obex_client_progress(const char *transfer_path, int transferred);
99 gboolean _bt_obex_client_started(const char *transfer_path);
101 gboolean _bt_obex_client_completed(const char *transfer_path, gboolean success);
103 void _bt_opp_client_check_pending_transfer(const char *address);
107 #endif /* __cplusplus */
108 #endif /*_BT_SERVICE_OPP_CLIENT_H_*/