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;
61 char **file_name_array;
66 bt_transfer_info_t *transfer_info;
77 int _bt_opp_client_push_files(int request_id, GDBusMethodInvocation *context,
78 bluetooth_device_address_t *remote_address,
79 char **file_path, int file_count);
81 int _bt_opp_client_cancel_push(void);
83 int _bt_opp_client_cancel_all_transfers(void);
85 int _bt_opp_client_is_sending(gboolean *sending);
87 void _bt_sending_files(void);
89 void _bt_opc_disconnected(const char *session_path);
91 gboolean _bt_obex_client_progress(const char *transfer_path, int transferred);
93 gboolean _bt_obex_client_started(const char *transfer_path);
95 gboolean _bt_obex_client_completed(const char *transfer_path, gboolean success);
97 void _bt_opp_client_check_pending_transfer(const char *address);
101 #endif /* __cplusplus */
102 #endif /*_BT_SERVICE_OPP_CLIENT_H_*/