Files
simconnect-sdk-rs/examples/Cargo.toml
Mihai Dinculescu d89fa524c2 Rework events and add proper support for client events
Added

- Client events are now implemented through `SimConnect::subscribe_to_client_event`, `SimConnect::unsubscribe_from_client_event` and `SimConnect::unsubscribe_from_all_client_events`.
- `subscribe_to_client_events.rs` example has been added.
- `SimConnectError::EventAlreadySubscribedTo` and `SimConnectError::EventNotSubscribedTo` error variants have been added.

Changed

- A second call to `SimConnect::subscribe_to_system_event` for the same event will now return an error of type `SimConnectError::EventAlreadySubscribedTo` instead of `SimConnectError::SimConnectException`.
- The call to `SimConnect::unsubscribe_from_system_event` is now a NOOP when the system event is not subscribed to.
- `SimConnectError::UnimplementedMessageType` has been renamed to `SimConnectError::UnimplementedNotification`.

Removed

- `SimConnect::register_event` has been replaced by the new client event functions.
- `NotificationGroup` has been removed in favor of an internally managed notification group.
2023-05-01 19:13:30 +01:00

45 lines
970 B
TOML

[package]
name = "simconnect-sdk-examples"
version = "0.2.2"
edition = "2021"
license = "MIT"
authors = ["Mihai Dinculescu <mihai.dinculescu@outlook.com>"]
description = "SimConnect SDK Examples"
readme = "README.md"
repository = "https://github.com/mihai-dinculescu/simconnect-sdk-rs"
publish = false
[[bin]]
name = "data"
path = "src/data.rs"
[[bin]]
name = "data_with_tracing"
path = "src/data_with_tracing.rs"
[[bin]]
name = "data_without_macro"
path = "src/data_without_macro.rs"
[[bin]]
name = "data_multiple_objects"
path = "src/data_multiple_objects.rs"
[[bin]]
name = "facilities"
path = "src/facilities.rs"
[[bin]]
name = "subscribe_to_client_events"
path = "src/subscribe_to_client_events.rs"
[[bin]]
name = "subscribe_to_system_events"
path = "src/subscribe_to_system_events.rs"
[dependencies]
tracing = "0.1"
tracing-subscriber = { version = "0.3", features = ["env-filter"] }
simconnect-sdk = { path = "../simconnect-sdk", features = ["derive"] }