|
Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
|
FTP client callback structure. More...
#include <zephyr/bluetooth/classic/ftp.h>
Data Fields | |
| void(* | rfcomm_connected )(struct bt_conn *conn, struct bt_ftp_client *client) |
| RFCOMM transport connected callback. | |
| void(* | rfcomm_disconnected )(struct bt_ftp_client *client) |
| RFCOMM transport disconnected callback. | |
| void(* | l2cap_connected )(struct bt_conn *conn, struct bt_ftp_client *client) |
| L2CAP transport connected callback. | |
| void(* | l2cap_disconnected )(struct bt_ftp_client *client) |
| L2CAP transport disconnected callback. | |
| void(* | connect )(struct bt_ftp_client *client, uint8_t rsp_code, uint8_t version, uint16_t mopl, struct net_buf *buf) |
| OBEX connect response callback. | |
| void(* | disconnect )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| OBEX disconnect response callback. | |
| void(* | abort )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| OBEX ABORT response callback. | |
| void(* | set_folder )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Set folder response callback. | |
| void(* | pull_folder_listing )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Pull folder listing response callback. | |
| void(* | push_file )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Push file response callback. | |
| void(* | pull_file )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Pull file response callback. | |
| void(* | remove )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Remove response callback. | |
| void(* | rename )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Rename/Move response callback. | |
| void(* | copy )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Copy response callback. | |
| void(* | set_permission )(struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
| Set permission response callback. | |
FTP client callback structure.
The structure must remain valid and constant for the entire lifetime of the FTP client object.
| void(* bt_ftp_client_cb::abort) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
OBEX ABORT response callback.
Called when a successful OBEX ABORT response is received. Any other response code disconnects the transport instead.
| client | FTP client object. |
| rsp_code | Response code, always BT_FTP_RSP_CODE_SUCCESS. |
| buf | Buffer containing response headers. |
| void(* bt_ftp_client_cb::connect) (struct bt_ftp_client *client, uint8_t rsp_code, uint8_t version, uint16_t mopl, struct net_buf *buf) |
OBEX connect response callback.
Called when OBEX CONNECT response is received.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code (BT_FTP_RSP_CODE_SUCCESS on success). |
| version | OBEX protocol version supported by server. |
| mopl | Maximum OBEX packet length supported by server. |
| buf | Buffer containing additional response headers. |
| void(* bt_ftp_client_cb::copy) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Copy response callback.
Called when copy ACTION response is received.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code. |
| buf | Buffer containing response headers. |
| void(* bt_ftp_client_cb::disconnect) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
OBEX disconnect response callback.
Called when OBEX DISCONNECT response is received.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code. |
| buf | Buffer containing response headers. |
| void(* bt_ftp_client_cb::l2cap_connected) (struct bt_conn *conn, struct bt_ftp_client *client) |
L2CAP transport connected callback.
Called when the underlying transport (L2CAP) connection is established. OBEX connection has not yet been negotiated at this point.
| conn | Bluetooth connection object. |
| client | FTP client object. |
| void(* bt_ftp_client_cb::l2cap_disconnected) (struct bt_ftp_client *client) |
L2CAP transport disconnected callback.
Called when the underlying transport (L2CAP) connection is closed. All pending operations are cancelled. Also called when the connection attempt fails, possibly from within a failing bt_ftp_client_l2cap_connect call that then returns an error as well.
client until this callback has returned. Keep client valid until then, and do not free, zero or reconnect it from within this callback.| client | FTP client object. |
| void(* bt_ftp_client_cb::pull_file) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Pull file response callback.
Called when GetFile response is received. May be called multiple times for a single request if response is fragmented.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code (BT_FTP_RSP_CODE_CONTINUE for partial data). |
| buf | Buffer containing file data and headers. |
| void(* bt_ftp_client_cb::pull_folder_listing) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Pull folder listing response callback.
Called when GetFolderListing response is received. May be called multiple times for a single request if response is fragmented.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code (BT_FTP_RSP_CODE_CONTINUE for partial data). |
| buf | Buffer containing folder listing data and headers. |
| void(* bt_ftp_client_cb::push_file) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Push file response callback.
Called when PutFile response is received. May be called multiple times if request is fragmented (BT_FTP_RSP_CODE_CONTINUE).
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code (BT_FTP_RSP_CODE_CONTINUE for partial upload). |
| buf | Buffer containing response headers. |
| void(* bt_ftp_client_cb::remove) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Remove response callback.
Called when the response to a remove request, which deletes a file or folder, is received.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code. |
| buf | Buffer containing response headers. |
| void(* bt_ftp_client_cb::rename) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Rename/Move response callback.
Called when rename/move ACTION response is received.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code. |
| buf | Buffer containing response headers. |
| void(* bt_ftp_client_cb::rfcomm_connected) (struct bt_conn *conn, struct bt_ftp_client *client) |
RFCOMM transport connected callback.
Called when the underlying transport (RFCOMM) connection is established. OBEX connection has not yet been negotiated at this point.
| conn | Bluetooth connection object. |
| client | FTP client object. |
| void(* bt_ftp_client_cb::rfcomm_disconnected) (struct bt_ftp_client *client) |
RFCOMM transport disconnected callback.
Called when the underlying transport (RFCOMM) connection is closed. All pending operations are cancelled. Also called when the connection attempt fails, possibly from within a failing bt_ftp_client_rfcomm_connect call that then returns an error as well.
client until this callback has returned. Keep client valid until then, and do not free, zero or reconnect it from within this callback.| client | FTP client object. |
| void(* bt_ftp_client_cb::set_folder) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Set folder response callback.
Called when SetFolder response is received.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code. |
| buf | Buffer containing response headers. |
| void(* bt_ftp_client_cb::set_permission) (struct bt_ftp_client *client, uint8_t rsp_code, struct net_buf *buf) |
Set permission response callback.
Called when set-permissions ACTION response is received.
| client | FTP client object. |
| rsp_code | Response code bt_ftp_rsp_code. |
| buf | Buffer containing response headers. |