4 * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
10 * http://www.apache.org/licenses/LICENSE-2.0
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
20 #ifndef __DEF_BLUETOOTH_SHARE_IPC_H_
21 #define __DEF_BLUETOOTH_SHARE_IPC_H_
28 #include "bluetooth-api.h"
29 #include "bt-share-main.h"
31 #define BT_BLUEZ_INTERFACE "org.freedesktop.DBus"
32 #define BT_BLUEZ_SIGNAL_NAME_OWNER_CHANGED "NameOwnerChanged"
34 #define BT_SYSPOPUP_INTERFACE "User.Bluetooth.syspopup"
35 #define BT_SYSPOPUP_METHOD_RESPONSE "Response"
37 #define BT_UG_IPC_INTERFACE "User.Bluetooth.UG"
38 #define BT_UG_IPC_METHOD_SEND "Send"
40 #define BT_SHARE_UI_INTERFACE "User.BluetoothShare.UI"
41 #define BT_SHARE_UI_SIGNAL_OPPABORT "opp_abort"
42 #define BT_SHARE_UI_SIGNAL_SEND_FILE "send_file"
43 #define BT_SHARE_UI_SIGNAL_INFO_UPDATE "info_update"
45 #define BT_SHARE_ENG_INTERFACE "User.BluetoothShare.Engine"
46 #define BT_SHARE_ENG_OBJECT "/org/projectx/transfer_info"
47 #define BT_SHARE_ENG_SIGNAL_UPDATE_VIEW "update_view"
48 #define BT_SHARE_ENG_SIGNAL_OPP_CLIENT_DISCONNECTED "ShareOppClientDisconnected"
49 #define BT_SHARE_ENG_SIGNAL_OPP_SERVER_DISCONNECTED "ShareOppServerDisconnected"
50 #define BT_SHARE_FRWK_INTERFACE "User.Bluetooth.FRWK"
51 #define BT_SHARE_FRWK_SIGNAL_DEINIT "deinit"
53 #define BT_CORE_NAME "org.projectx.bt_core"
54 #define BT_CORE_PATH "/org/projectx/bt_core"
55 #define BT_CORE_INTERFACE "org.projectx.btcore"
57 #define BT_IPC_STRING_SIZE 256
58 #define BT_ADDR_STR_LEN_MAX 18
59 #define BT_MIME_TYPE_MAX_LEN 20
61 #define BT_INBOUND_TABLE "inbound"
62 #define BT_OUTBOUND_TABLE "outbound"
78 char addr[BLUETOOTH_ADDRESS_LENGTH];
79 char name[BLUETOOTH_DEVICE_NAME_LENGTH_MAX];
85 } opc_transfer_info_t;
87 gboolean _bt_init_dbus_signal(void);
88 void _bt_deinit_dbus_signal(void);
90 void _remove_transfer_info(opc_transfer_info_t *node);
92 void _bt_create_warning_popup(int error_type, char *msg);
93 gboolean _bt_update_sent_data_status(int uid,
94 bt_app_tr_status_e status, char *db_sid);
96 gboolean _bt_update_recv_data_status(int uid,
97 bt_app_tr_status_e status, char *db_sid,
98 unsigned int filesize, const char *mime_type);
100 gboolean _bt_update_multiple_sent_data_status(int *uids, int uid_cnt,
101 bt_app_tr_status_e status, char *db_sid);
103 void _bt_update_transfer_list_view(char *db);
104 void _bt_send_disconnected_signal(char *signal, int result, char *address,
106 gboolean _bt_add_recv_transfer_status_data(char *device_name,
107 char *address, char *filepath, char *type,
108 unsigned int size, int status, char *db_sid);
109 int _bt_share_get_unique_id(int db_table, const char *db_sid);
110 int _bt_set_eventsystem_transfer_value(gboolean value);
115 #endif /* __DEF_BLUETOOTH_SHARE_IPC_H_ */