offline_protocol 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bdf9af19048fe51c054afa4ea38526ce0d228fe26c1e1a930b930e88a305324c
4
- data.tar.gz: 4b04d349cc032e9c0b08176403435f592fb30d8ed18ed45a066fc6373a87ff9f
3
+ metadata.gz: 330252f005937a592e90d5b5a307c3d3c57032737f5ba61ef35db77a1477d965
4
+ data.tar.gz: 8966afdf7d449e578bf5fd8f67b9c51241c645b754ecc9f763f043d232285ee5
5
5
  SHA512:
6
- metadata.gz: 764b1d1f6f1d7f8107bb6981ec85e0d4d5528f4a7e64e461a9fe192cc0ea21b1bb0fe066e8e95970b73e56c6fe44edae05802a3e9a6161e029da21cacaf037c2
7
- data.tar.gz: a9e9e7c47f336d991d23c085e3b832da8ab4eb54fbb45e439fafe9f6fe0bb72ff0409f103735072708415f2d61d266a6439696d04be460737eab8746c3c94bd4
6
+ metadata.gz: ec21cda69b9a1d23c9bd9842da783c75e8074b68bea05e5a7cac032f4027afe2221b927f466f1f218202ed976ef9cda043021ae6341aca46cdc54352d7449777
7
+ data.tar.gz: 87a06e1c37dcb956412df33bb149886d5075bc800303896b4ab38204d57cc62c167c3e2734271f0a949c46888e157b6176c05216706320ebaab3b054f388d8e4
data/README.md CHANGED
@@ -23,7 +23,7 @@ callback or a storage provider.
23
23
  | What | Where it comes from |
24
24
  |---|---|
25
25
  | Ruby 3.3 or later and the `ffi` gem, `~> 1.17` | Yours; `bundle install` in this directory installs the gem |
