Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit dda1b44c authored by Sonny Sasaka's avatar Sonny Sasaka Committed by Automerger Merge Worker
Browse files

Merge "Floss: Fix Floss doc" am: 353b4a8e

parents 05c809f3 353b4a8e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -45,7 +45,7 @@ pub fn dbus_method(_attr: TokenStream, item: TokenStream) -> TokenStream {
/// Generates a function to export a Rust object to D-Bus.
/// Generates a function to export a Rust object to D-Bus.
///
///
/// Example:
/// Example:
///   #[generate_dbus_exporter(export_foo_dbus_obj, "org.example.FooInterface")]
///   `#[generate_dbus_exporter(export_foo_dbus_obj, "org.example.FooInterface")]`
///
///
/// This generates a method called `export_foo_dbus_obj` that will export a Rust object into a
/// This generates a method called `export_foo_dbus_obj` that will export a Rust object into a
/// D-Bus object having interface `org.example.FooInterface`.
/// D-Bus object having interface `org.example.FooInterface`.
+7 −7
Original line number Original line Diff line number Diff line
@@ -9,26 +9,26 @@
//!   path.
//!   path.
//!
//!
//! A good example is in
//! A good example is in
//! [`manager_service`](https://android.googlesource.com/platform/packages/modules/Bluetooth/system/+/refs/heads/master/gd/rust/linux/mgmt)
//! [`manager_service`](https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/master/system/gd/rust/linux/mgmt)
//! crate:
//! crate:
//!
//!
//! * Define RPCProxy like in
//! * Define RPCProxy like in
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/system/+/refs/heads/master/gd/rust/linux/mgmt/src/lib.rs)
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/master/system/gd/rust/linux/mgmt/src/lib.rs)
//! (TODO: We should remove this requirement in the future).
//! (TODO: We should remove this requirement in the future).
//! * Generate `DBusArg` trait like in
//! * Generate `DBusArg` trait like in
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/system/+/refs/heads/master/gd/rust/linux/mgmt/src/bin/btmanagerd/dbus_arg.rs).
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/master/system/gd/rust/linux/mgmt/src/bin/btmanagerd/dbus_arg.rs).
//! This trait is generated by a macro and cannot simply be imported because of Rust's
//! This trait is generated by a macro and cannot simply be imported because of Rust's
//! [Orphan Rule](https://github.com/Ixrec/rust-orphan-rules).
//! [Orphan Rule](https://github.com/Ixrec/rust-orphan-rules).
//! * Define D-Bus-agnostic traits like in
//! * Define D-Bus-agnostic traits like in
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/system/+/refs/heads/master/gd/rust/linux/mgmt/src/iface_bluetooth_manager.rs).
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/master/system/gd/rust/linux/mgmt/src/iface_bluetooth_manager.rs).
//! These traits can be projected into D-Bus Interfaces on D-Bus objects.  A method parameter can
//! These traits can be projected into D-Bus Interfaces on D-Bus objects.  A method parameter can
//! be of a Rust primitive type, structure, enum, or a callback specially typed as
//! be of a Rust primitive type, structure, enum, or a callback specially typed as
//! `Box<dyn SomeCallbackTrait + Send>`. Callback traits implement `RPCProxy`.
//! `Box<dyn SomeCallbackTrait + Send>`. Callback traits implement `RPCProxy`.
//! * Implement the traits like in
//! * Implement the traits like in
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/system/+/refs/heads/master/gd/rust/linux/mgmt/src/bin/btmanagerd/bluetooth_manager.rs),
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/master/system/gd/rust/linux/mgmt/src/bin/btmanagerd/bluetooth_manager.rs),
//! also D-Bus-agnostic.
//! also D-Bus-agnostic.
//! * Define D-Bus projection mappings like in
//! * Define D-Bus projection mappings like in
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/system/+/refs/heads/master/gd/rust/linux/mgmt/src/bin/btmanagerd/bluetooth_manager_dbus.rs).
//! [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/master/system/gd/rust/linux/mgmt/src/bin/btmanagerd/bluetooth_manager_dbus.rs).
//!   * Add [`generate_dbus_exporter`](dbus_macros::generate_dbus_exporter) macro to an `impl` of a
//!   * Add [`generate_dbus_exporter`](dbus_macros::generate_dbus_exporter) macro to an `impl` of a
//!     trait.
//!     trait.
//!   * Define a method name of each method with [`dbus_method`](dbus_macros::dbus_method) macro.
//!   * Define a method name of each method with [`dbus_method`](dbus_macros::dbus_method) macro.
@@ -41,7 +41,7 @@
//!     the [`impl_dbus_arg_enum`](impl_dbus_arg_enum) macro.
//!     the [`impl_dbus_arg_enum`](impl_dbus_arg_enum) macro.
//! * To project a Rust object to a D-Bus, call the function generated by
//! * To project a Rust object to a D-Bus, call the function generated by
//!   [`generate_dbus_exporter`](dbus_macros::generate_dbus_exporter) like in
//!   [`generate_dbus_exporter`](dbus_macros::generate_dbus_exporter) like in
//!   [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/system/+/refs/heads/master/gd/rust/linux/mgmt/src/bin/btmanagerd/main.rs)
//!   [here](https://android.googlesource.com/platform/packages/modules/Bluetooth/+/refs/heads/master/system/gd/rust/linux/mgmt/src/bin/btmanagerd/main.rs)
//!   passing in the object path, D-Bus connection, Crossroads object, the Rust object to be
//!   passing in the object path, D-Bus connection, Crossroads object, the Rust object to be
//!   projected, and a [`DisconnectWatcher`](DisconnectWatcher) object.
//!   projected, and a [`DisconnectWatcher`](DisconnectWatcher) object.


+1 −1
Original line number Original line Diff line number Diff line
@@ -113,7 +113,7 @@ typedef void (*disconnect_callback)(int conn_id, int status, int client_if,
 */
 */
typedef void (*search_complete_callback)(int conn_id, int status);
typedef void (*search_complete_callback)(int conn_id, int status);


/** Callback invoked in response to [de]register_for_notification */
/** Callback invoked in response to (de)register_for_notification */
typedef void (*register_for_notification_callback)(int conn_id, int registered,
typedef void (*register_for_notification_callback)(int conn_id, int registered,
                                                   int status, uint16_t handle);
                                                   int status, uint16_t handle);