Skip to content

Commit

Permalink
pw_bluetooth_proxy: Add sendGattNotify stub
Browse files Browse the repository at this point in the history
Bug: 344031126
Bug: 326499764
Change-Id: I4b095e3b52ebd69b9465fce0d453042228c86ac4
Reviewed-on: https://pigweed-review.googlesource.com/c/pigweed/pigweed/+/214106
Lint: Lint 🤖 <[email protected]>
Pigweed-Auto-Submit: David Rees <[email protected]>
Reviewed-by: Ali Saeed <[email protected]>
Commit-Queue: David Rees <[email protected]>
  • Loading branch information
studgeek authored and CQ Bot Account committed Jun 5, 2024
1 parent a4f3e67 commit b68025d
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
1 change: 1 addition & 0 deletions pw_bluetooth_proxy/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ pw_source_set("pw_bluetooth_proxy") {
dir_pw_function,
dir_pw_log,
dir_pw_span,
dir_pw_status,
]
deps = [ dir_pw_log ]
sources = [
Expand Down
1 change: 1 addition & 0 deletions pw_bluetooth_proxy/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ pw_add_library(pw_bluetooth_proxy STATIC
pw_function
pw_log
pw_span
pw_status
SOURCES
acl_data_channel.cc
emboss_util.h
Expand Down
27 changes: 26 additions & 1 deletion pw_bluetooth_proxy/public/pw_bluetooth_proxy/proxy_host.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#include "pw_assert/check.h" // IWYU pragma: keep
#include "pw_bluetooth_proxy/acl_data_channel.h"
#include "pw_bluetooth_proxy/common.h"
#include "pw_status/status.h"

namespace pw::bluetooth::proxy {

Expand Down Expand Up @@ -56,8 +57,32 @@ class ProxyHost {

// ##### Client APIs

/// Send a GATT Notify to the indicated connection.
///
/// @param[in] connection_handle The connection handle of the peer the notify
/// is being sent to.
///
/// @param[in] attribute_handle The attribute handle the notify should be
/// sent on.
/// @param[in] attribute_value The data to be sent. Data will be copied
/// before function completes.
///
/// @returns @rst
///
/// .. pw-status-codes::
/// OK: If notify was successfully queued for send.
/// UNAVAILABLE: If CHRE doesn't have resources to queue the send
/// at this time (transient error).
/// UNIMPLEMENTED: If send is not supported by the current implementation.
/// @endrst
pw::Status sendGattNotify(uint16_t connection_handle,
uint16_t attribute_handle,
const pw::span<uint8_t> attribute_value) {
return pw::Status::Unimplemented();
}

/// Returns the number of available LE ACL send credits for the proxy.
// Can be zero if the controller has not yet been initialized by the host.
/// Can be zero if the controller has not yet been initialized by the host.
uint16_t GetNumFreeLeAclPackets() const;

private:
Expand Down

0 comments on commit b68025d

Please sign in to comment.