2 * Copyright (c) 2011 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.
19 #ifndef _BT_SERVICE_OPP_CLIENT_H_
20 #define _BT_SERVICE_OPP_CLIENT_H_
23 #include <sys/types.h>
25 #include "bluetooth-api.h"
26 #include "bt-internal-types.h"
32 #define BT_OBEX_CLIENT_AGENT_PATH "/org/obex/client_agent"
35 BT_TRANSFER_STATUS_QUEUED = 0x00,
36 BT_TRANSFER_STATUS_STARTED,
37 BT_TRANSFER_STATUS_PROGRESS,
38 BT_TRANSFER_STATUS_COMPLETED,
39 } bt_transfer_status_t;
42 char path[BT_FILE_PATH_MAX];
47 GDBusProxy *properties_proxy;
51 bt_transfer_status_t transfer_status;
62 char **file_name_array;
67 bt_transfer_info_t *transfer_info;
78 int _bt_opp_client_push_files(int request_id, GDBusMethodInvocation *context,
79 bluetooth_device_address_t *remote_address,
80 char **file_path, int file_count);
82 int _bt_opp_client_cancel_push(void);
84 int _bt_opp_client_cancel_all_transfers(void);
86 int _bt_opp_client_is_sending(gboolean *sending);
88 void _bt_sending_files(void);
90 void _bt_opc_disconnected(const char *session_path);
92 gboolean _bt_obex_client_progress(const char *transfer_path, guint64 transferred);
94 gboolean _bt_obex_client_started(const char *transfer_path);
96 gboolean _bt_obex_client_completed(const char *transfer_path, gboolean success);
98 void _bt_opp_client_check_pending_transfer(const char *address);
100 int _bt_opp_get_client_progress(guint8 *progress);
102 void _bt_cancel_queued_transfers(void);
105 #endif /* __cplusplus */
106 #endif /*_BT_SERVICE_OPP_CLIENT_H_*/