2 * Copyright (c) 2011 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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.
19 #ifndef _BT_REQUEST_HANDLER_H_
20 #define _BT_REQUEST_HANDLER_H_
22 #include <sys/types.h>
24 #include <glib-object.h>
26 #include "bt-internal-types.h"
32 #define BT_SERVICE_NAME "org.projectx.bt"
33 #define BT_SERVICE_PATH "/org/projectx/bt_service"
35 /* Invocation information structure for API's
36 + expecting replies from bluetooth service */
40 GDBusMethodInvocation *context;
45 GSList *_bt_get_invocation_list(void);
47 void _bt_save_invocation_context(GDBusMethodInvocation *invocation, int result,
48 char *sender, int service_function,
49 gpointer invocation_data);
51 void _bt_free_info_from_invocation_list(invocation_info_t *req_info);
53 void _bt_service_unref_connection(void);
55 int _bt_service_register(void);
57 void _bt_service_unregister(void);
59 int _bt_service_cynara_init(void);
61 void _bt_service_cynara_deinit(void);
63 void _bt_service_method_return(GDBusMethodInvocation *invocation,
64 GArray *out_param, int result);
66 void _bt_service_method_return_with_unix_fd_list(GDBusMethodInvocation *invocation,
67 GArray *out_param, int result, GUnixFDList *fd_list);
69 gboolean _is_name_acquired(void);
73 #endif /* __cplusplus */
74 #endif /*_BT_REQUEST_HANDLER_H_*/