11#ifndef ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_OPP_H_
12#define ZEPHYR_INCLUDE_BLUETOOTH_CLASSIC_OPP_H_
42#define BT_OPP_SDP_UUID BT_UUID_DECLARE_16(BT_SDP_OBEX_OBJPUSH_SVCLASS)
50#define BT_OPP_SDP_ATTR_SUPPORTED_FORMATS BT_SDP_ATTR_SUPPORTED_FORMATS_LIST
53#define BT_OPP_TYPE_VCARD "text/x-vcard"
56#define BT_OPP_TYPE_VCAL "text/x-vcalendar"
59#define BT_OPP_TYPE_ICAL "text/calendar"
62#define BT_OPP_TYPE_VNOTE "text/x-vnote"
65#define BT_OPP_TYPE_VMESSAGE "text/x-vmsg"
long atomic_t
Atomic integer variable.
Definition atomic_types.h:34
@ BT_OBEX_RSP_CODE_ENTITY_TOO_LARGE
Requested Entity Too Large.
Definition obex.h:91
@ BT_OBEX_RSP_CODE_NOT_FOUND
Not Found.
Definition obex.h:73
@ BT_OBEX_RSP_CODE_BAD_REQ
Bad Request - server couldn’t understand request.
Definition obex.h:65
@ BT_OBEX_RSP_CODE_NOT_ACCEPT
Not Acceptable.
Definition obex.h:77
@ BT_OBEX_RSP_CODE_FORBIDDEN
Forbidden - operation is understood but refused.
Definition obex.h:71
@ BT_OBEX_RSP_CODE_UNAVAIL
Service Unavailable.
Definition obex.h:103
@ BT_OBEX_RSP_CODE_UNSUPP_MEDIA_TYPE
Unsupported media type.
Definition obex.h:95
@ BT_OBEX_RSP_CODE_CONTINUE
Continue.
Definition obex.h:35
@ BT_OBEX_RSP_CODE_OK
OK.
Definition obex.h:37
@ BT_OBEX_RSP_CODE_PRECON_FAIL
Precondition Failed.
Definition obex.h:89
@ BT_OBEX_RSP_CODE_NOT_IMPL
Not Implemented.
Definition obex.h:99
@ BT_OBEX_RSP_CODE_INTER_ERROR
Internal serve Error.
Definition obex.h:97
@ BT_OBEX_RSP_CODE_SUCCESS
Success.
Definition obex.h:39
int bt_opp_client_transport_disconnect(struct bt_opp_client *client)
Disconnect the Push Client transport connection.
int bt_opp_client_disconnect(struct bt_opp_client *client, struct net_buf *buf)
Terminate the OBEX connection.
int bt_opp_client_transport_connect(struct bt_conn *conn, struct bt_opp_client *client, const struct bt_opp_client_cb *cb, uint8_t channel)
Connect the Push Client to a Push Server transport.
bt_opp_rsp_code
OPP response codes.
Definition opp.h:98
bt_opp_format
OPP supported object format codes.
Definition opp.h:73
int bt_opp_server_unregister(struct bt_opp_server *server)
Release a Push Server instance.
int bt_opp_client_abort(struct bt_opp_client *client, struct net_buf *buf)
Abort the current ongoing operation.
int bt_opp_client_push(struct bt_opp_client *client, bool final, struct net_buf *buf)
Push an object to the Push Server (OBEX PUT).
int bt_opp_client_connect(struct bt_opp_client *client, uint16_t mopl, struct net_buf *buf)
Establish an OBEX connection with the Push Server.
int bt_opp_server_disconnect(struct bt_opp_server *server, struct net_buf *buf)
Send an OBEX DISCONNECT response from the Push Server.
int bt_opp_server_abort(struct bt_opp_server *server, struct net_buf *buf)
Send an OBEX ABORT response from the Push Server.
struct net_buf * bt_opp_server_create_pdu(struct bt_opp_server *server, struct net_buf_pool *pool)
Allocate a PDU buffer with headroom reserved for OPP Push Server.
int bt_opp_server_pull(struct bt_opp_server *server, uint8_t rsp_code, struct net_buf *buf)
Send an OBEX GET response from the Push Server (business card pull).
int bt_opp_server_push(struct bt_opp_server *server, uint8_t rsp_code, struct net_buf *buf)
Send an OBEX PUT response from the Push Server.
int bt_opp_client_pull(struct bt_opp_client *client, struct net_buf *buf)
Pull the server's default business card (OBEX GET).
int bt_opp_server_connect(struct bt_opp_server *server, uint16_t mopl, uint8_t rsp_code, struct net_buf *buf)
Send an OBEX CONNECT response from the Push Server.
int bt_opp_server_transport_register(struct bt_opp_server_transport *server)
Register an OPP Push Server transport listener.
int bt_opp_server_register(struct bt_opp_server *server, const struct bt_opp_server_cb *cb)
Register a Push Server instance with the OPP subsystem.
struct net_buf * bt_opp_client_create_pdu(struct bt_opp_client *client, struct net_buf_pool *pool)
Allocate a PDU buffer with headroom reserved for OPP Push Client.
@ BT_OPP_RSP_CODE_PRECON_FAIL
Precondition failed.
Definition opp.h:114
@ BT_OPP_RSP_CODE_UNSUPP_MEDIA_TYPE
Unsupported media type - server does not support this object format.
Definition opp.h:118
@ BT_OPP_RSP_CODE_OK
OK / Success (final response, same numeric value as SUCCESS).
Definition opp.h:102
@ BT_OPP_RSP_CODE_NOT_IMPL
Not implemented.
Definition opp.h:120
@ BT_OPP_RSP_CODE_ENTITY_TOO_LARGE
Requested entity too large - object size exceeds server capacity.
Definition opp.h:116
@ BT_OPP_RSP_CODE_NOT_ACCEPT
Not acceptable.
Definition opp.h:112
@ BT_OPP_RSP_CODE_FORBIDDEN
Forbidden - operation understood but refused.
Definition opp.h:108
@ BT_OPP_RSP_CODE_NOT_FOUND
Not found - requested object does not exist.
Definition opp.h:110
@ BT_OPP_RSP_CODE_BAD_REQ
Bad request - server could not understand request.
Definition opp.h:106
@ BT_OPP_RSP_CODE_SUCCESS
Success.
Definition opp.h:104
@ BT_OPP_RSP_CODE_CONTINUE
Continue - more data follows.
Definition opp.h:100
@ BT_OPP_RSP_CODE_INTER_ERROR
Internal server error.
Definition opp.h:122
@ BT_OPP_RSP_CODE_UNAVAIL
Service unavailable.
Definition opp.h:124
@ BT_OPP_FORMAT_ANY
Any object type.
Definition opp.h:87
@ BT_OPP_FORMAT_VMESSAGE
vMessage format.
Definition opp.h:85
@ BT_OPP_FORMAT_VCAL_1_0
vCalendar 1.0 format.
Definition opp.h:79
@ BT_OPP_FORMAT_ICAL_2_0
iCalendar 2.0 format.
Definition opp.h:81
@ BT_OPP_FORMAT_VNOTE
vNote format.
Definition opp.h:83
@ BT_OPP_FORMAT_VCARD_2_1
vCard 2.1 format.
Definition opp.h:75
@ BT_OPP_FORMAT_VCARD_3_0
vCard 3.0 format.
Definition opp.h:77
Service Discovery Protocol handling.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Opaque type representing a connection to a remote device.
GOEP Server structure GOEP v1.1.
Definition goep.h:225
GOEP v1.1 structure.
Definition goep.h:62
GOEP structure.
Definition goep.h:138
OBEX client structure.
Definition obex.h:538
OBEX server structure.
Definition obex.h:492
OPP Push Client callback operations structure.
Definition opp.h:144
void(* transport_connected)(struct bt_conn *conn, struct bt_opp_client *client)
Transport connected callback.
Definition opp.h:155
void(* push)(struct bt_opp_client *client, uint8_t rsp_code, struct net_buf *buf)
Object push (PUT) response callback.
Definition opp.h:227
void(* pull)(struct bt_opp_client *client, uint8_t rsp_code, struct net_buf *buf)
Business card pull (GET) response callback.
Definition opp.h:247
void(* abort)(struct bt_opp_client *client, struct net_buf *buf)
Abort response callback.
Definition opp.h:268
void(* disconnect)(struct bt_opp_client *client, uint8_t rsp_code, struct net_buf *buf)
OBEX disconnect response callback.
Definition opp.h:208
void(* transport_disconnected)(struct bt_opp_client *client)
Transport disconnected callback.
Definition opp.h:168
void(* connect)(struct bt_opp_client *client, uint8_t rsp_code, uint8_t version, uint16_t mopl, struct net_buf *buf)
OBEX connect response callback.
Definition opp.h:186
OPP Push Client structure.
Definition opp.h:272
const struct bt_opp_client_cb * cb
Callback operations structure pointer.
Definition opp.h:274
OPP Push Server callback operations structure.
Definition opp.h:535
void(* disconnect)(struct bt_opp_server *server, struct net_buf *buf)
OBEX disconnect request callback.
Definition opp.h:595
void(* transport_connected)(struct bt_conn *conn, struct bt_opp_server *server)
Transport connected callback.
Definition opp.h:546
void(* transport_disconnected)(struct bt_opp_server *server)
Transport disconnected callback.
Definition opp.h:557
void(* push)(struct bt_opp_server *server, bool final, struct net_buf *buf)
Object push (PUT) request callback.
Definition opp.h:637
void(* abort)(struct bt_opp_server *server, struct net_buf *buf)
Abort request callback.
Definition opp.h:697
void(* connect)(struct bt_opp_server *server, uint8_t version, uint16_t mopl, struct net_buf *buf)
OBEX connect request callback.
Definition opp.h:578
void(* pull)(struct bt_opp_server *server, bool final, struct net_buf *buf)
Business card pull (GET) request callback.
Definition opp.h:678
OPP Push Server transport registration structure.
Definition opp.h:706
struct bt_goep_transport_rfcomm_server server
Underlying GOEP RFCOMM server.
Definition opp.h:708
int(* accept)(struct bt_conn *conn, struct bt_opp_server_transport *transport_server, struct bt_opp_server **opp_server)
Accept connection callback.
Definition opp.h:737
OPP Push Server structure.
Definition opp.h:742
const struct bt_opp_server_cb * cb
Callback operations structure pointer.
Definition opp.h:744
Network buffer pool representation.
Definition net_buf.h:1199
Network buffer representation.
Definition net_buf.h:1062