Loading system/gd/rust/linux/dbus_projection/dbus_macros/src/lib.rs +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ pub fn dbus_method(_attr: TokenStream, item: TokenStream) -> TokenStream { /// Generates a function to export a Rust object to D-Bus. /// /// 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 /// D-Bus object having interface `org.example.FooInterface`. Loading system/gd/rust/linux/dbus_projection/src/lib.rs +7 −7 Original line number Diff line number Diff line Loading @@ -9,26 +9,26 @@ //! path. //! //! 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: //! //! * 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). //! * 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 //! [Orphan Rule](https://github.com/Ixrec/rust-orphan-rules). //! * 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 //! be of a Rust primitive type, structure, enum, or a callback specially typed as //! `Box<dyn SomeCallbackTrait + Send>`. Callback traits implement `RPCProxy`. //! * 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. //! * 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 //! trait. //! * Define a method name of each method with [`dbus_method`](dbus_macros::dbus_method) macro. Loading @@ -41,7 +41,7 @@ //! the [`impl_dbus_arg_enum`](impl_dbus_arg_enum) macro. //! * To project a Rust object to a D-Bus, call the function generated by //! [`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 //! projected, and a [`DisconnectWatcher`](DisconnectWatcher) object. Loading system/include/hardware/bt_gatt_client.h +1 −1 Original line number Diff line number Diff line Loading @@ -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); /** 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, int status, uint16_t handle); Loading Loading
system/gd/rust/linux/dbus_projection/dbus_macros/src/lib.rs +1 −1 Original line number Diff line number Diff line Loading @@ -45,7 +45,7 @@ pub fn dbus_method(_attr: TokenStream, item: TokenStream) -> TokenStream { /// Generates a function to export a Rust object to D-Bus. /// /// 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 /// D-Bus object having interface `org.example.FooInterface`. Loading
system/gd/rust/linux/dbus_projection/src/lib.rs +7 −7 Original line number Diff line number Diff line Loading @@ -9,26 +9,26 @@ //! path. //! //! 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: //! //! * 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). //! * 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 //! [Orphan Rule](https://github.com/Ixrec/rust-orphan-rules). //! * 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 //! be of a Rust primitive type, structure, enum, or a callback specially typed as //! `Box<dyn SomeCallbackTrait + Send>`. Callback traits implement `RPCProxy`. //! * 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. //! * 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 //! trait. //! * Define a method name of each method with [`dbus_method`](dbus_macros::dbus_method) macro. Loading @@ -41,7 +41,7 @@ //! the [`impl_dbus_arg_enum`](impl_dbus_arg_enum) macro. //! * To project a Rust object to a D-Bus, call the function generated by //! [`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 //! projected, and a [`DisconnectWatcher`](DisconnectWatcher) object. Loading
system/include/hardware/bt_gatt_client.h +1 −1 Original line number Diff line number Diff line Loading @@ -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); /** 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, int status, uint16_t handle); Loading