diff options
author | Dan Williams <dcbw@redhat.com> | 2009-06-28 14:05:05 -0400 |
---|---|---|
committer | Dan Williams <dcbw@redhat.com> | 2009-06-28 14:05:05 -0400 |
commit | 6077763d90b69cfc60b23f383c4529f966facaaf (patch) | |
tree | 81ae20133a6ea116d58ddc2ee86644f4e1c9eb0a /plugins/mm-modem-novatel-cdma.c | |
parent | 112f2da19dbe8dcd8f32b998459298e7c1884c67 (diff) |
asynchronous and deferred port detection
Allow plugins to perform asynchronous port detection, and to defer port detection
until later. This moves the prober bits into MMPluginBase so that all plugins
can take adavantage of it only when needed; the probing is not done at udev time.
Furthermore, plugins like Novatel can flip the secondary ports over the AT mode
through deferred detection, by deferring the secondary ports until the main port
has been detected and AT$NWDMAT has been sent.
This commit also finishes the port of the rest of the plugins (except mbm) over
to the new port detection methods and plugin API.
Diffstat (limited to 'plugins/mm-modem-novatel-cdma.c')
-rw-r--r-- | plugins/mm-modem-novatel-cdma.c | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/plugins/mm-modem-novatel-cdma.c b/plugins/mm-modem-novatel-cdma.c deleted file mode 100644 index 4b6b9b2e..00000000 --- a/plugins/mm-modem-novatel-cdma.c +++ /dev/null @@ -1,73 +0,0 @@ -/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ - -#include <stdlib.h> -#include <stdio.h> -#include <string.h> -#include <unistd.h> -#include "mm-modem-novatel-cdma.h" -#include "mm-errors.h" -#include "mm-callback-info.h" - -static gpointer mm_modem_novatel_cdma_parent_class = NULL; - -MMModem * -mm_modem_novatel_cdma_new (const char *data_device, - const char *driver) -{ - g_return_val_if_fail (data_device != NULL, NULL); - g_return_val_if_fail (driver != NULL, NULL); - - return MM_MODEM (g_object_new (MM_TYPE_MODEM_NOVATEL_CDMA, - MM_SERIAL_DEVICE, data_device, - MM_SERIAL_CARRIER_DETECT, FALSE, - MM_MODEM_DRIVER, driver, - MM_MODEM_TYPE, MM_MODEM_TYPE_CDMA, - NULL)); -} - -/*****************************************************************************/ - -static void -modem_init (MMModem *modem_class) -{ -} - -static void -mm_modem_novatel_cdma_init (MMModemNovatelCdma *self) -{ -} - -static void -mm_modem_novatel_cdma_class_init (MMModemNovatelCdmaClass *klass) -{ - mm_modem_novatel_cdma_parent_class = g_type_class_peek_parent (klass); -} - -GType -mm_modem_novatel_cdma_get_type (void) -{ - static GType modem_novatel_cdma_type = 0; - - if (G_UNLIKELY (modem_novatel_cdma_type == 0)) { - static const GTypeInfo modem_novatel_cdma_type_info = { - sizeof (MMModemNovatelCdmaClass), - (GBaseInitFunc) NULL, - (GBaseFinalizeFunc) NULL, - (GClassInitFunc) mm_modem_novatel_cdma_class_init, - (GClassFinalizeFunc) NULL, - NULL, /* class_data */ - sizeof (MMModemNovatelCdma), - 0, /* n_preallocs */ - (GInstanceInitFunc) mm_modem_novatel_cdma_init, - }; - - static const GInterfaceInfo modem_iface_info = { - (GInterfaceInitFunc) modem_init - }; - - modem_novatel_cdma_type = g_type_register_static (MM_TYPE_GENERIC_CDMA, "MMModemNovatelCdma", &modem_novatel_cdma_type_info, 0); - g_type_add_interface_static (modem_novatel_cdma_type, MM_TYPE_MODEM, &modem_iface_info); - } - - return modem_novatel_cdma_type; -} |