Infineon Logo AIROC BTSDK v4.7 - Documentation
 
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
wiced_bt_obex.h File Reference

AIROC Bluetooth OBEX Application Programming Interface. More...

Data Structures

union  wiced_bt_obex_req_param_t
 
struct  wiced_bt_obex_put_evt_t
 
struct  wiced_bt_obex_get_evt_t
 
struct  wiced_bt_obex_conn_evt_t
 
struct  wiced_bt_obex_sess_evt_t
 
struct  wiced_bt_obex_action_evt_t
 
struct  wiced_bt_obex_setpath_evt_t
 
union  wiced_bt_obex_evt_param_t
 
struct  wiced_bt_obex_target_t
 
struct  wiced_bt_obex_start_params_t
 
struct  wiced_bt_obex_triplet_t
 

Macros

#define OBEX_HANDLE_NULL   0
 
#define L2CAP_MIN_OFFSET   13 /* from l2c_api.h */
 
#define GKI_MAX_BUF_SIZE   1024
 
#define OBEX_MAX_TARGET_LEN   16
 
#define OBEX_HDR_OFFSET   (18 + L2CAP_MIN_OFFSET)
 
#define OBEX_MIN_MTU   255 /* per IrOBEX spec */
 
#define OBEX_MAX_MTU   (GKI_MAX_BUF_SIZE - BT_HDR_SIZE - OBEX_HDR_OFFSET)
 
#define OBEX_REQ_CONNECT   0x00
 
#define OBEX_REQ_DISCONNECT   0x01
 
#define OBEX_REQ_PUT   0x02
 
#define OBEX_REQ_GET   0x03
 
#define OBEX_REQ_SETPATH   0x05
 
#define OBEX_REQ_ACTION   0x06
 
#define OBEX_REQ_SESSION   0x07
 
#define OBEX_REQ_ABORT   0x7F
 
#define OBEX_RSP_DEFAULT   0x00
 
#define OBEX_RSP_FAILED   0x08 /* OBEX failed - not from spec */
 
#define OBEX_RSP_CONTINUE   0x10 /* Continue */
 
#define OBEX_RSP_OK   0x20 /* OK, Success */
 
#define OBEX_RSP_CREATED   0x21 /* Created */
 
#define OBEX_RSP_ACCEPTED   0x22 /* Accepted */
 
#define OBEX_RSP_NON_AUTH_INFO   0x23 /* Non-Authoritative Information */
 
#define OBEX_RSP_NO_CONTENT   0x24 /* No Content */
 
#define OBEX_RSP_RESET_CONTENT   0x25 /* Reset Content */
 
#define OBEX_RSP_PART_CONTENT   0x26 /* Partial Content */
 
#define OBEX_RSP_MULTI_CHOICES   0x30 /* Multiple Choices */
 
#define OBEX_RSP_MVD_PERM   0x31 /* Moved Permanently */
 
#define OBEX_RSP_MVD_TEMP   0x32 /* Moved temporarily */
 
#define OBEX_RSP_SEE_OTHER   0x33 /* See Other */
 
#define OBEX_RSP_NOT_MODIFIED   0x34 /* Not modified */
 
#define OBEX_RSP_USE_PROXY   0x35 /* Use Proxy */
 
#define OBEX_RSP_BAD_REQUEST   0x40 /* Bad Request - server couldn't understand request */
 
#define OBEX_RSP_UNAUTHORIZED   0x41 /* Unauthorized */
 
#define OBEX_RSP_PAYMENT_REQD   0x42 /* Payment required */
 
#define OBEX_RSP_FORBIDDEN   0x43 /* Forbidden - operation is understood but refused */
 
#define OBEX_RSP_NOT_FOUND   0x44 /* Not Found */
 
#define OBEX_RSP_NOT_ALLOWED   0x45 /* Method not allowed */
 
#define OBEX_RSP_NOT_ACCEPTABLE   0x46 /* Not Acceptable */
 
