aboutsummaryrefslogtreecommitdiff
path: root/plugins/option
diff options
context:
space:
mode:
authorAleksander Morgado <aleksander@lanedo.com>2012-07-10 11:15:23 +0200
committerAleksander Morgado <aleksander@lanedo.com>2012-08-06 20:06:45 +0200
commite5e46f489e9d89bdecb4c4948b0d9627e33555cc (patch)
tree4b8e1b316787b0a7e1346a1bd6930c293639171f /plugins/option
parent7e9d3e4b685f0e92979af2f595be6cd336b5dbd6 (diff)
core: merge `MMPluginBase' and `MMPlugin'
There's no real point in maintaining a separate `MMPlugin' interface, as all the plugins will inherit from `MMPluginBase', so just merge them and simplify everything.
Diffstat (limited to 'plugins/option')
-rw-r--r--plugins/option/mm-plugin-hso.c24
-rw-r--r--plugins/option/mm-plugin-hso.h6
-rw-r--r--plugins/option/mm-plugin-option.c26
-rw-r--r--plugins/option/mm-plugin-option.h6
4 files changed, 31 insertions, 31 deletions
diff --git a/plugins/option/mm-plugin-hso.c b/plugins/option/mm-plugin-hso.c
index 2aa98fdd..f80540a5 100644
--- a/plugins/option/mm-plugin-hso.c
+++ b/plugins/option/mm-plugin-hso.c
@@ -25,7 +25,7 @@
#include "mm-broadband-modem-hso.h"
#include "mm-log.h"
-G_DEFINE_TYPE (MMPluginHso, mm_plugin_hso, MM_TYPE_PLUGIN_BASE)
+G_DEFINE_TYPE (MMPluginHso, mm_plugin_hso, MM_TYPE_PLUGIN)
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
@@ -33,7 +33,7 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
/*****************************************************************************/
static MMBaseModem *
-create_modem (MMPluginBase *plugin,
+create_modem (MMPlugin *self,
const gchar *sysfs_path,
const gchar *driver,
guint16 vendor,
@@ -43,13 +43,13 @@ create_modem (MMPluginBase *plugin,
{
return MM_BASE_MODEM (mm_broadband_modem_hso_new (sysfs_path,
driver,
- mm_plugin_get_name (MM_PLUGIN (plugin)),
+ mm_plugin_get_name (self),
vendor,
product));
}
static gboolean
-grab_port (MMPluginBase *base,
+grab_port (MMPlugin *self,
MMBaseModem *modem,
MMPortProbe *probe,
GError **error)
@@ -134,11 +134,11 @@ mm_plugin_create (void)
return MM_PLUGIN (
g_object_new (MM_TYPE_PLUGIN_HSO,
- MM_PLUGIN_BASE_NAME, "Option High-Speed",
- MM_PLUGIN_BASE_ALLOWED_SUBSYSTEMS, subsystems,
- MM_PLUGIN_BASE_ALLOWED_DRIVERS, drivers,
- MM_PLUGIN_BASE_ALLOWED_AT, TRUE,
- MM_PLUGIN_BASE_ALLOWED_QCDM, TRUE,
+ MM_PLUGIN_NAME, "Option High-Speed",
+ MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
+ MM_PLUGIN_ALLOWED_DRIVERS, drivers,
+ MM_PLUGIN_ALLOWED_AT, TRUE,
+ MM_PLUGIN_ALLOWED_QCDM, TRUE,
NULL));
}
@@ -150,8 +150,8 @@ mm_plugin_hso_init (MMPluginHso *self)
static void
mm_plugin_hso_class_init (MMPluginHsoClass *klass)
{
- MMPluginBaseClass *pb_class = MM_PLUGIN_BASE_CLASS (klass);
+ MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass);
- pb_class->create_modem = create_modem;
- pb_class->grab_port = grab_port;
+ plugin_class->create_modem = create_modem;
+ plugin_class->grab_port = grab_port;
}
diff --git a/plugins/option/mm-plugin-hso.h b/plugins/option/mm-plugin-hso.h
index 1c554a3f..5ef13439 100644
--- a/plugins/option/mm-plugin-hso.h
+++ b/plugins/option/mm-plugin-hso.h
@@ -18,7 +18,7 @@
#ifndef MM_PLUGIN_HSO_H
#define MM_PLUGIN_HSO_H
-#include "mm-plugin-base.h"
+#include "mm-plugin.h"
#define MM_TYPE_PLUGIN_HSO (mm_plugin_hso_get_type ())
#define MM_PLUGIN_HSO(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_PLUGIN_HSO, MMPluginHso))
@@ -28,11 +28,11 @@
#define MM_PLUGIN_HSO_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PLUGIN_HSO, MMPluginHsoClass))
typedef struct {
- MMPluginBase parent;
+ MMPlugin parent;
} MMPluginHso;
typedef struct {
- MMPluginBaseClass parent;
+ MMPluginClass parent;
} MMPluginHsoClass;
GType mm_plugin_hso_get_type (void);
diff --git a/plugins/option/mm-plugin-option.c b/plugins/option/mm-plugin-option.c
index 771cb7b3..5cff84fa 100644
--- a/plugins/option/mm-plugin-option.c
+++ b/plugins/option/mm-plugin-option.c
@@ -24,7 +24,7 @@
#include "mm-plugin-option.h"
#include "mm-broadband-modem-option.h"
-G_DEFINE_TYPE (MMPluginOption, mm_plugin_option, MM_TYPE_PLUGIN_BASE)
+G_DEFINE_TYPE (MMPluginOption, mm_plugin_option, MM_TYPE_PLUGIN)
int mm_plugin_major_version = MM_PLUGIN_MAJOR_VERSION;
int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
@@ -32,7 +32,7 @@ int mm_plugin_minor_version = MM_PLUGIN_MINOR_VERSION;
/*****************************************************************************/
static MMBaseModem *
-create_modem (MMPluginBase *plugin,
+create_modem (MMPlugin *self,
const gchar *sysfs_path,
const gchar *driver,
guint16 vendor,
@@ -42,13 +42,13 @@ create_modem (MMPluginBase *plugin,
{
return MM_BASE_MODEM (mm_broadband_modem_option_new (sysfs_path,
driver,
- mm_plugin_get_name (MM_PLUGIN (plugin)),
+ mm_plugin_get_name (self),
vendor,
product));
}
static gboolean
-grab_port (MMPluginBase *base,
+grab_port (MMPlugin *self,
MMBaseModem *modem,
MMPortProbe *probe,
GError **error)
@@ -98,12 +98,12 @@ mm_plugin_create (void)
return MM_PLUGIN (
g_object_new (MM_TYPE_PLUGIN_OPTION,
- MM_PLUGIN_BASE_NAME, "Option",
- MM_PLUGIN_BASE_ALLOWED_SUBSYSTEMS, subsystems,
- MM_PLUGIN_BASE_ALLOWED_DRIVERS, drivers,
- MM_PLUGIN_BASE_ALLOWED_VENDOR_IDS, vendor_ids,
- MM_PLUGIN_BASE_ALLOWED_PRODUCT_IDS, product_ids,
- MM_PLUGIN_BASE_ALLOWED_AT, TRUE,
+ MM_PLUGIN_NAME, "Option",
+ MM_PLUGIN_ALLOWED_SUBSYSTEMS, subsystems,
+ MM_PLUGIN_ALLOWED_DRIVERS, drivers,
+ MM_PLUGIN_ALLOWED_VENDOR_IDS, vendor_ids,
+ MM_PLUGIN_ALLOWED_PRODUCT_IDS, product_ids,
+ MM_PLUGIN_ALLOWED_AT, TRUE,
NULL));
}
@@ -115,8 +115,8 @@ mm_plugin_option_init (MMPluginOption *self)
static void
mm_plugin_option_class_init (MMPluginOptionClass *klass)
{
- MMPluginBaseClass *pb_class = MM_PLUGIN_BASE_CLASS (klass);
+ MMPluginClass *plugin_class = MM_PLUGIN_CLASS (klass);
- pb_class->create_modem = create_modem;
- pb_class->grab_port = grab_port;
+ plugin_class->create_modem = create_modem;
+ plugin_class->grab_port = grab_port;
}
diff --git a/plugins/option/mm-plugin-option.h b/plugins/option/mm-plugin-option.h
index 5792c78d..275fc403 100644
--- a/plugins/option/mm-plugin-option.h
+++ b/plugins/option/mm-plugin-option.h
@@ -18,7 +18,7 @@
#ifndef MM_PLUGIN_OPTION_H
#define MM_PLUGIN_OPTION_H
-#include "mm-plugin-base.h"
+#include "mm-plugin.h"
#define MM_TYPE_PLUGIN_OPTION (mm_plugin_option_get_type ())
#define MM_PLUGIN_OPTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), MM_TYPE_PLUGIN_OPTION, MMPluginOption))
@@ -28,11 +28,11 @@
#define MM_PLUGIN_OPTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PLUGIN_OPTION, MMPluginOptionClass))
typedef struct {
- MMPluginBase parent;
+ MMPlugin parent;
} MMPluginOption;
typedef struct {
- MMPluginBaseClass parent;
+ MMPluginClass parent;
} MMPluginOptionClass;
GType mm_plugin_option_get_type (void);