sierra: rename MMModemSierra -> MMModemSierraGsm
This commit is contained in:
+2
-2
@@ -146,8 +146,8 @@ libmm_plugin_option_la_LDFLAGS = \
|
|||||||
libmm_plugin_sierra_la_SOURCES = \
|
libmm_plugin_sierra_la_SOURCES = \
|
||||||
mm-plugin-sierra.c \
|
mm-plugin-sierra.c \
|
||||||
mm-plugin-sierra.h \
|
mm-plugin-sierra.h \
|
||||||
mm-modem-sierra.c \
|
mm-modem-sierra-gsm.c \
|
||||||
mm-modem-sierra.h
|
mm-modem-sierra-gsm.h
|
||||||
|
|
||||||
libmm_plugin_sierra_la_CPPFLAGS = \
|
libmm_plugin_sierra_la_CPPFLAGS = \
|
||||||
$(MM_CFLAGS) \
|
$(MM_CFLAGS) \
|
||||||
|
|||||||
@@ -18,22 +18,22 @@
|
|||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <unistd.h>
|
#include <unistd.h>
|
||||||
#include "mm-modem-sierra.h"
|
#include "mm-modem-sierra-gsm.h"
|
||||||
#include "mm-errors.h"
|
#include "mm-errors.h"
|
||||||
#include "mm-callback-info.h"
|
#include "mm-callback-info.h"
|
||||||
|
|
||||||
static gpointer mm_modem_sierra_parent_class = NULL;
|
static gpointer mm_modem_sierra_gsm_parent_class = NULL;
|
||||||
|
|
||||||
MMModem *
|
MMModem *
|
||||||
mm_modem_sierra_new (const char *device,
|
mm_modem_sierra_gsm_new (const char *device,
|
||||||
const char *driver,
|
const char *driver,
|
||||||
const char *plugin)
|
const char *plugin)
|
||||||
{
|
{
|
||||||
g_return_val_if_fail (device != NULL, NULL);
|
g_return_val_if_fail (device != NULL, NULL);
|
||||||
g_return_val_if_fail (driver != NULL, NULL);
|
g_return_val_if_fail (driver != NULL, NULL);
|
||||||
g_return_val_if_fail (plugin != NULL, NULL);
|
g_return_val_if_fail (plugin != NULL, NULL);
|
||||||
|
|
||||||
return MM_MODEM (g_object_new (MM_TYPE_MODEM_SIERRA,
|
return MM_MODEM (g_object_new (MM_TYPE_MODEM_SIERRA_GSM,
|
||||||
MM_MODEM_MASTER_DEVICE, device,
|
MM_MODEM_MASTER_DEVICE, device,
|
||||||
MM_MODEM_DRIVER, driver,
|
MM_MODEM_DRIVER, driver,
|
||||||
MM_MODEM_PLUGIN, plugin,
|
MM_MODEM_PLUGIN, plugin,
|
||||||
@@ -132,41 +132,41 @@ modem_init (MMModem *modem_class)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mm_modem_sierra_init (MMModemSierra *self)
|
mm_modem_sierra_gsm_init (MMModemSierraGsm *self)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
mm_modem_sierra_class_init (MMModemSierraClass *klass)
|
mm_modem_sierra_gsm_class_init (MMModemSierraGsmClass *klass)
|
||||||
{
|
{
|
||||||
mm_modem_sierra_parent_class = g_type_class_peek_parent (klass);
|
mm_modem_sierra_gsm_parent_class = g_type_class_peek_parent (klass);
|
||||||
}
|
}
|
||||||
|
|
||||||
GType
|
GType
|
||||||
mm_modem_sierra_get_type (void)
|
mm_modem_sierra_gsm_get_type (void)
|
||||||
{
|
{
|
||||||
static GType modem_sierra_type = 0;
|
static GType modem_sierra_gsm_type = 0;
|
||||||
|
|
||||||
if (G_UNLIKELY (modem_sierra_type == 0)) {
|
if (G_UNLIKELY (modem_sierra_gsm_type == 0)) {
|
||||||
static const GTypeInfo modem_sierra_type_info = {
|
static const GTypeInfo modem_sierra_gsm_type_info = {
|
||||||
sizeof (MMModemSierraClass),
|
sizeof (MMModemSierraGsmClass),
|
||||||
(GBaseInitFunc) NULL,
|
(GBaseInitFunc) NULL,
|
||||||
(GBaseFinalizeFunc) NULL,
|
(GBaseFinalizeFunc) NULL,
|
||||||
(GClassInitFunc) mm_modem_sierra_class_init,
|
(GClassInitFunc) mm_modem_sierra_gsm_class_init,
|
||||||
(GClassFinalizeFunc) NULL,
|
(GClassFinalizeFunc) NULL,
|
||||||
NULL, /* class_data */
|
NULL, /* class_data */
|
||||||
sizeof (MMModemSierra),
|
sizeof (MMModemSierraGsm),
|
||||||
0, /* n_preallocs */
|
0, /* n_preallocs */
|
||||||
(GInstanceInitFunc) mm_modem_sierra_init,
|
(GInstanceInitFunc) mm_modem_sierra_gsm_init,
|
||||||
};
|
};
|
||||||
|
|
||||||
static const GInterfaceInfo modem_iface_info = {
|
static const GInterfaceInfo modem_iface_info = {
|
||||||
(GInterfaceInitFunc) modem_init
|
(GInterfaceInitFunc) modem_init
|
||||||
};
|
};
|
||||||
|
|
||||||
modem_sierra_type = g_type_register_static (MM_TYPE_GENERIC_GSM, "MMModemSierra", &modem_sierra_type_info, 0);
|
modem_sierra_gsm_type = g_type_register_static (MM_TYPE_GENERIC_GSM, "MMModemSierraGsm", &modem_sierra_gsm_type_info, 0);
|
||||||
g_type_add_interface_static (modem_sierra_type, MM_TYPE_MODEM, &modem_iface_info);
|
g_type_add_interface_static (modem_sierra_gsm_type, MM_TYPE_MODEM, &modem_iface_info);
|
||||||
}
|
}
|
||||||
|
|
||||||
return modem_sierra_type;
|
return modem_sierra_gsm_type;
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,43 @@
|
|||||||
|
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
||||||
|
/*
|
||||||
|
* This program is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details:
|
||||||
|
*
|
||||||
|
* Copyright (C) 2008 - 2009 Novell, Inc.
|
||||||
|
* Copyright (C) 2009 Red Hat, Inc.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef MM_MODEM_SIERRA_GSM_H
|
||||||
|
#define MM_MODEM_SIERRA_GSM_H
|
||||||
|
|
||||||
|
#include "mm-generic-gsm.h"
|
||||||
|
|
||||||
|
#define MM_TYPE_MODEM_SIERRA_GSM (mm_modem_sierra_gsm_get_type ())
|
||||||
|
#define MM_MODEM_SIERRA_GSM(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_MODEM_SIERRA_GSM, MMModemSierraGsm))
|
||||||
|
#define MM_MODEM_SIERRA_GSM_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_MODEM_SIERRA_GSM, MMModemSierraGsmClass))
|
||||||
|
#define MM_IS_MODEM_SIERRA_GSM(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_MODEM_SIERRA_GSM))
|
||||||
|
#define MM_IS_MODEM_SIERRA_GSM_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_MODEM_SIERRA_GSM))
|
||||||
|
#define MM_MODEM_SIERRA_GSM_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_MODEM_SIERRA_GSM, MMModemSierraGsmClass))
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
MMGenericGsm parent;
|
||||||
|
} MMModemSierraGsm;
|
||||||
|
|
||||||
|
typedef struct {
|
||||||
|
MMGenericGsmClass parent;
|
||||||
|
} MMModemSierraGsmClass;
|
||||||
|
|
||||||
|
GType mm_modem_sierra_gsm_get_type (void);
|
||||||
|
|
||||||
|
MMModem *mm_modem_sierra_gsm_new (const char *device,
|
||||||
|
const char *driver,
|
||||||
|
const char *plugin_name);
|
||||||
|
|
||||||
|
#endif /* MM_MODEM_SIERRA_GSM_H */
|
||||||
@@ -1,43 +0,0 @@
|
|||||||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
|
||||||
/*
|
|
||||||
* This program is free software; you can redistribute it and/or modify
|
|
||||||
* it under the terms of the GNU General Public License as published by
|
|
||||||
* the Free Software Foundation; either version 2 of the License, or
|
|
||||||
* (at your option) any later version.
|
|
||||||
*
|
|
||||||
* This program is distributed in the hope that it will be useful,
|
|
||||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
* GNU General Public License for more details:
|
|
||||||
*
|
|
||||||
* Copyright (C) 2008 - 2009 Novell, Inc.
|
|
||||||
* Copyright (C) 2009 Red Hat, Inc.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef MM_MODEM_SIERRA_H
|
|
||||||
#define MM_MODEM_SIERRA_H
|
|
||||||
|
|
||||||
#include "mm-generic-gsm.h"
|
|
||||||
|
|
||||||
#define MM_TYPE_MODEM_SIERRA (mm_modem_sierra_get_type ())
|
|
||||||
#define MM_MODEM_SIERRA(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_MODEM_SIERRA, MMModemSierra))
|
|
||||||
#define MM_MODEM_SIERRA_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), MM_TYPE_MODEM_SIERRA, MMModemSierraClass))
|
|
||||||
#define MM_IS_MODEM_SIERRA(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), MM_TYPE_MODEM_SIERRA))
|
|
||||||
#define MM_IS_MODEM_SIERRA_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), MM_TYPE_MODEM_SIERRA))
|
|
||||||
#define MM_MODEM_SIERRA_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_MODEM_SIERRA, MMModemSierraClass))
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
MMGenericGsm parent;
|
|
||||||
} MMModemSierra;
|
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
MMGenericGsmClass parent;
|
|
||||||
} MMModemSierraClass;
|
|
||||||
|
|
||||||
GType mm_modem_sierra_get_type (void);
|
|
||||||
|
|
||||||
MMModem *mm_modem_sierra_new (const char *device,
|
|
||||||
const char *driver,
|
|
||||||
const char *plugin_name);
|
|
||||||
|
|
||||||
#endif /* MM_MODEM_SIERRA_H */
|
|
||||||
@@ -17,7 +17,7 @@
|
|||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <gmodule.h>
|
#include <gmodule.h>
|
||||||
#include "mm-plugin-sierra.h"
|
#include "mm-plugin-sierra.h"
|
||||||
#include "mm-modem-sierra.h"
|
#include "mm-modem-sierra-gsm.h"
|
||||||
#include "mm-generic-cdma.h"
|
#include "mm-generic-cdma.h"
|
||||||
|
|
||||||
G_DEFINE_TYPE (MMPluginSierra, mm_plugin_sierra, MM_TYPE_PLUGIN_BASE)
|
G_DEFINE_TYPE (MMPluginSierra, mm_plugin_sierra, MM_TYPE_PLUGIN_BASE)
|
||||||
@@ -156,9 +156,9 @@ grab_port (MMPluginBase *base,
|
|||||||
caps = mm_plugin_base_supports_task_get_probed_capabilities (task);
|
caps = mm_plugin_base_supports_task_get_probed_capabilities (task);
|
||||||
if (!existing) {
|
if (!existing) {
|
||||||
if ((caps & MM_PLUGIN_BASE_PORT_CAP_GSM) || (ptype != MM_PORT_TYPE_UNKNOWN)) {
|
if ((caps & MM_PLUGIN_BASE_PORT_CAP_GSM) || (ptype != MM_PORT_TYPE_UNKNOWN)) {
|
||||||
modem = mm_modem_sierra_new (sysfs_path,
|
modem = mm_modem_sierra_gsm_new (sysfs_path,
|
||||||
mm_plugin_base_supports_task_get_driver (task),
|
mm_plugin_base_supports_task_get_driver (task),
|
||||||
mm_plugin_get_name (MM_PLUGIN (base)));
|
mm_plugin_get_name (MM_PLUGIN (base)));
|
||||||
} else if (caps & CAP_CDMA) {
|
} else if (caps & CAP_CDMA) {
|
||||||
modem = mm_generic_cdma_new (sysfs_path,
|
modem = mm_generic_cdma_new (sysfs_path,
|
||||||
mm_plugin_base_supports_task_get_driver (task),
|
mm_plugin_base_supports_task_get_driver (task),
|
||||||
|
|||||||
Reference in New Issue
Block a user