Code Sync [Tizen3.0]: Merged the tizen_2.4 Spin code to tizen.org
[platform/core/connectivity/bluetooth-frwk.git] / bt-service / include / bt-service-rfcomm-client.h
1 /*
2  * Bluetooth-frwk
3  *
4  * Copyright (c) 2000 - 2011 Samsung Electronics Co., Ltd. All rights reserved.
5  *
6  * Contact:  Hocheol Seo <hocheol.seo@samsung.com>
7  *               Girishashok Joshi <girish.joshi@samsung.com>
8  *               Chanyeol Park <chanyeol.park@samsung.com>
9  *
10  * Licensed under the Apache License, Version 2.0 (the "License");
11  * you may not use this file except in compliance with the License.
12  * You may obtain a copy of the License at
13  *
14  *              http://www.apache.org/licenses/LICENSE-2.0
15  *
16  * Unless required by applicable law or agreed to in writing, software
17  * distributed under the License is distributed on an "AS IS" BASIS,
18  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19  * See the License for the specific language governing permissions and
20  * limitations under the License.
21  *
22  */
23
24 #ifndef _BT_SERVICE_RFCOMM_CLIENT_H_
25 #define _BT_SERVICE_RFCOMM_CLIENT_H_
26
27 #include <glib.h>
28 #include <sys/types.h>
29 #include "bluetooth-api.h"
30
31 #ifdef __cplusplus
32 extern "C" {
33 #endif
34
35 int _bt_rfcomm_connect_using_uuid(int request_id,
36                         bluetooth_device_address_t *device_address,
37                         char *remote_uuid);
38
39 int _bt_rfcomm_connect_using_channel(int request_id,
40                         bluetooth_device_address_t *device_address,
41                         char *channel);
42
43 int _bt_rfcomm_disconnect(int socket_fd);
44
45 int _bt_rfcomm_write(int socket_fd, char *buf, int length);
46
47 int _bt_rfcomm_cancel_connect(void);
48
49 int _bt_rfcomm_is_device_connected(bluetooth_device_address_t *device_address,
50                                         gboolean *connected);
51
52 int _bt_rfcomm_is_connected(gboolean *connected);
53
54 int _bt_rfcomm_client_disconnect_all(void);
55
56 #ifdef __cplusplus
57 }
58 #endif /* __cplusplus */
59 #endif /*_BT_SERVICE_RFCOMM_CLIENT_H_*/
60