Conversation
There was a problem hiding this comment.
Pull request overview
Introduces the high-level ModemManager entry point and per-modem ModemScope over the existing low-level zbus proxies, fulfilling the API surface described in issue #402. Adds a new ConnectionStatus model, wires zbus::fdo::Error into ModemError, re-exports the new types from the crate root, and updates the crate-level docs and changelog.
Changes:
- New
api::modem_managermodule implementing enumeration viaObjectManager.GetManagedObjects, primary/by-IMEI selection, simple connect/disconnect/status, SIM PIN flows, signal/access-tech queries, and property-decoding helpers. - New
api::modem_scope::ModemScope<'a>that forwards every operation to crate-private*_for_pathhelpers onModemManager. - Adds
ConnectionStatusmodel,ModemError::DbusFdovariant, re-exports, and refreshed crate-level docs/example plus a changelog entry.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
| mmrs/src/api/modem_manager.rs | Core implementation of the high-level API and D-Bus property decoders. |
| mmrs/src/api/modem_scope.rs | Per-modem scoped wrapper that delegates to ModemManager helpers. |
| mmrs/src/api/mod.rs | Wires the two new modules into the API surface and re-exports the types. |
| mmrs/src/api/models/modem.rs | Adds the ConnectionStatus snapshot struct returned by status helpers. |
| mmrs/src/api/models/mod.rs | Re-exports the new ConnectionStatus type. |
| mmrs/src/api/models/error.rs | Adds ModemError::DbusFdo so zbus::fdo::Error propagates via ?. |
| mmrs/src/lib.rs | Updates crate-level docs, doctest example, and re-exports. |
| mmrs/CHANGELOG.md | Documents the new high-level API and ConnectionStatus under Unreleased. |
…oding - Replace fragile string-matching PIN/PUK error detection with structured D-Bus error name inspection (classify_pin_error) - Validate ModemManager reachability in with_connection via version() - Add InvalidObjectPath error variant instead of misleading ModemNotFound - Make signal_quality Option meaningful (drop always-Some fallback) - Use try_join_all for concurrent modem enumeration in list_modems - Sort modem paths numerically by trailing index, not lexicographically - Return None from decode_ip4_config when no usable IP info present - Short-circuit modem_by_imei on EquipmentIdentifier match - Respect the "recent" flag from signal_quality in modem_info_for_path - Add unit tests for pure helper functions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #402