Zephyr Project API 4.2.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
goep.h
Go to the documentation of this file.
1/* goep.h - Bluetooth Generic Object Exchange Profile handling */
2
3/*
4 * Copyright 2024-2025 NXP
5 *
6 * SPDX-License-Identifier: Apache-2.0
7 */
8
9#ifndef ZEPHYR_INCLUDE_BLUETOOTH_GOEP_H_
10#define ZEPHYR_INCLUDE_BLUETOOTH_GOEP_H_
11
19#include <zephyr/kernel.h>
20#include <string.h>
21#include <errno.h>
22#include <stdbool.h>
23
29
30#ifdef __cplusplus
31extern "C" {
32#endif
33
34struct bt_goep;
35
49 void (*connected)(struct bt_conn *conn, struct bt_goep *goep);
50
58 void (*disconnected)(struct bt_goep *goep);
59};
60
86
87struct bt_goep {
89 union {
92 } _transport;
93
102 bool _goep_v2;
103
105 struct bt_conn *_acl;
106
108 atomic_t _state;
109
116
118 struct bt_obex obex;
119};
120
140
158 int (*accept)(struct bt_conn *conn, struct bt_goep_transport_rfcomm_server *server,
159 struct bt_goep **goep);
160
162};
163
178
203int bt_goep_transport_rfcomm_connect(struct bt_conn *conn, struct bt_goep *goep, uint8_t channel);
204
214
238
256 int (*accept)(struct bt_conn *conn, struct bt_goep_transport_l2cap_server *server,
257 struct bt_goep **goep);
258
260};
261
280
305int bt_goep_transport_l2cap_connect(struct bt_conn *conn, struct bt_goep *goep, uint16_t psm);
306
316
330struct net_buf *bt_goep_create_pdu(struct bt_goep *goep, struct net_buf_pool *pool);
331
332#ifdef __cplusplus
333}
334#endif
335
340#endif /* ZEPHYR_INCLUDE_BLUETOOTH_GOEP_H_ */
long atomic_t
Definition atomic_types.h:15
Bluetooth subsystem core APIs.
Bluetooth connection handling.
System error numbers.
int bt_goep_transport_l2cap_connect(struct bt_conn *conn, struct bt_goep *goep, uint16_t psm)
Connect GOEP transport over L2CAP.
int bt_goep_transport_l2cap_disconnect(struct bt_goep *goep)
Disconnect GOEP transport from L2CAP channel.
int bt_goep_transport_l2cap_server_register(struct bt_goep_transport_l2cap_server *server)
Register GOEP L2CAP server.
int bt_goep_transport_rfcomm_disconnect(struct bt_goep *goep)
Disconnect GOEP transport from RFCOMM.
int bt_goep_transport_rfcomm_server_register(struct bt_goep_transport_rfcomm_server *server)
Register GOEP RFCOMM server.
int bt_goep_transport_rfcomm_connect(struct bt_conn *conn, struct bt_goep *goep, uint8_t channel)
Connect GOEP transport over RFCOMM.
bt_goep_transport_state
Life-span states of GOEP transport.
Definition goep.h:76
struct net_buf * bt_goep_create_pdu(struct bt_goep *goep, struct net_buf_pool *pool)
Allocate the buffer from given pool after reserving head room for GOEP.
@ BT_GOEP_TRANSPORT_CONNECTING
GOEP in connecting state.
Definition goep.h:80
@ BT_GOEP_TRANSPORT_DISCONNECTING
GOEP in disconnecting state.
Definition goep.h:84
@ BT_GOEP_TRANSPORT_DISCONNECTED
GOEP disconnected.
Definition goep.h:78
@ BT_GOEP_TRANSPORT_CONNECTED
GOEP ready for upper layer traffic on it.
Definition goep.h:82
struct _snode sys_snode_t
Single-linked list node structure.
Definition slist.h:39
Public kernel APIs.
Bluetooth L2CAP handling.
Bluetooth RFCOMM handling.
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
GOEP Server structure for GOEP v2.0 and later.
Definition goep.h:224
struct bt_l2cap_server l2cap
L2CAP PSM for GOEP v2.0 and later.
Definition goep.h:237
int(* accept)(struct bt_conn *conn, struct bt_goep_transport_l2cap_server *server, struct bt_goep **goep)
Server accept callback.
Definition goep.h:256
sys_snode_t node
Definition goep.h:259
GOEP transport operations structure.
Definition goep.h:40
void(* connected)(struct bt_conn *conn, struct bt_goep *goep)
GOEP transport connected callback.
Definition goep.h:49
void(* disconnected)(struct bt_goep *goep)
GOEP transport disconnected callback.
Definition goep.h:58
GOEP Server structure GOEP v1.1.
Definition goep.h:128
sys_snode_t node
Definition goep.h:161
int(* accept)(struct bt_conn *conn, struct bt_goep_transport_rfcomm_server *server, struct bt_goep **goep)
Server accept callback.
Definition goep.h:158
struct bt_rfcomm_server rfcomm
RFCOMM server for GOEP v1.1.
Definition goep.h:139
Definition goep.h:87
struct bt_rfcomm_dlc dlc
Definition goep.h:90
struct bt_obex obex
OBEX object.
Definition goep.h:118
struct bt_l2cap_br_chan chan
Definition goep.h:91
const struct bt_goep_transport_ops * transport_ops
GOEP transport operations.
Definition goep.h:115
BREDR L2CAP Channel structure.
Definition l2cap.h:404
L2CAP Server structure.
Definition l2cap.h:686
OBEX structure.
Definition obex.h:451
RFCOMM DLC structure.
Definition rfcomm.h:99
Definition rfcomm.h:125
Network buffer pool representation.
Definition net_buf.h:1079
Network buffer representation.
Definition net_buf.h:1006