Remove old bt-service files
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / services / obex / include / bt-service-obex-agent.h
1 /*
2  * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
3  *
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
7  *
8  *              http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #ifndef __BT_SERVICE_OBEX_AGENT_H
19 #define __BT_SERVICE_OBEX_AGENT_H
20
21 #include <glib-object.h>
22
23 #ifdef __cplusplus
24 extern "C" {
25 #endif
26
27 typedef enum {
28         BT_AGENT_EVENT_PIN_REQUEST,
29         BT_AGENT_EVENT_PASSKEY_CONFIRM_REQUEST,
30         BT_AGENT_EVENT_PASSKEY_AUTO_ACCEPTED,
31         BT_AGENT_EVENT_PASSKEY_REQUEST,
32         BT_AGENT_EVENT_PASSKEY_DISPLAY_REQUEST,
33         BT_AGENT_EVENT_AUTHORIZE_REQUEST,
34         BT_AGENT_EVENT_CONFIRM_MODE_REQUEST,
35         BT_AGENT_EVENT_APP_CONFIRM_REQUEST,
36         BT_AGENT_EVENT_FILE_RECEIVED,
37         BT_AGENT_EVENT_KEYBOARD_PASSKEY_REQUEST,
38         BT_AGENT_EVENT_SECURITY,
39         BT_AGENT_EVENT_TERMINATE,
40         BT_AGENT_EVENT_EXCHANGE_REQUEST,
41         BT_AGENT_EVENT_PBAP_REQUEST,
42         BT_AGENT_EVENT_MAP_REQUEST,
43         BT_AGENT_EVENT_SYSTEM_RESET_REQUEST,
44         BT_AGENT_EVENT_LEGACY_PAIR_FAILED_FROM_REMOTE,
45 } bt_agent_event_type_t;
46
47 typedef enum {
48         BT_OBEX_AGENT_ERROR_REJECT,
49         BT_OBEX_AGENT_ERROR_CANCEL,
50         BT_OBEX_AGENT_ERROR_TIMEOUT,
51 } bt_agent_error_t;
52
53 G_BEGIN_DECLS
54 typedef struct {
55         GObject parent;
56 } BtObexAgent;
57
58 typedef struct {
59         GObjectClass parent_class;
60 } BtObexAgentClass;
61
62 GType bt_obex_agent_get_type(void);
63
64 #define BT_OBEX_TYPE_AGENT (bt_obex_agent_get_type())
65 #define BT_OBEX_AGENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), BT_OBEX_TYPE_AGENT, BtObexAgent))
66 #define BT_OBEX_AGENT_CLASS(agent_class) (G_TYPE_CHECK_CLASS_CAST((agent_class), BT_OBEX_TYPE_AGENT, BtObexAgentClass))
67 #define BT_OBEX_GET_AGENT_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), BT_OBEX_TYPE_AGENT, BtObexAgentClass))
68
69 typedef gboolean(*bt_obex_authorize_cb)(GDBusMethodInvocation *context,
70                                            const char *path,
71                                            gpointer data);
72
73 typedef gboolean(*bt_obex_request_cb)(GDBusMethodInvocation *context,
74                                 GDBusProxy *transfer,
75                                 gpointer data);
76
77 typedef gboolean(*bt_obex_progress_cb)(GDBusMethodInvocation *context,
78                                 GDBusProxy *transfer,
79                                 guint64 transferred,
80                                 gpointer data);
81
82 typedef gboolean(*bt_obex_error_cb)(GDBusMethodInvocation *context,
83                                 GDBusProxy *transfer,
84                                 const char *message,
85                                 gpointer data);
86
87 typedef gboolean(*bt_obex_complete_cb)(GDBusMethodInvocation *context,
88                                 GDBusProxy *transfer,
89                                 gpointer data);
90
91 typedef gboolean(*bt_obex_release_cb)(GDBusMethodInvocation *context,
92                                 gpointer data);
93
94 G_END_DECLS
95
96 void _bt_obex_set_authorize_cb(char *object_path,
97                          bt_obex_authorize_cb func,
98                          gpointer data);
99
100 void _bt_obex_set_request_cb(char *object_path,
101                        bt_obex_request_cb func,
102                        gpointer data);
103
104 void _bt_obex_set_progress_cb(char *object_path,
105                         bt_obex_progress_cb func,
106                         gpointer data);
107
108 void _bt_obex_set_error_cb(char *object_path,
109                         bt_obex_error_cb func,
110                         gpointer data);
111
112 void _bt_obex_set_complete_cb(char *object_path,
113                         bt_obex_complete_cb func,
114                         gpointer data);
115
116 void _bt_obex_set_release_cb(char *object_path,
117                        bt_obex_release_cb func,
118                        gpointer data);
119
120 void _bt_obex_agent_new(char *path);
121
122 void _bt_obex_agent_destroy(char *path);
123
124 gboolean _bt_obex_setup(const char *path);
125
126 #ifdef __cplusplus
127 }
128 #endif /* __cplusplus */
129
130 #endif /* __BT_SERVICE_OBEX_AGENT_H */