#define OBEX_RSP_PROXY_AUTH_REQD   0x47 /* Proxy Authentication required */
 
#define OBEX_RSP_REQUEST_TIMEOUT   0x48 /* Request Time Out */
 
#define OBEX_RSP_CONFLICT   0x49 /* Conflict */
 
#define OBEX_RSP_GONE   0x4A /* Gone */
 
#define OBEX_RSP_LENGTH_REQD   0x4B /* Length Required */
 
#define OBEX_RSP_PRECONDTN_FAILED   0x4C /* Precondition failed */
 
#define OBEX_RSP_REQ_ENT_2_LARGE   0x4D /* Requested entity too large */
 
#define OBEX_RSP_REQ_URL_2_LARGE   0x4E /* Request URL too large */
 
#define OBEX_RSP_UNSUPTD_TYPE   0x4F /* Unsupported media type */
 
#define OBEX_RSP_INTRNL_SRVR_ERR   0x50 /* Internal Server Error */
 
#define OBEX_RSP_NOT_IMPLEMENTED   0x51 /* Not Implemented */
 
#define OBEX_RSP_BAD_GATEWAY   0x52 /* Bad Gateway */
 
#define OBEX_RSP_SERVICE_UNAVL   0x53 /* Service Unavailable */
 
#define OBEX_RSP_GATEWAY_TIMEOUT   0x54 /* Gateway Timeout */
 
#define OBEX_RSP_HTTP_VER_NOT_SUPTD   0x55 /* HTTP version not supported */
 
#define OBEX_RSP_DATABASE_FULL   0x60 /* Database Full */
 
#define OBEX_RSP_DATABASE_LOCKED   0x61 /* Database Locked */
 
#define OBEX_SPF_BACKUP   0x01 /* Backup a level before applying name(equivalent to ../) */
 
#define OBEX_SPF_NO_CREATE   0x02 /* Don't create directory if it does not exist, return an error instead. */
 
#define OBEX_ACTION_COPY   0x00 /* Copy object */
 
#define OBEX_ACTION_MOVE   0x01 /* Move/rename object */
 
#define OBEX_ACTION_PERMISSION   0x02 /* Set object permission */
 
#define OBEX_SESS_OP_CREATE   0x00 /* Create Session */
 
#define OBEX_SESS_OP_CLOSE   0x01 /* Close Session */
 
#define OBEX_SESS_OP_SUSPEND   0x02 /* Suspend Session */
 
#define OBEX_SESS_OP_RESUME   0x03 /* Resume Session */
 
#define OBEX_SESS_OP_SET_TIME   0x04 /* Set Timeout */
 
#define OBEX_SESS_OP_TRANSPORT   0xFF /* transport dropped */
 
#define OBEX_PERMISSION_READ   0x01
 
#define OBEX_PERMISSION_WRITE   0x02
 
#define OBEX_PERMISSION_DELETE   0x04
 
#define OBEX_PERMISSION_MODIFY   0x80
 
#define OBEX_MAX_TARGET_LEN   16
 
#define OBEX_HI_NULL   0
 
#define OBEX_HI_COUNT   0xC0
 
#define OBEX_HI_NAME   0x01
 
#define OBEX_HI_TYPE   0x42
 
#define OBEX_HI_LENGTH   0xC3
 
#define OBEX_HI_TIME   0x44
 
#define OBEX_HI_DESCRIPTION   0x05
 
#define OBEX_HI_TARGET   0x46
 
#define OBEX_HI_HTTP   0x47
 
#define OBEX_HI_BODY   0x48
 
#define OBEX_HI_BODY_END   0x49
 
#define OBEX_HI_WHO   0x4A
 
#define OBEX_HI_CONN_ID   0xCB
 
#define OBEX_HI_APP_PARMS   0x4C
 
#define OBEX_HI_CHALLENGE   0x4D
 
#define OBEX_HI_AUTH_RSP   0x4E
 
#define OBEX_HI_CREATOR_ID   0xCF
 
