![]() |
D.I.T. ( Do It Tizen! )
1.0.0
Samsung Software Membership
|
Bluetooth API 를 사용하기 위해 포함해야 하는 헤더이다. More...
#include <stdbool.h>#include <stdalign.h>#include "dit.h"#include <glib.h>#include <bluetooth.h>

Data Structures | |
| struct | Bluetooth |
| Bluetooth 모듈에 대한 구조체이다. Bluetooth 모듈은 다양한 방식으로 Bluetooth 통신을 할 수 있다. More... | |
| struct | BluetoothExtends |
Functions | |
| const char * | BluetoothErrorCheck (int errCode) |
| Bluetooth API에서 발생하는 Error Code들을 확인 해준다. More... | |
| Bluetooth | NewBluetooth (void) |
| 새로운 Bluetooth 객체를 생성한다. More... | |
| void | DestroyBluetooth (Bluetooth this_gen) |
| 생성한 Bluetooth 객체를 소멸 시킨다. More... | |
| bool | isBluetoothAccessible (Bluetooth this_gen) |
| 현재 Bluetooth 기능 지원 여부를 반환 한다. More... | |
| bool | onBluetoothConnect (Bluetooth this_gen) |
| Bluetooth기기로 연결을 시도하며 이의 성공 여부를 반환한다. More... | |
| bool | isBluetoothConnected (Bluetooth this_gen) |
| Bluetooth기기와의 연결 상태를 확인한다. More... | |
| bool | onBluetoothDisconnect (Bluetooth this_gen) |
| Bluetooth기기로 연결을 해제하며 이의 성공 여부를 반환한다. More... | |
| bool | BluetoothFileSend (Bluetooth this_gen, String sendbuffer) |
| Bluetooth기기로 데이터를 송신한다. More... | |
| bool | BluetoothFileRecv (Bluetooth this_gen, String *recvBuffer) |
| Bluetooth기기로 부터 데이터를 수신한다. More... | |
Bluetooth API 를 사용하기 위해 포함해야 하는 헤더이다.
| struct BluetoothExtends |

| Data Fields | ||
|---|---|---|
| bool | accessible | |
| struct _Bluetooth | bluetooth | |
| bool | connected | |
| String | remoteMACAddr | |
| const char * BluetoothErrorCheck | ( | int | errCode | ) |
Bluetooth API에서 발생하는 Error Code들을 확인 해준다.
| [in] | errCode | 확인 하고자 하는 Error Code |
| [out] | null |
| BT_ERROR_NONE | : Successful |
| BT_ERROR_CANCELLED | : Operation cancelled |
| BT_ERROR_INVALID_PARAMETER | : Invalid parameter |
| BT_ERROR_OUT_OF_MEMORY | : Out of memory |
| BT_ERROR_RESOURCE_BUSY | : Device or resource busy |
| BT_ERROR_TIMED_OUT | : Timeout error |
| BT_ERROR_NOW_IN_PROGRESS | : Operation now in progress |
| BT_ERROR_NOT_SUPPORTED | : Not Supported |
| BT_ERROR_PERMISSION_DENIED | : Permission denied |
| BT_ERROR_QUOTA_EXCEEDED | : Quota exceeded |
| BT_ERROR_NOT_INITIALIZED | : Local adapter not initialized |
| BT_ERROR_NOT_ENABLED | : Local adapter not enabled |
| BT_ERROR_ALREADY_DONE | : Operation already done |
| BT_ERROR_OPERATION_FAILED | : Operation failed |
| BT_ERROR_NOT_IN_PROGRESS | : Operation not in progress |
| BT_ERROR_REMOTE_DEVICE_NOT_BONDED | : Remote device not bonded |
| BT_ERROR_AUTH_REJECTED | : Authentication rejected |
| BT_ERROR_AUTH_FAILED | : Authentication failed |
| BT_ERROR_REMOTE_DEVICE_NOT_FOUND | : Remote device not found |
| BT_ERROR_SERVICE_SEARCH_FAILED | : Service search failed |
| BT_ERROR_REMOTE_DEVICE_NOT_CONNECTED | : Remote device is not connected |
| BT_ERROR_AGAIN | : Resource temporarily unavailable |
| BT_ERROR_SERVICE_NOT_FOUND | : Service Not Found |
| BT_ERROR_UNKNWON | : Unknown error occurred |

| bool BluetoothFileRecv | ( | Bluetooth | this_gen, |
| String * | recvBuffer | ||
| ) |
Bluetooth기기로 부터 데이터를 수신한다.
| [in] | this_gen | 데이터를 수신할 Bluetooth 객체 |
| [in] | recvBuffer | 수신할 데이터 주소 |
| [out] | recvBuffer | 수신한 데이터 |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| bool BluetoothFileSend | ( | Bluetooth | this_gen, |
| String | sendbuffer | ||
| ) |
Bluetooth기기로 데이터를 송신한다.
| [in] | this_gen | 데이터를 송신할 Bluetooth 객체 |
| [in] | sendbuffer | 송신할 파일 path |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |


| void DestroyBluetooth | ( | Bluetooth | this_gen | ) |
생성한 Bluetooth 객체를 소멸 시킨다.
| [in] | this_gen | 소멸시킬 Bluetooth 객체 |
| [out] | null |
| void |
| bool isBluetoothAccessible | ( | Bluetooth | this_gen | ) |
현재 Bluetooth 기능 지원 여부를 반환 한다.
| [in] | this_gen | 사용 가능 여부를 반환 할 Bluetooth 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
true, 지원 가능이 아니라면 false를 반환한다. 

| bool isBluetoothConnected | ( | Bluetooth | this_gen | ) |
Bluetooth기기와의 연결 상태를 확인한다.
| [in] | this_gen | 연결 상태를 확인할 Bluetooth 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
true, 연결되어 있지 않다면 false를 반환한다. 
| Bluetooth NewBluetooth | ( | void | ) |
새로운 Bluetooth 객체를 생성한다.
| [in] | void | |
| [out] | null |
| Bluetooth |

| bool onBluetoothConnect | ( | Bluetooth | this_gen | ) |
Bluetooth기기로 연결을 시도하며 이의 성공 여부를 반환한다.
| [in] | this_gen | 연결 성공 여부를 확인할 Bluetooth 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
true, 실패하면 false를 반환한다. 

| bool onBluetoothDisconnect | ( | Bluetooth | this_gen | ) |
Bluetooth기기로 연결을 해제하며 이의 성공 여부를 반환한다.
| [in] | this_gen | 연결 해제 여부를 확인할 Bluetooth 객체 |
| [out] | null |
| bool | 함수의 성공 여부를 반환한다. 실패시 false를 반환하며 상세한 원인을 Log로 출력한다. |
true, 실패하면 false를 반환한다. 

1.8.6