Skip to content

Commit

Permalink
Merge pull request #447 from ZettaScaleLabs/remove_publisher_set_methods
Browse files Browse the repository at this point in the history
Remove publisher set methods
  • Loading branch information
milyin authored Jun 12, 2024
2 parents 9972ea7 + 5358aad commit 6f484ef
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 48 deletions.
18 changes: 0 additions & 18 deletions include/zenoh_commons.h
Original file line number Diff line number Diff line change
Expand Up @@ -2310,24 +2310,6 @@ z_error_t z_publisher_put(const struct z_loaned_publisher_t *this_,
* Constructs the default value for `z_publisher_put_options_t`.
*/
ZENOHC_API void z_publisher_put_options_default(struct z_publisher_put_options_t *this_);
/**
* Sets allowed destination for the publisher
*/
ZENOHC_API
void z_publisher_set_allowed_destination(struct z_loaned_publisher_t *publisher,
enum zcu_locality_t destination);
/**
* Sets congestion control for the publisher
*/
ZENOHC_API
void z_publisher_set_congestion_control(struct z_loaned_publisher_t *publisher,
enum z_congestion_control_t congestion_control);
/**
* Sets priority for the publisher
*/
ZENOHC_API
void z_publisher_set_priority(struct z_loaned_publisher_t *publisher,
enum z_priority_t priority);
/**
* Publishes data on specified key expression.
*
Expand Down
30 changes: 0 additions & 30 deletions src/publisher.rs
Original file line number Diff line number Diff line change
Expand Up @@ -277,36 +277,6 @@ pub extern "C" fn z_publisher_keyexpr(publisher: &z_loaned_publisher_t) -> &z_lo
publisher.key_expr().transmute_handle()
}

/// Sets congestion control for the publisher
#[no_mangle]
pub extern "C" fn z_publisher_set_congestion_control(
publisher: &mut z_loaned_publisher_t,
congestion_control: z_congestion_control_t,
) {
let publisher = publisher.transmute_mut();
publisher.set_congestion_control(congestion_control.into())
}

/// Sets priority for the publisher
#[no_mangle]
pub extern "C" fn z_publisher_set_priority(
publisher: &mut z_loaned_publisher_t,
priority: z_priority_t,
) {
let publisher = publisher.transmute_mut();
publisher.set_priority(priority.into())
}

/// Sets allowed destination for the publisher
#[no_mangle]
pub extern "C" fn z_publisher_set_allowed_destination(
publisher: &mut z_loaned_publisher_t,
destination: zcu_locality_t,
) {
let publisher = publisher.transmute_mut();
publisher.set_allowed_destination(destination.into())
}

pub use crate::opaque_types::zcu_owned_matching_listener_t;
decl_transmute_owned!(
Option<MatchingListener<'static, DefaultHandler>>,
Expand Down

0 comments on commit 6f484ef

Please sign in to comment.