From 7ae8ffe21b9e3bb350dac2f2d34d0711b3255d26 Mon Sep 17 00:00:00 2001 From: Dan Williams Date: Fri, 22 Oct 2010 11:06:48 -0500 Subject: core: use hardware IDs as part of DeviceIdentifier Pass the device's hardware IDs through modem creation and use them when calculating the device's identifier. Add a bunch of testcases for real hardware to ensure we don't break the device ID in the future unless we really want to. --- src/mm-modem.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/mm-modem.c') diff --git a/src/mm-modem.c b/src/mm-modem.c index 30605a28..56b65478 100644 --- a/src/mm-modem.c +++ b/src/mm-modem.c @@ -893,6 +893,22 @@ mm_modem_init (gpointer g_iface) 0, G_MAXUINT32, 0, G_PARAM_READABLE)); + g_object_interface_install_property + (g_iface, + g_param_spec_uint (MM_MODEM_HW_VID, + "Hardware vendor ID", + "Hardware vendor ID", + 0, G_MAXUINT, 0, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + + g_object_interface_install_property + (g_iface, + g_param_spec_uint (MM_MODEM_HW_PID, + "Hardware product ID", + "Hardware product ID", + 0, G_MAXUINT, 0, + G_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY)); + /* Signals */ g_signal_new ("state-changed", iface_type, -- cgit v1.2.3-70-g09d2