Skip to content

Commit

Permalink
Auto-merge for PR #77 via VersionBot
Browse files Browse the repository at this point in the history
Expose connection type in ConnectionSettings
  • Loading branch information
resin-io-modules-versionbot[bot] authored Jun 15, 2017
2 parents 9e3412b + 2a81a71 commit a5c4879
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file
automatically by Versionist. DO NOT EDIT THIS FILE MANUALLY!
This project adheres to [Semantic Versioning](http://semver.org/).

## v0.5.0 - 2017-06-15

* Expose connection type in ConnectionSettings [majorz]

## v0.4.0 - 2017-06-15

* ASCII oriented SSID Debug formatting [majorz]
Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "network_manager"
version = "0.4.0"
version = "0.5.0"
authors = ["Joseph Roberts <[email protected]>", "Zahari Petkov <[email protected]>"]

[dependencies]
Expand Down
1 change: 1 addition & 0 deletions src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,7 @@ impl<'a> From<&'a Connection> for i32 {

#[derive(Default, Debug, Clone, Eq, PartialEq)]
pub struct ConnectionSettings {
pub kind: String, // `type` is a reserved word, so we are using `kind` instead
pub id: String,
pub uuid: String,
pub ssid: Ssid,
Expand Down
5 changes: 5 additions & 0 deletions src/dbus_nm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ impl DBusNetworkManager {

let dict: Dict<&str, Dict<&str, Variant<Iter>, _>, _> = self.dbus.extract(&response)?;

let mut kind = String::new();
let mut id = String::new();
let mut uuid = String::new();
let mut ssid = Ssid::new();
Expand All @@ -143,6 +144,9 @@ impl DBusNetworkManager {
"uuid" => {
uuid = extract::<String>(&mut v2)?;
},
"type" => {
kind = extract::<String>(&mut v2)?;
},
"ssid" => {
ssid = Ssid::from_bytes(variant_iter_to_vec_u8(&mut v2)?)?;
},
Expand All @@ -152,6 +156,7 @@ impl DBusNetworkManager {
}

Ok(ConnectionSettings {
kind: kind,
id: id,
uuid: uuid,
ssid: ssid,
Expand Down

0 comments on commit a5c4879

Please sign in to comment.