Export the Physical Technology of a VPN service.
Exposes the Type of the lowest service used for a VPN service
through the "PhysicalTechnology" property of a VPN service.
TEST=cros_workon_make shill --test and tested manually.
BUG=chromium:213086
Manual Test procedure.
1. Connect to a wifi network.
2. Connect to a VPN service on that wifi network.
3. Run /usr/local/lib/flimflam/test/list-services on a terminal
and verify the first service on its output contains a service with
a Type "vpn" and a PhysicalTechnology "wifi":
[ /service/6 ]
...
Type = vpn
...
PhysicalTechnology = wifi
Change-Id: Ic843429de3f4d5a4208e271bb779c3e3160f036b
Reviewed-on: https://gerrit.chromium.org/gerrit/61510
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: Alex Deymo <deymo@chromium.org>
Reviewed-by: Alex Deymo <deymo@chromium.org>
Tested-by: Alex Deymo <deymo@chromium.org>
diff --git a/vpn_service.h b/vpn_service.h
index 9b37cb4..76af372 100644
--- a/vpn_service.h
+++ b/vpn_service.h
@@ -52,12 +52,18 @@
friend class VPNServiceTest;
FRIEND_TEST(VPNServiceTest, GetDeviceRpcId);
FRIEND_TEST(VPNServiceTest, SetConnection);
+ FRIEND_TEST(VPNServiceTest, GetPhysicalTechologyPropertyFailsIfNoCarrier);
+ FRIEND_TEST(VPNServiceTest, GetPhysicalTechologyPropertyOverWifi);
static const char kAutoConnNeverConnected[];
static const char kAutoConnVPNAlreadyActive[];
virtual std::string GetDeviceRpcId(Error *error);
+ // Returns the Type name of the lowest connection (presumably the "physical"
+ // connection) that this service depends on.
+ std::string GetPhysicalTechologyProperty(Error *error);
+
std::string storage_id_;
scoped_ptr<VPNDriver> driver_;
scoped_ptr<Connection::Binder> connection_binder_;