Skip to content

Commit 7265a4f

Browse files
committed
jni parameter removed
1 parent 55b2d33 commit 7265a4f

2 files changed

Lines changed: 20 additions & 20 deletions

File tree

zenoh-flat/src/ext.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ use crate::errors::{ZError, ZResult};
2929
use crate::zerror;
3030

3131
/// Flat cache configuration for an [`zenoh_ext::AdvancedPublisher`].
32-
#[prebindgen_proc_macro::prebindgen("jni")]
32+
#[prebindgen_proc_macro::prebindgen]
3333
#[derive(Debug, Clone)]
3434
pub struct CacheConfig {
3535
pub max_samples: i64,
@@ -41,7 +41,7 @@ pub struct CacheConfig {
4141
/// Flat history configuration for an [`zenoh_ext::AdvancedSubscriber`].
4242
///
4343
/// `max_samples <= 0` and `max_age_seconds <= 0.0` mean "unlimited".
44-
#[prebindgen_proc_macro::prebindgen("jni")]
44+
#[prebindgen_proc_macro::prebindgen]
4545
#[derive(Debug, Clone)]
4646
pub struct HistoryConfig {
4747
pub detect_late_publishers: bool,
@@ -55,7 +55,7 @@ pub struct HistoryConfig {
5555
/// `period_ms` — sporadic if `is_sporadic`, regular otherwise. When
5656
/// `enable_heartbeat` is `false`, the other fields are ignored and
5757
/// [`zenoh_ext::MissDetectionConfig::default`] is used as-is.
58-
#[prebindgen_proc_macro::prebindgen("jni")]
58+
#[prebindgen_proc_macro::prebindgen]
5959
#[derive(Debug, Clone)]
6060
pub struct MissDetectionConfig {
6161
pub enable_heartbeat: bool,
@@ -67,7 +67,7 @@ pub struct MissDetectionConfig {
6767
///
6868
/// When `is_heartbeat` is `true`, `period_ms` is ignored; otherwise
6969
/// `period_ms` is the `periodic_queries` period in milliseconds.
70-
#[prebindgen_proc_macro::prebindgen("jni")]
70+
#[prebindgen_proc_macro::prebindgen]
7171
#[derive(Debug, Clone)]
7272
pub struct RecoveryConfig {
7373
pub is_heartbeat: bool,

zenoh-flat/src/session.rs

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ impl<F: FnOnce()> Drop for CallOnDrop<F> {
5353
}
5454

5555
/// Open a Zenoh session using a borrowed configuration.
56-
#[prebindgen_proc_macro::prebindgen("jni")]
56+
#[prebindgen_proc_macro::prebindgen]
5757
pub fn open_session(config: &Config) -> ZResult<Session> {
5858
zenoh::open(config.clone())
5959
.wait()
@@ -68,7 +68,7 @@ pub fn open_session(config: &Config) -> ZResult<Session> {
6868
}
6969

7070
/// Declare a publisher through an existing Zenoh session.
71-
#[prebindgen_proc_macro::prebindgen("jni")]
71+
#[prebindgen_proc_macro::prebindgen]
7272
pub fn declare_publisher(
7373
session: &Session,
7474
key_expr: KeyExpr<'static>,
@@ -96,7 +96,7 @@ pub fn declare_publisher(
9696
}
9797

9898
/// Declare a key expression through an existing Zenoh session.
99-
#[prebindgen_proc_macro::prebindgen("jni")]
99+
#[prebindgen_proc_macro::prebindgen]
100100
pub fn declare_key_expr(session: &Session, key_expr: String) -> ZResult<KeyExpr<'static>> {
101101
let key_expr_clone = key_expr.clone();
102102
session
@@ -123,7 +123,7 @@ pub fn declare_key_expr(session: &Session, key_expr: String) -> ZResult<KeyExpr<
123123
///
124124
/// Takes the `KeyExpr` by value so the caller can relinquish ownership. After
125125
/// this call the original JNI-side raw pointer is invalid.
126-
#[prebindgen_proc_macro::prebindgen("jni")]
126+
#[prebindgen_proc_macro::prebindgen]
127127
pub fn undeclare_key_expr(session: &Session, key_expr: KeyExpr<'static>) -> ZResult<()> {
128128
let key_expr_string = key_expr.to_string();
129129
session
@@ -146,7 +146,7 @@ pub fn undeclare_key_expr(session: &Session, key_expr: KeyExpr<'static>) -> ZRes
146146
}
147147

148148
/// Declare a subscriber through an existing Zenoh session.
149-
#[prebindgen_proc_macro::prebindgen("jni")]
149+
#[prebindgen_proc_macro::prebindgen]
150150
pub fn declare_subscriber(
151151
session: &Session,
152152
key_expr: KeyExpr<'static>,
@@ -173,7 +173,7 @@ pub fn declare_subscriber(
173173
}
174174

175175
/// Declare a querier through an existing Zenoh session.
176-
#[prebindgen_proc_macro::prebindgen("jni")]
176+
#[prebindgen_proc_macro::prebindgen]
177177
pub fn declare_querier(
178178
session: &Session,
179179
key_expr: KeyExpr<'static>,
@@ -207,7 +207,7 @@ pub fn declare_querier(
207207
}
208208

209209
/// Declare a queryable through an existing Zenoh session.
210-
#[prebindgen_proc_macro::prebindgen("jni")]
210+
#[prebindgen_proc_macro::prebindgen]
211211
pub fn declare_queryable(
212212
session: &Session,
213213
key_expr: KeyExpr<'static>,
@@ -245,7 +245,7 @@ pub fn declare_queryable(
245245
///
246246
/// Parameter order matches the JNI calling convention so the wrapper can be
247247
/// generated by `zenoh_flat::jni_converter` without reordering.
248-
#[prebindgen_proc_macro::prebindgen("jni")]
248+
#[prebindgen_proc_macro::prebindgen]
249249
pub fn get(
250250
session: &Session,
251251
key_expr: KeyExpr<'static>,
@@ -303,7 +303,7 @@ pub fn get(
303303
}
304304

305305
/// Perform a put operation through an existing Zenoh session.
306-
#[prebindgen_proc_macro::prebindgen("jni")]
306+
#[prebindgen_proc_macro::prebindgen]
307307
pub fn put(
308308
session: &Session,
309309
key_expr: KeyExpr<'static>,
@@ -340,7 +340,7 @@ pub fn put(
340340
}
341341

342342
/// Perform a delete operation through an existing Zenoh session.
343-
#[prebindgen_proc_macro::prebindgen("jni")]
343+
#[prebindgen_proc_macro::prebindgen]
344344
pub fn delete(
345345
session: &Session,
346346
key_expr: KeyExpr<'static>,
@@ -374,25 +374,25 @@ pub fn delete(
374374
}
375375

376376
/// Return the Zenoh ID of the session.
377-
#[prebindgen_proc_macro::prebindgen("jni")]
377+
#[prebindgen_proc_macro::prebindgen]
378378
pub fn get_zid(session: &Session) -> ZResult<ZenohId> {
379379
Ok(session.info().zid().wait())
380380
}
381381

382382
/// Return the Zenoh IDs of the peers connected to this session.
383-
#[prebindgen_proc_macro::prebindgen("jni")]
383+
#[prebindgen_proc_macro::prebindgen]
384384
pub fn get_peers_zid(session: &Session) -> ZResult<Vec<ZenohId>> {
385385
Ok(session.info().peers_zid().wait().collect())
386386
}
387387

388388
/// Return the Zenoh IDs of the routers connected to this session.
389-
#[prebindgen_proc_macro::prebindgen("jni")]
389+
#[prebindgen_proc_macro::prebindgen]
390390
pub fn get_routers_zid(session: &Session) -> ZResult<Vec<ZenohId>> {
391391
Ok(session.info().routers_zid().wait().collect())
392392
}
393393

394394
/// Close a Zenoh session using a reference to the session.
395-
#[prebindgen_proc_macro::prebindgen("jni")]
395+
#[prebindgen_proc_macro::prebindgen]
396396
pub fn close_session(session: &Session) -> ZResult<()> {
397397
session
398398
.close()
@@ -413,7 +413,7 @@ pub fn close_session(session: &Session) -> ZResult<()> {
413413
/// `HistoryConfig` / `RecoveryConfig` from primitive arguments and pass them
414414
/// here.
415415
#[cfg(feature = "zenoh-ext")]
416-
#[prebindgen_proc_macro::prebindgen("jni")]
416+
#[prebindgen_proc_macro::prebindgen]
417417
pub fn declare_advanced_subscriber(
418418
session: &Session,
419419
key_expr: KeyExpr<'static>,
@@ -463,7 +463,7 @@ pub fn declare_advanced_subscriber(
463463
/// `CacheConfig` / `MissDetectionConfig` from primitive arguments and pass
464464
/// them here.
465465
#[cfg(feature = "zenoh-ext")]
466-
#[prebindgen_proc_macro::prebindgen("jni")]
466+
#[prebindgen_proc_macro::prebindgen]
467467
pub fn declare_advanced_publisher(
468468
session: &Session,
469469
key_expr: KeyExpr<'static>,

0 commit comments

Comments
 (0)