[PATCH] add posibility to handle custom init response for plugins

2011-02-06 Thread Tom
From: Tom Bechtold toab...@googlemail.com

---
 src/mm-plugin-base.c |8 
 src/mm-plugin-base.h |2 ++
 2 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c
index 8d32e2a..b1e6c0d 100644
--- a/src/mm-plugin-base.c
+++ b/src/mm-plugin-base.c
@@ -745,6 +745,13 @@ custom_init_response (MMAtSerialPort *port,
 return;
 }
 }
+} else {
+//custom handle init response
+MMPluginBaseClass* klass = MM_PLUGIN_BASE_GET_CLASS(task_priv-plugin);
+if(klass-handle_custom_init_response != NULL)
+{
+klass-handle_custom_init_response(response);
+}
 }
 
 /* Otherwise proceed to probing */
@@ -1239,6 +1246,7 @@ mm_plugin_base_class_init (MMPluginBaseClass *klass)
 g_type_class_add_private (object_class, sizeof (MMPluginBasePrivate));
 
 klass-handle_probe_response = real_handle_probe_response;
+klass-handle_custom_init_response = NULL;
 
 /* Virtual methods */
 object_class-get_property = get_property;
diff --git a/src/mm-plugin-base.h b/src/mm-plugin-base.h
index a32d53b..a79be64 100644
--- a/src/mm-plugin-base.h
+++ b/src/mm-plugin-base.h
@@ -114,6 +114,8 @@ struct _MMPluginBaseClass {
const char *response,
const GError *error);
 
+void (*handle_custom_init_response) (GString *response);
+
 /* Signals */
 void (*probe_result) (MMPluginBase *self,
   MMPluginBaseSupportsTask *task,
-- 
1.7.1

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list


[PATCH] add posibility to handle custom init response for plugins

2011-02-06 Thread Tom
---
 src/mm-plugin-base.c |8 
 src/mm-plugin-base.h |3 +++
 2 files changed, 11 insertions(+), 0 deletions(-)

diff --git a/src/mm-plugin-base.c b/src/mm-plugin-base.c
index 8d32e2a..3e32512 100644
--- a/src/mm-plugin-base.c
+++ b/src/mm-plugin-base.c
@@ -745,6 +745,13 @@ custom_init_response (MMAtSerialPort *port,
 return;
 }
 }
+} else {
+//custom handle init response
+MMPluginBaseClass* klass = MM_PLUGIN_BASE_GET_CLASS(task_priv-plugin);
+if(klass-handle_custom_init_response != NULL)
+{
+klass-handle_custom_init_response(task, response);
+}
 }
 
 /* Otherwise proceed to probing */
@@ -1239,6 +1246,7 @@ mm_plugin_base_class_init (MMPluginBaseClass *klass)
 g_type_class_add_private (object_class, sizeof (MMPluginBasePrivate));
 
 klass-handle_probe_response = real_handle_probe_response;
+klass-handle_custom_init_response = NULL;
 
 /* Virtual methods */
 object_class-get_property = get_property;
diff --git a/src/mm-plugin-base.h b/src/mm-plugin-base.h
index a32d53b..4351082 100644
--- a/src/mm-plugin-base.h
+++ b/src/mm-plugin-base.h
@@ -114,6 +114,9 @@ struct _MMPluginBaseClass {
const char *response,
const GError *error);
 
+void (*handle_custom_init_response) (MMPluginBaseSupportsTask *task,
+ GString *response);
+
 /* Signals */
 void (*probe_result) (MMPluginBase *self,
   MMPluginBaseSupportsTask *task,
-- 
1.7.1

___
networkmanager-list mailing list
networkmanager-list@gnome.org
http://mail.gnome.org/mailman/listinfo/networkmanager-list