[cleanup] revise file location
[platform/core/connectivity/bluetooth-share.git] / app / bt-share-notification.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 __DEF_BLUETOOTH_SHARE_NOTI_H_
21 #define __DEF_BLUETOOTH_SHARE_NOTI_H_
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 #include <glib.h>
28 #include <notification.h>
29 #include <tzplatform_config.h>
30
31 #include "bt-share-main.h"
32
33 #define NOTIFICATION_TEXT_LEN_MAX 100
34 #define NOTI_TR_TYPE_IN "inbound"
35 #define NOTI_TR_TYPE_OUT "outbound"
36 #define NOTI_OPS_APP_ID "bluetooth-share-opp-server"
37 #define NOTI_OPC_APP_ID "bluetooth-share-opp-client"
38
39 typedef enum {
40         BT_SENT_NOTI,
41         BT_SENT_FAILED_NOTI,
42         BT_SENDING_NOTI,
43         BT_RECEIVED_NOTI,
44         BT_RECEIVED_FAILED_NOTI,
45         BT_RECEIVING_NOTI,
46 } bt_notification_type_e;
47
48 typedef enum {
49         CREATE_PROGRESS,
50         CREATE_TR_LIST
51 } bt_notification_launch_type_e;
52
53 void _bt_insert_instant_notification(bt_notification_type_e type);
54
55 notification_h _bt_insert_notification(bt_appdata_t *ad,
56                 bt_notification_type_e type, char *dev_name,
57                 char *address, char *db_sid);
58
59 int _bt_update_notification(bt_appdata_t *ad, notification_h noti,
60                 char *title, char *content, char *dev_name, char *icon_path, char *opc_count);
61
62 int _bt_update_notification_progress(notification_h noti,
63                 int id,
64                 int val);
65
66 int _bt_get_notification_priv_id(notification_h noti);
67
68 int _bt_delete_notification(notification_h noti);
69
70 int _bt_set_notification_app_launch(notification_h noti, char *device_name,
71                 char *device_addr, char *db_sid,
72                 bt_notification_launch_type_e launch_type,
73                 const char *transfer_type,
74                 const char *filename,
75                 unsigned long size,
76                 const char *progress_cnt,
77                 int transfer_id);
78
79 #if 0
80 gboolean _bt_update_notification_status(bt_appdata_t *ad);
81 #endif
82
83 void _bt_register_notification_cb(bt_appdata_t *ad);
84
85 void _bt_unregister_notification_cb(bt_appdata_t *ad);
86
87 #ifdef __cplusplus
88 }
89 #endif
90 #endif                          /* __DEF_BLUETOOTH_SHARE_NOTI_H_ */