26
- | This binding | The [`offline_protocol`](https://rubygems.org/gems/offline_protocol) gem once a release publishes it (R7), or [`lib/offline_protocol.rb`](lib/offline_protocol.rb) on your load path |
26
+ | This binding | The [`offline_protocol`](https://rubygems.org/gems/offline_protocol) gem on RubyGems, published with each release (R7), or [`lib/offline_protocol.rb`](lib/offline_protocol.rb) on your load path |
27
27
  | `liboffline_protocol_uniffi.so` / `.dylib`, `offline_protocol_uniffi.dll` | The release's desktop archives, or `cargo build --release -p offline-protocol-uniffi` |
28
28
 
29
29
  The library is found on the loader's search path, and the loader reads the
@@ -40,17 +40,17 @@ upstream source on each crate's page) — the exact versions are listed below.
40
40
 
41
41
  Used by:
42
42
 
43
- - [offline-protocol 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
44
- - [offline-protocol-core 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
45
- - [offline-protocol-data 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
46
- - [offline-protocol-mls 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
47
- - [offline-protocol-reliability 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
48
- - [offline-protocol-router 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
49
- - [offline-protocol-sealed 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
50
- - [offline-protocol-services 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
51
- - [offline-protocol-telemetry-wire 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
52
- - [offline-protocol-transport 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
53
- - [offline-protocol-uniffi 0.31.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
43
+ - [offline-protocol 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
44
+ - [offline-protocol-core 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
45
+ - [offline-protocol-data 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
46
+ - [offline-protocol-mls 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
47
+ - [offline-protocol-reliability 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
48
+ - [offline-protocol-router 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
49
+ - [offline-protocol-sealed 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
50
+ - [offline-protocol-services 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
51
+ - [offline-protocol-telemetry-wire 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
52
+ - [offline-protocol-transport 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
53
+ - [offline-protocol-uniffi 0.33.0](https://github.com/Offline-Protocol/offline-protocol-sdk)
54
54
 
55
55
  ```
56
56
  GNU AFFERO GENERAL PUBLIC LICENSE
@@ -5479,7 +5479,7 @@ Used by:
5479
5479
  - [pin-project-lite 0.2.16](https://github.com/taiki-e/pin-project-lite)
5480
5480
  - [proc-macro2 1.0.103](https://github.com/dtolnay/proc-macro2)
5481
5481
  - [quote 1.0.41](https://github.com/dtolnay/quote)
5482
- - [rustix 1.1.5](https://github.com/bytecodealliance/rustix)
5482
+ - [rustix 1.1.6](https://github.com/bytecodealliance/rustix)
5483
5483
  - [semver 1.0.27](https://github.com/dtolnay/semver)
5484
5484
  - [serde 1.0.229](https://github.com/serde-rs/serde)
5485
5485
  - [serde_bytes 0.11.19](https://github.com/serde-rs/bytes)
@@ -1230,6 +1230,103 @@ private_constant :UniffiHandleMap
1230
1230
  end
1231
1231
  end
1232
1232
 
1233
+ # The Record type ServicePublishReport.
1234
+
1235
+ def self.check_lower_TypeServicePublishReport(v)
1236
+
1237
+
1238
+
1239
+
1240
+
1241
+ end
1242
+
1243
+ def self.alloc_from_TypeServicePublishReport(v)
1244
+ RustBuffer.allocWithBuilder do |builder|
1245
+ builder.write_TypeServicePublishReport(v)
1246
+ return builder.finalize
1247
+ end
1248
+ end
1249
+
1250
+ def consume_into_TypeServicePublishReport
1251
+ consumeWithStream do |stream|
1252
+ return stream.read_TypeServicePublishReport
1253
+ end
1254
+ end
1255
+
1256
+ # The Record type ServiceSubscriberInfo.
1257
+
1258
+ def self.check_lower_TypeServiceSubscriberInfo(v)
1259
+
1260
+
1261
+
1262
+
1263
+ RustBuffer.check_lower_TypeSubscriptionMode(v.mode)
1264
+ RustBuffer.check_lower_TypeSubscriptionState(v.state)
1265
+
1266
+ RustBuffer.check_lower_Sequencestring(v.keys)
1267
+ end
1268
+
1269
+ def self.alloc_from_TypeServiceSubscriberInfo(v)
1270
+ RustBuffer.allocWithBuilder do |builder|
1271
+ builder.write_TypeServiceSubscriberInfo(v)
1272
+ return builder.finalize
1273
+ end
1274
+ end
1275
+
1276
+ def consume_into_TypeServiceSubscriberInfo
1277
+ consumeWithStream do |stream|
1278
+ return stream.read_TypeServiceSubscriberInfo
1279
+ end
1280
+ end
1281
+
1282
+ # The Record type ServiceSubscriptionInfo.
1283
+
1284
+ def self.check_lower_TypeServiceSubscriptionInfo(v)
1285
+
1286
+
1287
+
1288
+
1289
+ RustBuffer.check_lower_TypeSubscriptionMode(v.mode)
1290
+ RustBuffer.check_lower_TypeSubscriptionState(v.state)
1291
+ RustBuffer.check_lower_Sequencestring(v.keys)
1292
+ RustBuffer.check_lower_Sequencestring(v.topics)
1293
+ end
1294
+
1295
+ def self.alloc_from_TypeServiceSubscriptionInfo(v)
1296
+ RustBuffer.allocWithBuilder do |builder|
1297
+ builder.write_TypeServiceSubscriptionInfo(v)
1298
+ return builder.finalize
1299
+ end
1300
+ end
1301
+
1302
+ def consume_into_TypeServiceSubscriptionInfo
1303
+ consumeWithStream do |stream|
1304
+ return stream.read_TypeServiceSubscriptionInfo
1305
+ end
1306
+ end
1307
+
1308
+ # The Record type SubscriptionPolicyConfig.
1309
+
1310
+ def self.check_lower_TypeSubscriptionPolicyConfig(v)
1311
+ RustBuffer.check_lower_TypeSubscriptionPolicyKind(v.kind)
1312
+ RustBuffer.check_lower_Sequencestring(v.allow_peers)
1313
+ RustBuffer.check_lower_Sequencestring(v.allow_groups)
1314
+ RustBuffer.check_lower_TypeSubscriptionRulesFallback(v.rules_fallback)
1315
+ end
1316
+
1317
+ def self.alloc_from_TypeSubscriptionPolicyConfig(v)
1318
+ RustBuffer.allocWithBuilder do |builder|
1319
+ builder.write_TypeSubscriptionPolicyConfig(v)
1320
+ return builder.finalize
1321
+ end
1322
+ end
1323
+
1324
+ def consume_into_TypeSubscriptionPolicyConfig
1325
+ consumeWithStream do |stream|
1326
+ return stream.read_TypeSubscriptionPolicyConfig
1327
+ end
1328
+ end
1329
+
1233
1330
  # The Record type TelemetryConfig.
1234
1331
 
1235
1332
  def self.check_lower_TypeTelemetryConfig(v)
@@ -1592,6 +1689,82 @@ private_constant :UniffiHandleMap
1592
1689
  end
1593
1690
 
1594
1691
 
1692
+ # The Enum type SubscriptionMode.
1693
+
1694
+ def self.check_lower_TypeSubscriptionMode(v)
1695
+ end
1696
+
1697
+ def self.alloc_from_TypeSubscriptionMode(v)
1698
+ RustBuffer.allocWithBuilder do |builder|
1699
+ builder.write_TypeSubscriptionMode(v)
1700
+ return builder.finalize
1701
+ end
1702
+ end
1703
+
1704
+ def consume_into_TypeSubscriptionMode
1705
+ consumeWithStream do |stream|
1706
+ return stream.read_TypeSubscriptionMode
1707
+ end
1708
+ end
1709
+
1710
+
1711
+ # The Enum type SubscriptionPolicyKind.
1712
+
1713
+ def self.check_lower_TypeSubscriptionPolicyKind(v)
1714
+ end
1715
+
1716
+ def self.alloc_from_TypeSubscriptionPolicyKind(v)
1717
+ RustBuffer.allocWithBuilder do |builder|
1718
+ builder.write_TypeSubscriptionPolicyKind(v)
1719
+ return builder.finalize
1720
+ end
1721
+ end
1722
+
1723
+ def consume_into_TypeSubscriptionPolicyKind
1724
+ consumeWithStream do |stream|
1725
+ return stream.read_TypeSubscriptionPolicyKind
1726
+ end
1727
+ end
1728
+
1729
+
1730
+ # The Enum type SubscriptionRulesFallback.
1731
+
1732
+ def self.check_lower_TypeSubscriptionRulesFallback(v)
1733
+ end
1734
+
1735
+ def self.alloc_from_TypeSubscriptionRulesFallback(v)
1736
+ RustBuffer.allocWithBuilder do |builder|
1737
+ builder.write_TypeSubscriptionRulesFallback(v)
1738
+ return builder.finalize
1739
+ end
1740
+ end
1741
+
1742
+ def consume_into_TypeSubscriptionRulesFallback
1743
+ consumeWithStream do |stream|
1744
+ return stream.read_TypeSubscriptionRulesFallback
1745
+ end
1746
+ end
1747
+
1748
+
1749
+ # The Enum type SubscriptionState.
1750
+
1751
+ def self.check_lower_TypeSubscriptionState(v)
1752
+ end
1753
+
1754
+ def self.alloc_from_TypeSubscriptionState(v)
1755
+ RustBuffer.allocWithBuilder do |builder|
1756
+ builder.write_TypeSubscriptionState(v)
1757
+ return builder.finalize
1758
+ end
1759
+ end
1760
+
1761
+ def consume_into_TypeSubscriptionState
1762
+ consumeWithStream do |stream|
1763
+ return stream.read_TypeSubscriptionState
1764
+ end
1765
+ end
1766
+
1767
+
1595
1768
  # The Enum type TelemetryOs.
1596
1769
 
1597
1770
  def self.check_lower_TypeTelemetryOs(v)
@@ -2386,6 +2559,48 @@ private_constant :UniffiHandleMap
2386
2559
  end
2387
2560
  end
2388
2561
 
2562
+ # The Sequence<T> type for TypeServiceSubscriberInfo.
2563
+
2564
+ def self.check_lower_SequenceTypeServiceSubscriberInfo(v)
2565
+ v.each do |item|
2566
+ RustBuffer.check_lower_TypeServiceSubscriberInfo(item)
2567
+ end
2568
+ end
2569
+
2570
+ def self.alloc_from_SequenceTypeServiceSubscriberInfo(v)
2571
+ RustBuffer.allocWithBuilder do |builder|
2572
+ builder.write_SequenceTypeServiceSubscriberInfo(v)
2573
+ return builder.finalize()
2574
+ end
2575
+ end
2576
+
2577
+ def consume_into_SequenceTypeServiceSubscriberInfo
2578
+ consumeWithStream do |stream|
2579
+ return stream.read_SequenceTypeServiceSubscriberInfo
2580
+ end
2581
+ end
2582
+
2583
+ # The Sequence<T> type for TypeServiceSubscriptionInfo.
2584
+
2585
+ def self.check_lower_SequenceTypeServiceSubscriptionInfo(v)
2586
+ v.each do |item|
2587
+ RustBuffer.check_lower_TypeServiceSubscriptionInfo(item)
2588
+ end
2589
+ end
2590
+
2591
+ def self.alloc_from_SequenceTypeServiceSubscriptionInfo(v)
2592
+ RustBuffer.allocWithBuilder do |builder|
2593
+ builder.write_SequenceTypeServiceSubscriptionInfo(v)
2594
+ return builder.finalize()
2595
+ end
2596
+ end
2597
+
2598
+ def consume_into_SequenceTypeServiceSubscriptionInfo
2599
+ consumeWithStream do |stream|
2600
+ return stream.read_SequenceTypeServiceSubscriptionInfo
2601
+ end
2602
+ end
2603
+
2389
2604
 
2390
2605
  # The Map<T> type for MapStringString.
2391
2606
 
@@ -3090,6 +3305,59 @@ class RustBufferStream
3090
3305
  )
3091
3306
  end
3092
3307
 
3308
+ # The Record type ServicePublishReport.
3309
+
3310
+ def read_TypeServicePublishReport
3311
+ ServicePublishReport.new(
3312
+ subscribers: read_u32,
3313
+ sent_live: read_u32,
3314
+ queued: read_u32,
3315
+ coalesced: read_u32,
3316
+ failed: read_u32
3317
+ )
3318
+ end
3319
+
3320
+ # The Record type ServiceSubscriberInfo.
3321
+
3322
+ def read_TypeServiceSubscriberInfo
3323
+ ServiceSubscriberInfo.new(
3324
+ sub_id: read_string,
3325
+ subscriber: read_string,
3326
+ service_id: read_string,
3327
+ topic: read_string,
3328
+ mode: read_TypeSubscriptionMode,
3329
+ state: read_TypeSubscriptionState,
3330
+ params: read_string,
3331
+ keys: read_Sequencestring
3332
+ )
3333
+ end
3334
+
3335
+ # The Record type ServiceSubscriptionInfo.
3336
+
3337
+ def read_TypeServiceSubscriptionInfo
3338
+ ServiceSubscriptionInfo.new(
3339
+ sub_id: read_string,
3340
+ provider: read_string,
3341
+ service_id: read_string,
3342
+ topic: read_string,
3343
+ mode: read_TypeSubscriptionMode,
3344
+ state: read_TypeSubscriptionState,
3345
+ keys: read_Sequencestring,
3346
+ topics: read_Sequencestring
3347
+ )
3348
+ end
3349
+
3350
+ # The Record type SubscriptionPolicyConfig.
3351
+
3352
+ def read_TypeSubscriptionPolicyConfig
3353
+ SubscriptionPolicyConfig.new(
3354
+ kind: read_TypeSubscriptionPolicyKind,
3355
+ allow_peers: read_Sequencestring,
3356
+ allow_groups: read_Sequencestring,
3357
+ rules_fallback: read_TypeSubscriptionRulesFallback
3358
+ )
3359
+ end
3360
+
3093
3361
  # The Record type TelemetryConfig.
3094
3362
 
3095
3363
  def read_TypeTelemetryConfig
@@ -3596,6 +3864,91 @@ class RustBufferStream
3596
3864
 
3597
3865
 
3598
3866
 
3867
+ # The Enum type SubscriptionMode.
3868
+
3869
+ def read_TypeSubscriptionMode
3870
+ variant = unpack_from 4, 'l>'
3871
+
3872
+ if variant == 1
3873
+ return SubscriptionMode::LATEST
3874
+ end
3875
+ if variant == 2
3876
+ return SubscriptionMode::LOG
3877
+ end
3878
+
3879
+ raise InternalError, 'Unexpected variant tag for TypeSubscriptionMode'
3880
+ end
3881
+
3882
+
3883
+
3884
+
3885
+
3886
+ # The Enum type SubscriptionPolicyKind.
3887
+
3888
+ def read_TypeSubscriptionPolicyKind
3889
+ variant = unpack_from 4, 'l>'
3890
+
3891
+ if variant == 1
3892
+ return SubscriptionPolicyKind::RESTRICTED
3893
+ end
3894
+ if variant == 2
3895
+ return SubscriptionPolicyKind::ACCEPT_ALL
3896
+ end
3897
+ if variant == 3
3898
+ return SubscriptionPolicyKind::RULES
3899
+ end
3900
+
3901
+ raise InternalError, 'Unexpected variant tag for TypeSubscriptionPolicyKind'
3902
+ end
3903
+
3904
+
3905
+
3906
+
3907
+
3908
+ # The Enum type SubscriptionRulesFallback.
3909
+
3910
+ def read_TypeSubscriptionRulesFallback
3911
+ variant = unpack_from 4, 'l>'
3912
+
3913
+ if variant == 1
3914
+ return SubscriptionRulesFallback::ASK
3915
+ end
3916
+ if variant == 2
3917
+ return SubscriptionRulesFallback::REJECT
3918
+ end
3919
+
3920
+ raise InternalError, 'Unexpected variant tag for TypeSubscriptionRulesFallback'
3921
+ end
3922
+
3923
+
3924
+
3925
+
3926
+
3927
+ # The Enum type SubscriptionState.
3928
+
3929
+ def read_TypeSubscriptionState
3930
+ variant = unpack_from 4, 'l>'
3931
+
3932
+ if variant == 1
3933
+ return SubscriptionState::PENDING
3934
+ end
3935
+ if variant == 2
3936
+ return SubscriptionState::ACTIVE
3937
+ end
3938
+ if variant == 3
3939
+ return SubscriptionState::PAUSED
3940
+ end
3941
+ if variant == 4
3942
+ return SubscriptionState::ENDED
3943
+ end
3944
+
3945
+ raise InternalError, 'Unexpected variant tag for TypeSubscriptionState'
3946
+ end
3947
+
3948
+
3949
+
3950
+
3951
+
3599
3952
  # The Enum type TelemetryOs.
3600
3953
 
3601
3954
  def read_TypeTelemetryOs
@@ -4227,6 +4580,38 @@ class RustBufferStream
4227
4580
  items
4228
4581
  end
4229
4582
 
4583
+ # The Sequence<T> type for TypeServiceSubscriberInfo.
4584
+
4585
+ def read_SequenceTypeServiceSubscriberInfo
4586
+ count = unpack_from 4, 'l>'
4587
+
4588
+ raise InternalError, 'Unexpected negative sequence length' if count.negative?
4589
+
4590
+ items = []
4591
+
4592
+ count.times do
4593
+ items.append read_TypeServiceSubscriberInfo
4594
+ end
4595
+
4596
+ items
4597
+ end
4598
+
4599
+ # The Sequence<T> type for TypeServiceSubscriptionInfo.
4600
+
4601
+ def read_SequenceTypeServiceSubscriptionInfo
4602
+ count = unpack_from 4, 'l>'
4603
+
4604
+ raise InternalError, 'Unexpected negative sequence length' if count.negative?
4605
+
4606
+ items = []
4607
+
4608
+ count.times do
4609
+ items.append read_TypeServiceSubscriptionInfo
4610
+ end
4611
+
4612
+ items
4613
+ end
4614
+
4230
4615
  # The Map<T> type for MapStringString.
4231
4616
 
4232
4617
  def read_MapStringString
@@ -4842,6 +5227,51 @@ class RustBufferBuilder
4842
5227
  self.write_Optionalstring(v.app_id)
4843
5228
  end
4844
5229
 
5230
+ # The Record type ServicePublishReport.
5231
+
5232
+ def write_TypeServicePublishReport(v)
5233
+ self.write_u32(v.subscribers)
5234
+ self.write_u32(v.sent_live)
5235
+ self.write_u32(v.queued)
5236
+ self.write_u32(v.coalesced)
5237
+ self.write_u32(v.failed)
5238
+ end
5239
+
5240
+ # The Record type ServiceSubscriberInfo.
5241
+
5242
+ def write_TypeServiceSubscriberInfo(v)
5243
+ self.write_string(v.sub_id)
5244
+ self.write_string(v.subscriber)
5245
+ self.write_string(v.service_id)
5246
+ self.write_string(v.topic)
5247
+ self.write_TypeSubscriptionMode(v.mode)
5248
+ self.write_TypeSubscriptionState(v.state)
5249
+ self.write_string(v.params)
5250
+ self.write_Sequencestring(v.keys)
5251
+ end
5252
+
5253
+ # The Record type ServiceSubscriptionInfo.
5254
+
5255
+ def write_TypeServiceSubscriptionInfo(v)
5256
+ self.write_string(v.sub_id)
5257
+ self.write_string(v.provider)
5258
+ self.write_string(v.service_id)
5259
+ self.write_string(v.topic)
5260
+ self.write_TypeSubscriptionMode(v.mode)
5261
+ self.write_TypeSubscriptionState(v.state)
5262
+ self.write_Sequencestring(v.keys)
5263
+ self.write_Sequencestring(v.topics)
5264
+ end
5265
+
5266
+ # The Record type SubscriptionPolicyConfig.
5267
+
5268
+ def write_TypeSubscriptionPolicyConfig(v)
5269
+ self.write_TypeSubscriptionPolicyKind(v.kind)
5270
+ self.write_Sequencestring(v.allow_peers)
5271
+ self.write_Sequencestring(v.allow_groups)
5272
+ self.write_TypeSubscriptionRulesFallback(v.rules_fallback)
5273
+ end
5274
+
4845
5275
  # The Record type TelemetryConfig.
4846
5276
 
4847
5277
  def write_TypeTelemetryConfig(v)
@@ -5220,6 +5650,63 @@ class RustBufferBuilder
5220
5650
  end
5221
5651
 
5222
5652
 
5653
+ # The Enum type SubscriptionMode.
5654
+
5655
+ def write_TypeSubscriptionMode(v)
5656
+ if v == SubscriptionMode::LATEST
5657
+ pack_into(4, 'l>', 1)
5658
+ end
5659
+ if v == SubscriptionMode::LOG
5660
+ pack_into(4, 'l>', 2)
5661
+ end
5662
+ end
5663
+
5664
+
5665
+ # The Enum type SubscriptionPolicyKind.
5666
+
5667
+ def write_TypeSubscriptionPolicyKind(v)
5668
+ if v == SubscriptionPolicyKind::RESTRICTED
5669
+ pack_into(4, 'l>', 1)
5670
+ end
5671
+ if v == SubscriptionPolicyKind::ACCEPT_ALL
5672
+ pack_into(4, 'l>', 2)
5673
+ end
5674
+ if v == SubscriptionPolicyKind::RULES
5675
+ pack_into(4, 'l>', 3)
5676
+ end
5677
+ end
5678
+
5679
+
5680
+ # The Enum type SubscriptionRulesFallback.
5681
+
5682
+ def write_TypeSubscriptionRulesFallback(v)
5683
+ if v == SubscriptionRulesFallback::ASK
5684
+ pack_into(4, 'l>', 1)
5685
+ end
5686
+ if v == SubscriptionRulesFallback::REJECT
5687
+ pack_into(4, 'l>', 2)
5688
+ end
5689
+ end
5690
+
5691
+
5692
+ # The Enum type SubscriptionState.
5693
+
5694
+ def write_TypeSubscriptionState(v)
5695
+ if v == SubscriptionState::PENDING
5696
+ pack_into(4, 'l>', 1)
5697
+ end
5698
+ if v == SubscriptionState::ACTIVE
5699
+ pack_into(4, 'l>', 2)
5700
+ end
5701
+ if v == SubscriptionState::PAUSED
5702
+ pack_into(4, 'l>', 3)
5703
+ end
5704
+ if v == SubscriptionState::ENDED
5705
+ pack_into(4, 'l>', 4)
5706
+ end
5707
+ end
5708
+
5709
+
5223
5710
  # The Enum type TelemetryOs.
5224
5711
 
5225
5712
  def write_TypeTelemetryOs(v)
@@ -5683,6 +6170,26 @@ class RustBufferBuilder
5683
6170
  end
5684
6171
  end
5685
6172
 
6173
+ # The Sequence<T> type for TypeServiceSubscriberInfo.
6174
+
6175
+ def write_SequenceTypeServiceSubscriberInfo(items)
6176
+ pack_into(4, 'l>', items.size)
6177
+
6178
+ items.each do |item|
6179
+ self.write_TypeServiceSubscriberInfo(item)
6180
+ end
6181
+ end
6182
+
6183
+ # The Sequence<T> type for TypeServiceSubscriptionInfo.
6184
+
6185
+ def write_SequenceTypeServiceSubscriptionInfo(items)
6186
+ pack_into(4, 'l>', items.size)
6187
+
6188
+ items.each do |item|
6189
+ self.write_TypeServiceSubscriptionInfo(item)
6190
+ end
6191
+ end
6192
+
5686
6193
  # The Map<T> type for MapStringString.
5687
6194
 
5688
6195
  def write_MapStringString(items)
@@ -5786,7 +6293,11 @@ class ProtocolError
5786
6293
  DataCorrupted = Class.new StandardError
5787
6294
  TelemetryConfigInvalid = Class.new StandardError
5788
6295
 
5789
- end
6296
+ end
6297
+
6298
+
6299
+
6300
+
5790
6301
 
5791
6302
 
5792
6303
 
@@ -6282,26 +6793,74 @@ module UniFFILib
6282
6793
  [:uint64, RustCallStatus.by_ref],
6283
6794
  :uint64
6284
6795
 
6796
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_accept_service_subscription,
6797
+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],
6798
+ :void
6799
+
6800
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_clear_service_topic,
6801
+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6802
+ :void
6803
+
6285
6804
  attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_discover_services,
6286
6805
  [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],
6287
6806
  RustBuffer.by_value
6288
6807
 
6808
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_end_service_subscription,
6809
+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6810
+ :void
6811
+
6812
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_publish_service_update,
6813
+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6814
+ RustBuffer.by_value
6815
+
6289
6816
  attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_register_service,
6290
6817
  [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6291
6818
  :void
6292
6819
 
6820
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_reject_service_subscription,
6821
+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6822
+ :void
6823
+
6293
6824
  attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_respond_to_service_request,
6294
6825
  [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6295
6826
  RustBuffer.by_value
6296
6827
 
6828
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_resync_service_subscription,
6829
+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],
6830
+ :void
6831
+
6297
6832
  attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_send_service_request,
6298
6833
  [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6299
6834
  RustBuffer.by_value
6300
6835
 
6836
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_service_subscribers,
6837
+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],
6838
+ RustBuffer.by_value
6839
+
6840
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_service_subscriptions,
6841
+ [:uint64, RustCallStatus.by_ref],
6842
+ RustBuffer.by_value
6843
+
6844
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_set_service_subscription_policy,
6845
+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6846
+ :void
6847
+
6848
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_set_service_topic_checkpoint,
6849
+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6850
+ :void
6851
+
6852
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_subscribe_service,
6853
+ [:uint64, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustBuffer.by_value, RustCallStatus.by_ref],
6854
+ RustBuffer.by_value
6855
+
6301
6856
  attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_unregister_service,
6302
6857
  [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],
6303
6858
  :int8
6304
6859
 
6860
+ attach_function :uniffi_offline_protocol_uniffi_fn_method_meshservices_unsubscribe_service,
6861
+ [:uint64, RustBuffer.by_value, RustCallStatus.by_ref],
6862
+ :int8
6863
+
6305
6864
  attach_function :uniffi_offline_protocol_uniffi_fn_clone_offlineprotocol,
6306
6865
  [:uint64, RustCallStatus.by_ref],
6307
6866
  :uint64
@@ -7434,26 +7993,74 @@ module UniFFILib
7434
7993
  [],
7435
7994
  :uint16
7436
7995
 
7996
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_accept_service_subscription,
7997
+ [],
7998
+ :uint16
7999
+
8000
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_clear_service_topic,
8001
+ [],
8002
+ :uint16
8003
+
7437
8004
  attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_discover_services,
7438
8005
  [],
7439
8006
  :uint16
7440
8007
 
8008
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_end_service_subscription,
8009
+ [],
8010
+ :uint16
8011
+
8012
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_publish_service_update,
8013
+ [],
8014
+ :uint16
8015
+
7441
8016
  attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_register_service,
7442
8017
  [],
7443
8018
  :uint16
7444
8019
 
8020
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_reject_service_subscription,
8021
+ [],
8022
+ :uint16
8023
+
7445
8024
  attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_respond_to_service_request,
7446
8025
  [],
7447
8026
  :uint16
7448
8027
 
8028
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_resync_service_subscription,
8029
+ [],
8030
+ :uint16
8031
+
7449
8032
  attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_send_service_request,
7450
8033
  [],
7451
8034
  :uint16
7452
8035
 
8036
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_service_subscribers,
8037
+ [],
8038
+ :uint16
8039
+
8040
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_service_subscriptions,
8041
+ [],
8042
+ :uint16
8043
+
8044
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_set_service_subscription_policy,
8045
+ [],
8046
+ :uint16
8047
+
8048
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_set_service_topic_checkpoint,
8049
+ [],
8050
+ :uint16
8051
+
8052
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_subscribe_service,
8053
+ [],
8054
+ :uint16
8055
+
7453
8056
  attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_unregister_service,
7454
8057
  [],
7455
8058
  :uint16
7456
8059
 
8060
+ attach_function :uniffi_offline_protocol_uniffi_checksum_method_meshservices_unsubscribe_service,
8061
+ [],
8062
+ :uint16
8063
+
7457
8064
  attach_function :uniffi_offline_protocol_uniffi_checksum_method_offlineprotocol_accept_connection_request,
7458
8065
  [],
7459
8066
  :uint16
@@ -8421,6 +9028,53 @@ end
8421
9028
 
8422
9029
 
8423
9030
 
9031
+ class SubscriptionMode
9032
+ LATEST = 0
9033
+ LOG = 1
9034
+
9035
+ end
9036
+
9037
+
9038
+
9039
+
9040
+
9041
+
9042
+ class SubscriptionPolicyKind
9043
+ RESTRICTED = 0
9044
+ ACCEPT_ALL = 1
9045
+ RULES = 2
9046
+
9047
+ end
9048
+
9049
+
9050
+
9051
+
9052
+
9053
+
9054
+ class SubscriptionRulesFallback
9055
+ ASK = 0
9056
+ REJECT = 1
9057
+
9058
+ end
9059
+
9060
+
9061
+
9062
+
9063
+
9064
+
9065
+ class SubscriptionState
9066
+ PENDING = 0
9067
+ ACTIVE = 1
9068
+ PAUSED = 2
9069
+ ENDED = 3
9070
+
9071
+ end
9072
+
9073
+
9074
+
9075
+
9076
+
9077
+
8424
9078
  class TelemetryOs
8425
9079
  IOS = 0
8426
9080
  ANDROID = 1
@@ -10121,6 +10775,162 @@ class SendMessageOptions
10121
10775
  true
10122
10776
  end
10123
10777
 
10778
+ end
10779
+
10780
+ # Record type ServicePublishReport
10781
+ class ServicePublishReport
10782
+ attr_reader :subscribers, :sent_live, :queued, :coalesced, :failed
10783
+
10784
+ def initialize(subscribers:, sent_live:, queued:, coalesced:, failed:)
10785
+ @subscribers = subscribers
10786
+ @sent_live = sent_live
10787
+ @queued = queued
10788
+ @coalesced = coalesced
10789
+ @failed = failed
10790
+ end
10791
+
10792
+ def ==(other)
10793
+ if @subscribers != other.subscribers
10794
+ return false
10795
+ end
10796
+ if @sent_live != other.sent_live
10797
+ return false
10798
+ end
10799
+ if @queued != other.queued
10800
+ return false
10801
+ end
10802
+ if @coalesced != other.coalesced
10803
+ return false
10804
+ end
10805
+ if @failed != other.failed
10806
+ return false
10807
+ end
10808
+
10809
+ true
10810
+ end
10811
+
10812
+ end
10813
+
10814
+ # Record type ServiceSubscriberInfo
10815
+ class ServiceSubscriberInfo
10816
+ attr_reader :sub_id, :subscriber, :service_id, :topic, :mode, :state, :params, :keys
10817
+
10818
+ def initialize(sub_id:, subscriber:, service_id:, topic:, mode:, state:, params:, keys:)
10819
+ @sub_id = sub_id
10820
+ @subscriber = subscriber
10821
+ @service_id = service_id
10822
+ @topic = topic
10823
+ @mode = mode
10824
+ @state = state
10825
+ @params = params
10826
+ @keys = keys
10827
+ end
10828
+
10829
+ def ==(other)
10830
+ if @sub_id != other.sub_id
10831
+ return false
10832
+ end
10833
+ if @subscriber != other.subscriber
10834
+ return false
10835
+ end
10836
+ if @service_id != other.service_id
10837
+ return false
10838
+ end
10839
+ if @topic != other.topic
10840
+ return false
10841
+ end
10842
+ if @mode != other.mode
10843
+ return false
10844
+ end
10845
+ if @state != other.state
10846
+ return false
10847
+ end
10848
+ if @params != other.params
10849
+ return false
10850
+ end
10851
+ if @keys != other.keys
10852
+ return false
10853
+ end
10854
+
10855
+ true
10856
+ end
10857
+
10858
+ end
10859
+
10860
+ # Record type ServiceSubscriptionInfo
10861
+ class ServiceSubscriptionInfo
10862
+ attr_reader :sub_id, :provider, :service_id, :topic, :mode, :state, :keys, :topics
10863
+
10864
+ def initialize(sub_id:, provider:, service_id:, topic:, mode:, state:, keys:, topics:)
10865
+ @sub_id = sub_id
10866
+ @provider = provider
10867
+ @service_id = service_id
10868
+ @topic = topic
10869
+ @mode = mode
10870
+ @state = state
10871
+ @keys = keys
10872
+ @topics = topics
10873
+ end
10874
+
10875
+ def ==(other)
10876
+ if @sub_id != other.sub_id
10877
+ return false
10878
+ end
10879
+ if @provider != other.provider
10880
+ return false
10881
+ end
10882
+ if @service_id != other.service_id
10883
+ return false
10884
+ end
10885
+ if @topic != other.topic
10886
+ return false
10887
+ end
10888
+ if @mode != other.mode
10889
+ return false
10890
+ end
10891
+ if @state != other.state
10892
+ return false
10893
+ end
10894
+ if @keys != other.keys
10895
+ return false
10896
+ end
10897
+ if @topics != other.topics
10898
+ return false
10899
+ end
10900
+
10901
+ true
10902
+ end
10903
+
10904
+ end
10905
+
10906
+ # Record type SubscriptionPolicyConfig
10907
+ class SubscriptionPolicyConfig
10908
+ attr_reader :kind, :allow_peers, :allow_groups, :rules_fallback
10909
+
10910
+ def initialize(kind: SubscriptionPolicyKind::RESTRICTED, allow_peers: [], allow_groups: [], rules_fallback: SubscriptionRulesFallback::ASK)
10911
+ @kind = kind
10912
+ @allow_peers = allow_peers
10913
+ @allow_groups = allow_groups
10914
+ @rules_fallback = rules_fallback
10915
+ end
10916
+
10917
+ def ==(other)
10918
+ if @kind != other.kind
10919
+ return false
10920
+ end
10921
+ if @allow_peers != other.allow_peers
10922
+ return false
10923
+ end
10924
+ if @allow_groups != other.allow_groups
10925
+ return false
10926
+ end
10927
+ if @rules_fallback != other.rules_fallback
10928
+ return false
10929
+ end
10930
+
10931
+ true
10932
+ end
10933
+
10124
10934
  end
10125
10935
 
10126
10936
  # Record type TelemetryConfig
@@ -10837,12 +11647,46 @@ end
10837
11647
 
10838
11648
 
10839
11649
 
11650
+ def accept_service_subscription(sub_id)
11651
+ sub_id = ::OfflineProtocol::uniffi_utf8(sub_id)
11652
+
11653
+ ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_accept_service_subscription,uniffi_clone_handle(),RustBuffer.alloc_from_string(sub_id))
11654
+ end
11655
+
11656
+ def clear_service_topic(service_id, topic)
11657
+ service_id = ::OfflineProtocol::uniffi_utf8(service_id)
11658
+
11659
+ topic = ::OfflineProtocol::uniffi_utf8(topic)
11660
+
11661
+ ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_clear_service_topic,uniffi_clone_handle(),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_string(topic))
11662
+ end
11663
+
10840
11664
  def discover_services(service_id)
10841
11665
  service_id = (service_id ? ::OfflineProtocol::uniffi_utf8(service_id) : nil)
10842
11666
  RustBuffer.check_lower_Optionalstring(service_id)
10843
11667
  result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_discover_services,uniffi_clone_handle(),RustBuffer.alloc_from_Optionalstring(service_id))
10844
11668
  return result.consume_into_string
10845
11669
  end
11670
+ def end_service_subscription(sub_id, reason)
11671
+ sub_id = ::OfflineProtocol::uniffi_utf8(sub_id)
11672
+
11673
+ reason = ::OfflineProtocol::uniffi_utf8(reason)
11674
+
11675
+ ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_end_service_subscription,uniffi_clone_handle(),RustBuffer.alloc_from_string(sub_id),RustBuffer.alloc_from_string(reason))
11676
+ end
11677
+
11678
+ def publish_service_update(service_id, topic, key, body)
11679
+ service_id = ::OfflineProtocol::uniffi_utf8(service_id)
11680
+
11681
+ topic = ::OfflineProtocol::uniffi_utf8(topic)
11682
+
11683
+ key = (key ? ::OfflineProtocol::uniffi_utf8(key) : nil)
11684
+ RustBuffer.check_lower_Optionalstring(key)
11685
+ body = ::OfflineProtocol::uniffi_utf8(body)
11686
+
11687
+ result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_publish_service_update,uniffi_clone_handle(),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_string(topic),RustBuffer.alloc_from_Optionalstring(key),RustBuffer.alloc_from_string(body))
11688
+ return result.consume_into_TypeServicePublishReport
11689
+ end
10846
11690
  def register_service(service_id, version, capabilities)
10847
11691
  service_id = ::OfflineProtocol::uniffi_utf8(service_id)
10848
11692
 
@@ -10853,6 +11697,14 @@ end
10853
11697
  ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_register_service,uniffi_clone_handle(),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_string(version),RustBuffer.alloc_from_MapStringString(capabilities))
10854
11698
  end
10855
11699
 
11700
+ def reject_service_subscription(sub_id, reason)
11701
+ sub_id = ::OfflineProtocol::uniffi_utf8(sub_id)
11702
+
11703
+ reason = ::OfflineProtocol::uniffi_utf8(reason)
11704
+
11705
+ ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_reject_service_subscription,uniffi_clone_handle(),RustBuffer.alloc_from_string(sub_id),RustBuffer.alloc_from_string(reason))
11706
+ end
11707
+
10856
11708
  def respond_to_service_request(request_id, requester, service_id, status, body)
10857
11709
  request_id = ::OfflineProtocol::uniffi_utf8(request_id)
10858
11710
 
@@ -10867,6 +11719,12 @@ end
10867
11719
  result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_respond_to_service_request,uniffi_clone_handle(),RustBuffer.alloc_from_string(request_id),RustBuffer.alloc_from_string(requester),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_string(status),RustBuffer.alloc_from_string(body))
10868
11720
  return result.consume_into_string
10869
11721
  end
11722
+ def resync_service_subscription(sub_id)
11723
+ sub_id = ::OfflineProtocol::uniffi_utf8(sub_id)
11724
+
11725
+ ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_resync_service_subscription,uniffi_clone_handle(),RustBuffer.alloc_from_string(sub_id))
11726
+ end
11727
+
10870
11728
  def send_service_request(provider, service_id, method, body)
10871
11729
  provider = ::OfflineProtocol::uniffi_utf8(provider)
10872
11730
 
@@ -10879,12 +11737,62 @@ end
10879
11737
  result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_send_service_request,uniffi_clone_handle(),RustBuffer.alloc_from_string(provider),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_string(method),RustBuffer.alloc_from_string(body))
10880
11738
  return result.consume_into_string
10881
11739
  end
11740
+ def service_subscribers(service_id)
11741
+ service_id = (service_id ? ::OfflineProtocol::uniffi_utf8(service_id) : nil)
11742
+ RustBuffer.check_lower_Optionalstring(service_id)
11743
+ result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_service_subscribers,uniffi_clone_handle(),RustBuffer.alloc_from_Optionalstring(service_id))
11744
+ return result.consume_into_SequenceTypeServiceSubscriberInfo
11745
+ end
11746
+ def service_subscriptions()
11747
+ result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_service_subscriptions,uniffi_clone_handle(),)
11748
+ return result.consume_into_SequenceTypeServiceSubscriptionInfo
11749
+ end
11750
+ def set_service_subscription_policy(service_id, policy)
11751
+ service_id = ::OfflineProtocol::uniffi_utf8(service_id)
11752
+
11753
+ policy = policy
11754
+ RustBuffer.check_lower_TypeSubscriptionPolicyConfig(policy)
11755
+ ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_set_service_subscription_policy,uniffi_clone_handle(),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_TypeSubscriptionPolicyConfig(policy))
11756
+ end
11757
+
11758
+ def set_service_topic_checkpoint(service_id, topic, body)
11759
+ service_id = ::OfflineProtocol::uniffi_utf8(service_id)
11760
+
11761
+ topic = ::OfflineProtocol::uniffi_utf8(topic)
11762
+
11763
+ body = ::OfflineProtocol::uniffi_utf8(body)
11764
+
11765
+ ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_set_service_topic_checkpoint,uniffi_clone_handle(),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_string(topic),RustBuffer.alloc_from_string(body))
11766
+ end
11767
+
11768
+ def subscribe_service(provider, service_id, topic, mode, params, keys)
11769
+ provider = ::OfflineProtocol::uniffi_utf8(provider)
11770
+
11771
+ service_id = ::OfflineProtocol::uniffi_utf8(service_id)
11772
+
11773
+ topic = ::OfflineProtocol::uniffi_utf8(topic)
11774
+
11775
+ mode = mode
11776
+ RustBuffer.check_lower_TypeSubscriptionMode(mode)
11777
+ params = ::OfflineProtocol::uniffi_utf8(params)
11778
+
11779
+ keys = keys.map { |v| ::OfflineProtocol::uniffi_utf8(v) }
11780
+ RustBuffer.check_lower_Sequencestring(keys)
11781
+ result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_subscribe_service,uniffi_clone_handle(),RustBuffer.alloc_from_string(provider),RustBuffer.alloc_from_string(service_id),RustBuffer.alloc_from_string(topic),RustBuffer.alloc_from_TypeSubscriptionMode(mode),RustBuffer.alloc_from_string(params),RustBuffer.alloc_from_Sequencestring(keys))
11782
+ return result.consume_into_string
11783
+ end
10882
11784
  def unregister_service(service_id)
10883
11785
  service_id = ::OfflineProtocol::uniffi_utf8(service_id)
10884
11786
 
10885
11787
  result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_unregister_service,uniffi_clone_handle(),RustBuffer.alloc_from_string(service_id))
10886
11788
  return 1 == result
10887
11789
  end
11790
+ def unsubscribe_service(sub_id)
11791
+ sub_id = ::OfflineProtocol::uniffi_utf8(sub_id)
11792
+
11793
+ result = ::OfflineProtocol.rust_call_with_error(ProtocolError,:uniffi_offline_protocol_uniffi_fn_method_meshservices_unsubscribe_service,uniffi_clone_handle(),RustBuffer.alloc_from_string(sub_id))
11794
+ return 1 == result
11795
+ end
10888
11796
 
10889
11797
  end
10890
11798
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: offline_protocol
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.31.0
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Offline Protocol, Inc.