[cleanup] revise file location
[platform/core/connectivity/bluetooth-share.git] / app / obex-event-handler.h
1 /*
2  * bluetooth-share
3  *
4  * Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
5  *
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
9  *
10  *              http://www.apache.org/licenses/LICENSE-2.0
11  *
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.
17  *
18  */
19
20 #ifndef __BT_EVENT_HANDLER_H__
21 #define __BT_EVENT_HANDLER_H__
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include "bluetooth-api.h"
28 #include "bt-share-main.h"
29 #include "bt-share-common.h"
30
31 #define BT_FILE_PATH_LEN_MAX    (4096 + 10)
32 #define BT_TEMP_FILE_PATH_LEN_MAX 262
33 #define BT_TEXT_LEN_MAX 255
34 #define BLUETOOTH_DEVICE_NAME_LENGTH_MAX 248 /**< This specifies maximum device name length */
35
36 typedef enum {
37         BT_FILE_IMAGE,  /**<IMAGE */
38         BT_FILE_VCARD,  /**<VCARD */
39         BT_FILE_VCAL,   /**<VCAL */
40         BT_FILE_VBOOKMARK,      /**<VBOOKMARK */
41         BT_FILE_VMEMO,
42         BT_FILE_DOC,    /**<DOC, */
43         BT_FILE_OTHER   /**<OTHER*/
44 } bt_file_type_e;
45
46 typedef struct {
47         int id;
48         char *address;
49         char *device_name;
50         char *db_sid;
51         bt_transfer_status_info_t recv_data;
52 } bt_device_rcv_noti_info_t;
53
54 typedef struct {
55         char address[BT_ADDRESS_STRING_SIZE];
56         char device_name[BLUETOOTH_DEVICE_NAME_LENGTH_MAX];
57         char *db_sid;
58         notification_h send_noti;
59         bt_transfer_status_info_t send_data;
60 } bt_device_snd_noti_info_t;
61
62 extern bt_obex_server_authorize_into_t server_auth_info;
63
64 void _bt_clear_receive_noti_list(void);
65
66 void _bt_share_event_handler(int event, bluetooth_event_param_t *param,
67                                void *user_data);
68
69 void _bt_obex_cancel_transfer(void *data);
70
71 void _bt_obex_server_event_handler(int event,
72                                        bluetooth_event_param_t *param,
73                                        void *user_data);
74
75 void _bt_app_obex_download_dup_file_cb(void *data, void *obj,
76                                        void *event_info);
77
78 void _bt_free_auth_info();
79
80 #ifdef __cplusplus
81 }
82 #endif
83 #endif                          /* __BT_EVENT_HANDLER_H__ */