Zephyr API Documentation 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
obex.h
Go to the documentation of this file.
1/* obex.h - IrDA Oject Exchange Protocol handling */
2
3/*
4 * Copyright 2024-2025 NXP
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
9#ifndef ZEPHYR_INCLUDE_BLUETOOTH_OBEX_H_
10#define ZEPHYR_INCLUDE_BLUETOOTH_OBEX_H_
11
18
19#include <zephyr/kernel.h>
20#include <string.h>
21#include <errno.h>
22#include <stdbool.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
29enum __packed bt_obex_rsp_code {
108};
109
118#if defined(CONFIG_BT_OEBX_RSP_CODE_TO_STR)
119const char *bt_obex_rsp_code_to_str(enum bt_obex_rsp_code rsp_code);
120#else
121static inline const char *bt_obex_rsp_code_to_str(enum bt_obex_rsp_code rsp_code)
122{
123 ARG_UNUSED(rsp_code);
124
125 return "";
126}
127#endif /* CONFIG_BT_OEBX_RSP_CODE_TO_STR */
128
209
211#define BT_OBEX_HDR_LEN 3
212
214#define BT_OBEX_PDU_LEN(mopl) ((mopl) - BT_OBEX_HDR_LEN)
215
217#define BT_OBEX_HDR_LEN_OF_HEADER_BODY 3
218
235#define BT_OBEX_DATA_LEN_OF_HEADER_BODY(len) ((len) - BT_OBEX_HDR_LEN_OF_HEADER_BODY)
236
237#define BT_OBEX_SEND_BUF_RESERVE 7
238
239struct bt_obex;
240struct bt_obex_server;
241struct bt_obex_client;
242
258 void (*connect)(struct bt_obex_server *server, uint8_t version, uint16_t mopl,
259 struct net_buf *buf);
260
269 void (*disconnect)(struct bt_obex_server *server, struct net_buf *buf);
270
280 void (*put)(struct bt_obex_server *server, bool final, struct net_buf *buf);
281
291 void (*get)(struct bt_obex_server *server, bool final, struct net_buf *buf);
292
301 void (*abort)(struct bt_obex_server *server, struct net_buf *buf);
302
312 void (*setpath)(struct bt_obex_server *server, uint8_t flags, struct net_buf *buf);
313
323 void (*action)(struct bt_obex_server *server, bool final, struct net_buf *buf);
324};
325
342 void (*connect)(struct bt_obex_client *client, uint8_t rsp_code, uint8_t version,
343 uint16_t mopl, struct net_buf *buf);
344
354 void (*disconnect)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf);
355
365 void (*put)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf);
366
376 void (*get)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf);
377
387 void (*abort)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf);
388
398 void (*setpath)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf);
399
409 void (*action)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf);
410};
411
427 struct net_buf *(*alloc_buf)(struct bt_obex *obex, struct net_buf_pool *pool);
428
439 int (*send)(struct bt_obex *obex, struct net_buf *buf);
440
449 int (*disconnect)(struct bt_obex *obex);
450};
451
479
480/* bt_obex flags */
481enum {
482 BT_OBEX_HAS_TARGET, /* Has target_header */
483};
484
491
495 struct bt_obex *obex;
496
498 const struct bt_uuid_128 *uuid;
499
505 const struct bt_obex_server_ops *ops;
506
507 struct {
510 } rx;
511
512 struct {
515 } tx;
516
518 atomic_t _state;
519
521 atomic_t _opcode;
522
524 atomic_t _flags;
525
527 union bt_obex_uuid _target;
528
530 uint32_t _conn_id;
531
533 sys_snode_t _node;
534};
535
539 struct bt_obex *obex;
540
546 const struct bt_obex_client_ops *ops;
547
548 struct {
551 } rx;
552
553 struct {
556 } tx;
557
559 atomic_t _state;
560
562 atomic_t _opcode;
563
565 atomic_t _pre_opcode;
566
568 atomic_t _flags;
569
571 union bt_obex_uuid _target;
572
574 uint32_t _conn_id;
575
577 sys_snode_t _node;
578};
579
581struct bt_obex {
582 struct {
585 } rx;
586
587 struct {
590 } tx;
591
593 const struct bt_obex_transport_ops *_transport_ops;
594
596 atomic_ptr_t _active_client;
597
599 atomic_ptr_t _active_server;
600
602 sys_slist_t _clients;
603
605 sys_slist_t _servers;
606};
607
624int bt_obex_server_register(struct bt_obex_server *server, const struct bt_uuid_128 *uuid);
625
637
660int bt_obex_connect(struct bt_obex_client *client, uint16_t mopl, struct net_buf *buf);
661
684int bt_obex_connect_rsp(struct bt_obex_server *server, uint8_t rsp_code, uint16_t mopl,
685 struct net_buf *buf);
686
705int bt_obex_disconnect(struct bt_obex_client *client, struct net_buf *buf);
706
728int bt_obex_disconnect_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf);
729
754int bt_obex_put(struct bt_obex_client *client, bool final, struct net_buf *buf);
755
777int bt_obex_put_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf);
778
800int bt_obex_get(struct bt_obex_client *client, bool final, struct net_buf *buf);
801
836int bt_obex_get_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf);
837
857int bt_obex_abort(struct bt_obex_client *client, struct net_buf *buf);
858
880int bt_obex_abort_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf);
881
913int bt_obex_setpath(struct bt_obex_client *client, uint8_t flags, struct net_buf *buf);
914
939int bt_obex_setpath_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf);
940
950
990int bt_obex_action(struct bt_obex_client *client, bool final, struct net_buf *buf);
991
1045int bt_obex_action_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf);
1046
1055
1064int bt_obex_add_header_name(struct net_buf *buf, uint16_t len, const uint8_t *name);
1065
1074int bt_obex_add_header_type(struct net_buf *buf, uint16_t len, const uint8_t *type);
1075
1084
1094
1103
1112int bt_obex_add_header_description(struct net_buf *buf, uint16_t len, const uint8_t *dec);
1113
1122int bt_obex_add_header_target(struct net_buf *buf, uint16_t len, const uint8_t *target);
1123
1132int bt_obex_add_header_http(struct net_buf *buf, uint16_t len, const uint8_t *http);
1133
1142int bt_obex_add_header_body(struct net_buf *buf, uint16_t len, const uint8_t *body);
1143
1152int bt_obex_add_header_end_body(struct net_buf *buf, uint16_t len, const uint8_t *body);
1153
1162int bt_obex_add_header_who(struct net_buf *buf, uint16_t len, const uint8_t *who);
1163
1172
1186
1195int bt_obex_add_header_app_param(struct net_buf *buf, size_t count,
1196 const struct bt_obex_tlv data[]);
1197
1202#define BT_OBEX_CHALLENGE_TAG_NONCE 0x00
1203
1208#define BT_OBEX_CHALLENGE_TAG_OPTIONS 0x01
1209
1211#define BT_OBEX_CHALLENGE_TAG_OPTION_REQ_USER_ID BIT(0)
1213#define BT_OBEX_CHALLENGE_TAG_OPTION_ACCESS_MODE BIT(1)
1214
1221#define BT_OBEX_CHALLENGE_TAG_REALM 0x02
1222
1231int bt_obex_add_header_auth_challenge(struct net_buf *buf, size_t count,
1232 const struct bt_obex_tlv data[]);
1233
1238#define BT_OBEX_RESPONSE_TAG_REQ_DIGEST 0x00
1239
1244#define BT_OBEX_RESPONSE_TAG_USER_ID 0x01
1245
1250#define BT_OBEX_RESPONSE_TAG_NONCE 0x02
1251
1260int bt_obex_add_header_auth_rsp(struct net_buf *buf, size_t count, const struct bt_obex_tlv data[]);
1261
1270
1280
1289int bt_obex_add_header_obj_class(struct net_buf *buf, uint16_t len, const uint8_t *obj_class);
1290
1300 const uint8_t *session_param);
1301
1309int bt_obex_add_header_session_seq_number(struct net_buf *buf, uint32_t session_seq_number);
1310
1319
1328int bt_obex_add_header_dest_name(struct net_buf *buf, uint16_t len, const uint8_t *dest_name);
1329
1338
1347
1356
1366
1383 bool (*func)(struct bt_obex_hdr *hdr, void *user_data), void *user_data);
1384
1393
1402int bt_obex_get_header_name(struct net_buf *buf, uint16_t *len, const uint8_t **name);
1403
1412int bt_obex_get_header_type(struct net_buf *buf, uint16_t *len, const uint8_t **type);
1413
1422
1432
1441
1450int bt_obex_get_header_description(struct net_buf *buf, uint16_t *len, const uint8_t **dec);
1451
1460int bt_obex_get_header_target(struct net_buf *buf, uint16_t *len, const uint8_t **target);
1461
1470int bt_obex_get_header_http(struct net_buf *buf, uint16_t *len, const uint8_t **http);
1471
1480int bt_obex_get_header_body(struct net_buf *buf, uint16_t *len, const uint8_t **body);
1481
1490int bt_obex_get_header_end_body(struct net_buf *buf, uint16_t *len, const uint8_t **body);
1491
1500int bt_obex_get_header_who(struct net_buf *buf, uint16_t *len, const uint8_t **who);
1501
1510
1531 bool (*func)(struct bt_obex_tlv *tlv, void *user_data), void *user_data);
1532
1543int bt_obex_get_header_app_param(struct net_buf *buf, uint16_t *len, const uint8_t **app_param);
1544
1555int bt_obex_get_header_auth_challenge(struct net_buf *buf, uint16_t *len, const uint8_t **auth);
1556
1567int bt_obex_get_header_auth_rsp(struct net_buf *buf, uint16_t *len, const uint8_t **auth);
1568
1576int bt_obex_get_header_creator_id(struct net_buf *buf, uint32_t *creator_id);
1577
1587
1596int bt_obex_get_header_obj_class(struct net_buf *buf, uint16_t *len, const uint8_t **obj_class);
1597
1607 const uint8_t **session_param);
1608
1616int bt_obex_get_header_session_seq_number(struct net_buf *buf, uint32_t *session_seq_number);
1617
1625int bt_obex_get_header_action_id(struct net_buf *buf, uint32_t *action_id);
1626
1635int bt_obex_get_header_dest_name(struct net_buf *buf, uint16_t *len, const uint8_t **dest_name);
1636
1645
1654
1662int bt_obex_get_header_srm_param(struct net_buf *buf, uint8_t *srm_param);
1663
1673
1674#ifdef __cplusplus
1675}
1676#endif
1677
1681
1682#endif /* ZEPHYR_INCLUDE_BLUETOOTH_OBEX_H_ */
long atomic_t
Definition atomic_types.h:15
void * atomic_ptr_t
Definition atomic_types.h:17
System error numbers.
int bt_obex_add_header_len(struct net_buf *buf, uint32_t len)
Add Header: the length of the object in bytes.
int bt_obex_disconnect(struct bt_obex_client *client, struct net_buf *buf)
OBEX disconnect request.
int bt_obex_add_header_wan_uuid(struct net_buf *buf, uint16_t len, const uint8_t *uuid)
Add Header: uniquely identifies the network client (OBEX server).
bt_obex_action_id
OBEX Actions.
Definition obex.h:942
int bt_obex_setpath_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf)
OBEX setpath response.
int bt_obex_add_header_creator_id(struct net_buf *buf, uint32_t creator_id)
Add Header: indicates the creator of an object.
int bt_obex_add_header_count(struct net_buf *buf, uint32_t count)
Add Header: number of objects (used by Connect)
int bt_obex_get_header_len(struct net_buf *buf, uint32_t *len)
Get header value: the length of the object in bytes.
int bt_obex_put(struct bt_obex_client *client, bool final, struct net_buf *buf)
OBEX put request.
int bt_obex_server_register(struct bt_obex_server *server, const struct bt_uuid_128 *uuid)
OBEX server register.
int bt_obex_get_header_count(struct net_buf *buf, uint32_t *count)
Get header value: number of objects (used by Connect)
int bt_obex_connect(struct bt_obex_client *client, uint16_t mopl, struct net_buf *buf)
OBEX connect request.
int bt_obex_get_header_conn_id(struct net_buf *buf, uint32_t *conn_id)
Get header value: an identifier used for OBEX connection multiplexing.
int bt_obex_add_header_srm(struct net_buf *buf, uint8_t srm)
Add Header: 1-byte value to setup Single Response Mode (SRM).
int bt_obex_add_header_time(struct net_buf *buf, uint32_t t)
Add Header: date/time stamp – 4 byte version (for compatibility only)
int bt_obex_get_header_time(struct net_buf *buf, uint32_t *t)
Get header value: date/time stamp – 4 byte version (for compatibility only)
int bt_obex_add_header_action_id(struct net_buf *buf, uint32_t action_id)
Add Header: specifies the action to be performed (used in ACTION operation).
bt_obex_header_id
OBEX Header ID.
Definition obex.h:130
int bt_obex_get_header_description(struct net_buf *buf, uint16_t *len, const uint8_t **dec)
Get header value: text description of the object.
int bt_obex_get_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf)
OBEX get response.
int bt_obex_add_header_dest_name(struct net_buf *buf, uint16_t len, const uint8_t *dest_name)
Add Header: the destination object name (used in certain ACTION operations).
int bt_obex_get_header_target(struct net_buf *buf, uint16_t *len, const uint8_t **target)
Get header value: name of service that operation is targeted to.
int bt_obex_get_header_obj_class(struct net_buf *buf, uint16_t *len, const uint8_t **obj_class)
Get header value: oBEX Object class of object.
int bt_obex_add_header_perm(struct net_buf *buf, uint32_t perm)
Add Header: 4-byte bit mask for setting permissions.
int bt_obex_add_header_auth_rsp(struct net_buf *buf, size_t count, const struct bt_obex_tlv data[])
Add Header: authentication digest-response.
int bt_obex_get_header_session_param(struct net_buf *buf, uint16_t *len, const uint8_t **session_param)
Get header value: parameters used in session commands/responses.
int bt_obex_add_header_who(struct net_buf *buf, uint16_t len, const uint8_t *who)
Add Header: identifies the OBEX application, used to tell if talking to a peer.
int bt_obex_get_header_http(struct net_buf *buf, uint16_t *len, const uint8_t **http)
Get header value: an HTTP 1.x header.
int bt_obex_header_parse(struct net_buf *buf, bool(*func)(struct bt_obex_hdr *hdr, void *user_data), void *user_data)
Helper for parsing OBEX header.
int bt_obex_get_header_action_id(struct net_buf *buf, uint32_t *action_id)
Get header value: specifies the action to be performed (used in ACTION operation).
bt_obex_state
Life-span states of OBEX.
Definition obex.h:469
int bt_obex_add_header_http(struct net_buf *buf, uint16_t len, const uint8_t *http)
Add Header: an HTTP 1.x header.
int bt_obex_server_unregister(struct bt_obex_server *server)
OBEX server unregister.
int bt_obex_setpath(struct bt_obex_client *client, uint8_t flags, struct net_buf *buf)
OBEX setpath request.
int bt_obex_get_header_auth_challenge(struct net_buf *buf, uint16_t *len, const uint8_t **auth)
Get header value: authentication digest-challenge.
int bt_obex_abort_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf)
OBEX abort response.
int bt_obex_add_header_obj_class(struct net_buf *buf, uint16_t len, const uint8_t *obj_class)
Add Header: OBEX Object class of object.
int bt_obex_get_header_srm_param(struct net_buf *buf, uint8_t *srm_param)
Get header value: Single Response Mode (SRM) Parameter.
static const char * bt_obex_rsp_code_to_str(enum bt_obex_rsp_code rsp_code)
Converts a OBEX response code to string.
Definition obex.h:121
int bt_obex_add_header_end_body(struct net_buf *buf, uint16_t len, const uint8_t *body)
Add Header: the final chunk of the object body.
bt_obex_rsp_code
OBEX Response Code.
Definition obex.h:29
int bt_obex_add_header_time_iso_8601(struct net_buf *buf, uint16_t len, const uint8_t *t)
Add Header: date/time stamp – ISO 8601 version - preferred.
int bt_obex_get_header_dest_name(struct net_buf *buf, uint16_t *len, const uint8_t **dest_name)
Get header value: the destination object name (used in certain ACTION operations).
int bt_obex_get_header_app_param(struct net_buf *buf, uint16_t *len, const uint8_t **app_param)
Get header value: extended application request & response information.
int bt_obex_add_header_name(struct net_buf *buf, uint16_t len, const uint8_t *name)
Add Header: name of the object (often a file name)
int bt_obex_get_header_creator_id(struct net_buf *buf, uint32_t *creator_id)
Get header value: indicates the creator of an object.
int bt_obex_get_header_session_seq_number(struct net_buf *buf, uint32_t *session_seq_number)
Get header value: sequence number used in each OBEX packet for reliability.
int bt_obex_add_header_srm_param(struct net_buf *buf, uint8_t srm_param)
Add Header: Single Response Mode (SRM) Parameter.
int bt_obex_get_header_perm(struct net_buf *buf, uint32_t *perm)
Get header value: 4-byte bit mask for setting permissions.
int bt_obex_action(struct bt_obex_client *client, bool final, struct net_buf *buf)
OBEX action request.
int bt_obex_get_header_who(struct net_buf *buf, uint16_t *len, const uint8_t **who)
Get header value: identifies the OBEX application, used to tell if talking to a peer.
int bt_obex_put_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf)
OBEX put response.
int bt_obex_get_header_body(struct net_buf *buf, uint16_t *len, const uint8_t **body)
Get header value: a chunk of the object body.
int bt_obex_get_header_type(struct net_buf *buf, uint16_t *len, const uint8_t **type)
Get header value: type of object - e.g.
int bt_obex_get(struct bt_obex_client *client, bool final, struct net_buf *buf)
OBEX get request.
int bt_obex_get_header_name(struct net_buf *buf, uint16_t *len, const uint8_t **name)
Get header value: name of the object (often a file name)
int bt_obex_add_header_session_param(struct net_buf *buf, uint16_t len, const uint8_t *session_param)
Add Header: parameters used in session commands/responses.
int bt_obex_disconnect_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf)
OBEX disconnect response.
int bt_obex_add_header_target(struct net_buf *buf, uint16_t len, const uint8_t *target)
Add Header: name of service that operation is targeted to.
int bt_obex_tlv_parse(uint16_t len, const uint8_t *data, bool(*func)(struct bt_obex_tlv *tlv, void *user_data), void *user_data)
Helper for parsing OBEX TLV triplet.
int bt_obex_get_header_time_iso_8601(struct net_buf *buf, uint16_t *len, const uint8_t **t)
Get header value: date/time stamp – ISO 8601 version - preferred.
int bt_obex_add_header_auth_challenge(struct net_buf *buf, size_t count, const struct bt_obex_tlv data[])
Add Header: authentication digest-challenge.
int bt_obex_add_header_body(struct net_buf *buf, uint16_t len, const uint8_t *body)
Add Header: a chunk of the object body.
int bt_obex_add_header_session_seq_number(struct net_buf *buf, uint32_t session_seq_number)
Add Header: sequence number used in each OBEX packet for reliability.
int bt_obex_connect_rsp(struct bt_obex_server *server, uint8_t rsp_code, uint16_t mopl, struct net_buf *buf)
OBEX connect response.
int bt_obex_get_header_auth_rsp(struct net_buf *buf, uint16_t *len, const uint8_t **auth)
Get header value: authentication digest-response.
int bt_obex_add_header_conn_id(struct net_buf *buf, uint32_t conn_id)
Add Header: an identifier used for OBEX connection multiplexing.
int bt_obex_add_header_type(struct net_buf *buf, uint16_t len, const uint8_t *type)
Add Header: type of object - e.g.
int bt_obex_get_header_srm(struct net_buf *buf, uint8_t *srm)
Get header value: 1-byte value to setup Single Response Mode (SRM).
int bt_obex_action_rsp(struct bt_obex_server *server, uint8_t rsp_code, struct net_buf *buf)
OBEX action response.
int bt_obex_add_header_app_param(struct net_buf *buf, size_t count, const struct bt_obex_tlv data[])
Add Header: extended application request & response information.
int bt_obex_add_header_description(struct net_buf *buf, uint16_t len, const uint8_t *dec)
Add Header: text description of the object.
int bt_obex_get_header_end_body(struct net_buf *buf, uint16_t *len, const uint8_t **body)
Get header value: the final chunk of the object body.
int bt_obex_get_header_wan_uuid(struct net_buf *buf, uint16_t *len, const uint8_t **uuid)
Get header value: uniquely identifies the network client (OBEX server).
int bt_obex_abort(struct bt_obex_client *client, struct net_buf *buf)
OBEX abort request.
int bt_obex_make_uuid(union bt_obex_uuid *uuid, const uint8_t *data, uint16_t len)
Make the UUID with specific data and len.
@ BT_OBEX_ACTION_SET_PERM
Set Object Permissions Action.
Definition obex.h:948
@ BT_OBEX_ACTION_MOVE_RENAME
Move/Rename Object Action.
Definition obex.h:946
@ BT_OBEX_ACTION_COPY
Copy Object Action.
Definition obex.h:944
@ BT_OBEX_HEADER_ID_ACTION_ID
Specifies the action to be performed (used in ACTION operation).
Definition obex.h:195
@ BT_OBEX_HEADER_ID_DES
Text description of the object.
Definition obex.h:150
@ BT_OBEX_HEADER_ID_CREATE_ID
Indicates the creator of an object.
Definition obex.h:180
@ BT_OBEX_HEADER_ID_BODY
A chunk of the object body.
Definition obex.h:159
@ BT_OBEX_HEADER_ID_CONN_ID
An identifier used for OBEX connection multiplexing.
Definition obex.h:168
@ BT_OBEX_HEADER_ID_SESSION_SEQ_NUM
Sequence number used in each OBEX packet for reliability.
Definition obex.h:192
@ BT_OBEX_HEADER_ID_HTTP
An HTTP 1.x header.
Definition obex.h:156
@ BT_OBEX_HEADER_ID_TIME
Date/time stamp – 4 byte version (for compatibility only)
Definition obex.h:147
@ BT_OBEX_HEADER_ID_TARGET
Name of service that operation is targeted to.
Definition obex.h:153
@ BT_OBEX_HEADER_ID_OBJECT_CLASS
OBEX Object class of object.
Definition obex.h:186
@ BT_OBEX_HEADER_ID_COUNT
Number of objects (used by Connect)
Definition obex.h:132
@ BT_OBEX_HEADER_ID_WAN_UUID
Uniquely identifies the network client (OBEX server).
Definition obex.h:183
@ BT_OBEX_HEADER_ID_PERM
4-byte bit mask for setting permissions.
Definition obex.h:201
@ BT_OBEX_HEADER_ID_APP_PARAM
Extended application request & response information.
Definition obex.h:171
@ BT_OBEX_HEADER_ID_TYPE
Type of object - e.g.
Definition obex.h:138
@ BT_OBEX_HEADER_ID_AUTH_RSP
Authentication digest-response.
Definition obex.h:177
@ BT_OBEX_HEADER_ID_AUTH_CHALLENGE
Authentication digest-challenge.
Definition obex.h:174
@ BT_OBEX_HEADER_ID_SRM
1-byte value to setup Single Response Mode (SRM).
Definition obex.h:204
@ BT_OBEX_HEADER_ID_END_BODY
The final chunk of the object body.
Definition obex.h:162
@ BT_OBEX_HEADER_ID_WHO
Identifies the OBEX application, used to tell if talking to a peer.
Definition obex.h:165
@ BT_OBEX_HEADER_ID_TIME_ISO_8601
Date/time stamp – ISO 8601 version - preferred.
Definition obex.h:144
@ BT_OBEX_HEADER_ID_SRM_PARAM
1-byte value for setting parameters used during Single Response Mode (SRM).
Definition obex.h:207
@ BT_OBEX_HEADER_ID_NAME
Name of the object (often a file name)
Definition obex.h:135
@ BT_OBEX_HEADER_ID_LEN
The length of the object in bytes.
Definition obex.h:141
@ BT_OBEX_HEADER_ID_DEST_NAME
The destination object name (used in certain ACTION operations).
Definition obex.h:198
@ BT_OBEX_HEADER_ID_SESSION_PARAM
Parameters used in session commands/responses.
Definition obex.h:189
@ BT_OBEX_CONNECTED
OBEX ready for upper layer traffic on it.
Definition obex.h:475
@ BT_OBEX_CONNECTING
OBEX in connecting state.
Definition obex.h:473
@ BT_OBEX_DISCONNECTED
OBEX disconnected.
Definition obex.h:471
@ BT_OBEX_DISCONNECTING
OBEX in disconnecting state.
Definition obex.h:477
@ BT_OBEX_RSP_CODE_ENTITY_TOO_LARGE
Requested Entity Too Large.
Definition obex.h:87
@ BT_OBEX_RSP_CODE_NOT_FOUND
Not Found.
Definition obex.h:69
@ BT_OBEX_RSP_CODE_BAD_REQ
Bad Request - server couldn’t understand request.
Definition obex.h:61
@ BT_OBEX_RSP_CODE_NON_AUTH_INFO
Non-Authoritative Information.
Definition obex.h:41
@ BT_OBEX_RSP_CODE_NO_CONTENT
No Content.
Definition obex.h:43
@ BT_OBEX_RSP_CODE_MULTI_CHOICES
Multiple Choices.
Definition obex.h:49
@ BT_OBEX_RSP_CODE_NOT_ALLOW
Method Not Allowed.
Definition obex.h:71
@ BT_OBEX_RSP_CODE_REQ_TIMEOUT
Request Time Out.
Definition obex.h:77
@ BT_OBEX_RSP_CODE_NOT_ACCEPT
Not Acceptable.
Definition obex.h:73
@ BT_OBEX_RSP_CODE_FORBIDDEN
Forbidden - operation is understood but refused.
Definition obex.h:67
@ BT_OBEX_RSP_CODE_RESET_CONTENT
Reset Content.
Definition obex.h:45
@ BT_OBEX_RSP_CODE_DB_LOCK
Database Locked.
Definition obex.h:107
@ BT_OBEX_RSP_CODE_PAY_REQ
Payment Required.
Definition obex.h:65
@ BT_OBEX_RSP_CODE_UNAVAIL
Service Unavailable.
Definition obex.h:99
@ BT_OBEX_RSP_CODE_UNSUPP_MEDIA_TYPE
Unsupported media type.
Definition obex.h:91
@ BT_OBEX_RSP_CODE_CONTINUE
Continue.
Definition obex.h:31
@ BT_OBEX_RSP_CODE_GATEWAY_TIMEOUT
Gateway Timeout.
Definition obex.h:101
@ BT_OBEX_RSP_CODE_OK
OK.
Definition obex.h:33
@ BT_OBEX_RSP_CODE_CREATED
Created.
Definition obex.h:37
@ BT_OBEX_RSP_CODE_GONE
Gone.
Definition obex.h:81
@ BT_OBEX_RSP_CODE_MOVED_PERM
Moved Permanently.
Definition obex.h:51
@ BT_OBEX_RSP_CODE_PRECON_FAIL
Precondition Failed.
Definition obex.h:85
@ BT_OBEX_RSP_CODE_NOT_MODIFIED
Not modified.
Definition obex.h:57
@ BT_OBEX_RSP_CODE_VER_UNSUPP
HTTP Version not supported.
Definition obex.h:103
@ BT_OBEX_RSP_CODE_ACCEPTED
Accepted.
Definition obex.h:39
@ BT_OBEX_RSP_CODE_NOT_IMPL
Not Implemented.
Definition obex.h:95
@ BT_OBEX_RSP_CODE_MOVED_TEMP
Moved temporarily.
Definition obex.h:53
@ BT_OBEX_RSP_CODE_LEN_REQ
Length Required.
Definition obex.h:83
@ BT_OBEX_RSP_CODE_USE_PROXY
Use Proxy.
Definition obex.h:59
@ BT_OBEX_RSP_CODE_SEE_OTHER
See Other.
Definition obex.h:55
@ BT_OBEX_RSP_CODE_BAD_GATEWAY
Bad Gateway.
Definition obex.h:97
@ BT_OBEX_RSP_CODE_UNAUTH
Unauthorized.
Definition obex.h:63
@ BT_OBEX_RSP_CODE_DB_FULL
Database Full.
Definition obex.h:105
@ BT_OBEX_RSP_CODE_URL_TOO_LARGE
Requested URL Too Large.
Definition obex.h:89
@ BT_OBEX_RSP_CODE_INTER_ERROR
Internal serve Error.
Definition obex.h:93
@ BT_OBEX_RSP_CODE_PROXY_AUTH_REQ
Proxy Authentication Required.
Definition obex.h:75
@ BT_OBEX_RSP_CODE_CONFLICT
Conflict.
Definition obex.h:79
@ BT_OBEX_RSP_CODE_SUCCESS
Success.
Definition obex.h:35
@ BT_OBEX_RSP_CODE_PARTIAL_CONTENT
Partial Content.
Definition obex.h:47
@ BT_OBEX_HAS_TARGET
Definition obex.h:482
struct _slist sys_slist_t
Single-linked list structure.
Definition slist.h:49
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
Public kernel APIs.
flags
Definition parser.h:97
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
OBEX client operations structure.
Definition obex.h:330
void(* action)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf)
OBEX action response callback.
Definition obex.h:409
void(* disconnect)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf)
OBEX disconnect response callback.
Definition obex.h:354
void(* setpath)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf)
OBEX SetPath response callback.
Definition obex.h:398
void(* abort)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf)
OBEX abort response callback.
Definition obex.h:387
void(* put)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf)
OBEX put response callback.
Definition obex.h:365
void(* connect)(struct bt_obex_client *client, uint8_t rsp_code, uint8_t version, uint16_t mopl, struct net_buf *buf)
OBEX connect response callback.
Definition obex.h:342
void(* get)(struct bt_obex_client *client, uint8_t rsp_code, struct net_buf *buf)
OBEX get response callback.
Definition obex.h:376
OBEX client structure.
Definition obex.h:537
struct bt_obex * obex
OBEX Object.
Definition obex.h:539
const struct bt_obex_client_ops * ops
OBEX Client operations.
Definition obex.h:546
struct bt_obex_client::@326221357137065306217372072163052026141177300246 rx
uint16_t mopl
The Maximum OBEX Packet Length (MOPL)
Definition obex.h:550
struct bt_obex_client::@111003125364121074143276003267015036357375172226 tx
OBEX Header structure.
Definition obex.h:1358
uint16_t len
The length of header value.
Definition obex.h:1362
uint8_t id
Header ID bt_obex_header_id.
Definition obex.h:1360
const uint8_t * data
Header value.
Definition obex.h:1364
OBEX server operations structure.
Definition obex.h:247
void(* connect)(struct bt_obex_server *server, uint8_t version, uint16_t mopl, struct net_buf *buf)
OBEX connect request callback.
Definition obex.h:258
void(* abort)(struct bt_obex_server *server, struct net_buf *buf)
OBEX abort request callback.
Definition obex.h:301
void(* get)(struct bt_obex_server *server, bool final, struct net_buf *buf)
OBEX get request callback.
Definition obex.h:291
void(* setpath)(struct bt_obex_server *server, uint8_t flags, struct net_buf *buf)
OBEX SetPath request callback.
Definition obex.h:312
void(* action)(struct bt_obex_server *server, bool final, struct net_buf *buf)
OBEX action request callback.
Definition obex.h:323
void(* disconnect)(struct bt_obex_server *server, struct net_buf *buf)
OBEX disconnect request callback.
Definition obex.h:269
void(* put)(struct bt_obex_server *server, bool final, struct net_buf *buf)
OBEX put request callback.
Definition obex.h:280
OBEX server structure.
Definition obex.h:493
uint16_t mopl
The Maximum OBEX Packet Length (MOPL)
Definition obex.h:509
struct bt_obex_server::@102203250332061272314310073220313305327200242045 tx
const struct bt_uuid_128 * uuid
UUID of the service.
Definition obex.h:498
struct bt_obex * obex
OBEX Object.
Definition obex.h:495
struct bt_obex_server::@043331323127233377077337156045327123120304000306 rx
const struct bt_obex_server_ops * ops
OBEX Server operations.
Definition obex.h:505
Bluetooth OBEX TLV triplet.
Definition obex.h:1181
const uint8_t * data
Definition obex.h:1184
uint8_t type
Definition obex.h:1182
uint8_t data_len
Definition obex.h:1183
OBEX transport operations structure.
Definition obex.h:416
int(* send)(struct bt_obex *obex, struct net_buf *buf)
Send OBEX data via transport.
Definition obex.h:439
int(* disconnect)(struct bt_obex *obex)
Disconnect from transport.
Definition obex.h:449
OBEX structure.
Definition obex.h:581
struct bt_obex::@334171124345215351360143107375313161364362160240 tx
uint16_t mtu
MTU of OBEX transport.
Definition obex.h:584
struct bt_obex::@243305210146247120322314160130214202327064015017 rx
Definition uuid.h:68
Definition uuid.h:54
Definition uuid.h:61
This is a 'tentative' type and should be used as a pointer only.
Definition uuid.h:50
Network buffer pool representation.
Definition net_buf.h:1079
Network buffer representation.
Definition net_buf.h:1006
Binary representation of a UUID.
Definition uuid.h:48
Definition obex.h:485
struct bt_uuid uuid
Definition obex.h:486
struct bt_uuid_16 u16
Definition obex.h:487
struct bt_uuid_32 u32
Definition obex.h:488
struct bt_uuid_128 u128
Definition obex.h:489