5cbbee0f4935080ac74904711ca1b2361351a020
[platform/core/connectivity/bluetooth-frwk.git] / bt-api / include / bt-request-sender.h
1 /*
2  * bluetooth-frwk
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_REQUEST_SENDER_H_
21 #define _BT_REQUEST_SENDER_H_
22
23 #include <sys/types.h>
24 #include <glib.h>
25 #include <dbus/dbus-glib.h>
26
27 #ifdef __cplusplus
28 extern "C" {
29 #endif
30
31 typedef struct {
32         int service_function;
33         DBusGProxy *proxy;
34         DBusGProxyCall *proxy_call;
35         void *cb;
36         void *user_data;
37 } bt_req_info_t;
38
39 void _bt_deinit_proxys(void);
40
41 int _bt_send_request(int service_type, int service_function,
42                         GArray *in_param1, GArray *in_param2,
43                         GArray *in_param3, GArray *in_param4,
44                         GArray **out_param1);
45
46
47 int _bt_send_request_async(int service_type, int service_function,
48                         GArray *in_param1, GArray *in_param2,
49                         GArray *in_param3, GArray *in_param4,
50                         void *callback, void *user_data);
51
52
53 #ifdef __cplusplus
54 }
55 #endif
56
57 #endif /* _BT_REQUEST_SENDER_H_ */