#define OBEX_HI_WAN_UUID   0x50
 
#define OBEX_HI_OBJ_CLASS   0x51
 
#define OBEX_HI_SESSION_PARAM   0x52
 
#define OBEX_HI_SESSION_SN   0x93
 
#define OBEX_HI_ACTION_ID   0x94
 
#define OBEX_HI_DEST_NAME   0x15
 
#define OBEX_HI_PERMISSION   0xD6
 
#define OBEX_HI_SRM   0x97
 
#define OBEX_HI_SRM_PARAM   0x98
 
#define OBEX_HI_LO_USER   0x30
 
#define OBEX_HI_HI_USER   0x3F
 

Typedefs

typedef uint8_t wiced_bt_obex_status_t
 
typedef uint16_t wiced_bt_obex_handle_t
 
typedef uint8_t wiced_bt_obex_req_code_t
 
typedef uint8_t wiced_bt_obex_rsp_code_t
 
typedef uint8_t wiced_bt_obex_setpath_flag_t
 
typedef uint8_t wiced_bt_obex_action_t
 
typedef uint8_t wiced_bt_obex_event_t
 
typedef uint8_t wiced_bt_obex_put_type_t
 
typedef uint8_t wiced_bt_obex_sess_opcode_t
 
typedef uint8_t wiced_bt_obex_sess_state_t
 
typedef void( wiced_bt_obex_server_cback_t )(wiced_bt_obex_handle_t handle, wiced_bt_obex_event_t event, wiced_bt_obex_evt_param_t param, uint8_t *p_pkt)
 
typedef void( wiced_bt_obex_client_cback_t )(wiced_bt_obex_handle_t handle, wiced_bt_obex_event_t event, uint8_t rsp_code, wiced_bt_obex_evt_param_t param, uint8_t *p_pkt)
 
typedef uint8_t wiced_bt_obex_header_identifier_t
 

Enumerations

enum  { OBEX_SUCCESS, OBEX_BAD_PARAMS, OBEX_NO_RESOURCES, OBEX_BAD_HANDLE }
 
enum  {
  OBEX_NULL_EVT, OBEX_CONNECT_REQ_EVT, OBEX_SESSION_REQ_EVT, OBEX_DISCONNECT_REQ_EVT,
  OBEX_PUT_REQ_EVT, OBEX_GET_REQ_EVT, OBEX_SETPATH_REQ_EVT, OBEX_ABORT_REQ_EVT,
  OBEX_ACTION_REQ_EVT, OBEX_CONNECT_RSP_EVT, OBEX_SESSION_RSP_EVT, OBEX_DISCONNECT_RSP_EVT,
  OBEX_PUT_RSP_EVT, OBEX_GET_RSP_EVT, OBEX_SETPATH_RSP_EVT, OBEX_ABORT_RSP_EVT,
  OBEX_ACTION_RSP_EVT, OBEX_SESSION_INFO_EVT, OBEX_CLOSE_IND_EVT, OBEX_TIMEOUT_EVT,
  OBEX_PASSWORD_EVT
}
 
enum  { OBEX_PUT_TYPE_PUT, OBEX_PUT_TYPE_DELETE, OBEX_PUT_TYPE_CREATE }
 
enum  { OBEX_SESS_ST_NONE, OBEX_SESS_ST_ACTIVE, OBEX_SESS_ST_SUSPENDED, OBEX_SESS_ST_EXT_MAX }
 

Functions

wiced_bt_obex_status_t wiced_bt_obex_init (void)
 Function wiced_bt_obex_init. More...
 
wiced_bt_obex_status_t wiced_bt_obex_start_server (wiced_bt_obex_start_params_t *p_params, wiced_bt_obex_handle_t *p_handle)
 Function wiced_bt_obex_start_server. More...
 
wiced_bt_obex_status_t wiced_bt_obex_stop_server (wiced_bt_obex_handle_t handle)
 Function wiced_bt_obex_stop_server. More...
 
wiced_bt_obex_status_t wiced_bt_obex_send_response (wiced_bt_obex_handle_t handle, wiced_bt_obex_req_code_t req_code, wiced_bt_obex_rsp_code_t rsp_code, uint8_t *p_pkt)
 Function wiced_bt_obex_send_rsp. More...
 
uint16_t wiced_bt_obex_get_peer_addr (wiced_bt_obex_handle_t handle, wiced_bt_device_address_t bd_addr)
 Function wiced_bt_obex_get_peer_addr. More...
 
wiced_bt_obex_status_t wiced_bt_obex_connect (wiced_bt_device_address_t bd_addr, uint8_t scn, uint16_t mtu, wiced_bt_obex_client_cback_t *p_cback, wiced_bt_obex_handle_t *p_handle, uint8_t *p_pkt)
 Function wiced_bt_obex_connect. More...
 
wiced_bt_obex_status_t wiced_bt_obex_disconnect (wiced_bt_obex_handle_t handle, uint8_t *p_pkt)
 Function wiced_bt_obex_disconnect. More...
 
wiced_bt_obex_status_t wiced_bt_obex_send_request (wiced_bt_obex_handle_t handle, wiced_bt_obex_req_code_t req_code, wiced_bt_obex_req_param_t *p_param, uint8_t *p_pkt)
 Function wiced_bt_obex_send_request. More...
 
uint8_t * wiced_bt_obex_header_init (wiced_bt_obex_handle_t handle, uint16_t pkt_size)
 Function wiced_bt_obex_header_init. More...
 
wiced_bt_obex_status_t wiced_bt_obex_add_header (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id, uint8_t *p_data, uint16_t len)
 Function wiced_bt_obex_add_header. More...
 
wiced_bt_obex_status_t wiced_bt_obex_add_header_utf8 (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id, uint8_t *p_str)
 Function wiced_bt_obex_add_header_utf8. More...
 
wiced_bt_obex_status_t wiced_bt_obex_add_triplet_header (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id, wiced_bt_obex_triplet_t *p_triplet, uint8_t num)
 Function wiced_bt_obex_add_triplet_header. More...
 
uint8_t * wiced_bt_obex_add_byte_sequence_start (uint8_t *p_pkt, uint16_t *p_len)
 Function wiced_bt_obex_add_byte_sequence_start. More...
 
wiced_bt_obex_status_t wiced_bt_obex_add_byte_sequence_end (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id, uint16_t len)
 Function wiced_bt_obex_add_byte_sequence_end. More...
 
wiced_bt_obex_status_t wiced_bt_obex_read_header (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id, uint8_t *p_data, uint16_t *p_len)
 Function wiced_bt_obex_read_header. More...
 
wiced_bt_obex_status_t wiced_bt_obex_read_header_utf8 (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id, uint8_t *p_data, uint16_t max_len)
 Function wiced_bt_obex_read_header_utf8. More...
 
wiced_bt_obex_status_t wiced_bt_obex_find_byte_sequence_header (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id, uint8_t **p_data, uint16_t *p_len)
 Function wiced_bt_obex_find_byte_sequence_header. More...
 
uint8_t wiced_bt_obex_find_body_header (uint8_t *p_pkt, uint8_t **p_body, uint16_t *p_len, wiced_bool_t *p_end)
 Function wiced_bt_obex_find_body_header. More...
 
uint8_t * wiced_bt_obex_add_body_start (uint8_t *p_pkt, uint16_t *p_len)
 Function wiced_bt_obex_add_body_start. More...
 
void wiced_bt_obex_add_body_end (uint8_t *p_pkt, uint8_t *p_body, uint16_t len, wiced_bool_t end)
 Function wiced_bt_obex_add_body_end. More...
 
uint16_t wiced_bt_obex_read_header_len (uint8_t *p_pkt, wiced_bt_obex_header_identifier_t id)
 Function wiced_bt_obex_read_header_len. More...
 

Detailed Description

AIROC Bluetooth OBEX Application Programming Interface.