summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlberto Mardegan <mardy@users.sourceforge.net>2007-06-08 06:05:06 +0000
committerAlberto Mardegan <mardy@users.sourceforge.net>2007-06-08 06:05:06 +0000
commit869ac3effac23b1a61417e935c7a934aa99489c4 (patch)
tree43fee1972421e48a88d56731b277afe84e71426c
parentd083845c99fb1a608ceaedc015a5dd025ccc4360 (diff)
Add virtual method request_parameters() to McdProvisioning interface.
Add docstrings. git-svn-id: https://mission-control.svn.sourceforge.net/svnroot/mission-control/trunk@53 d91c8aed-3f2b-0410-a83d-924a1c20a0ba
-rw-r--r--ChangeLog6
-rw-r--r--src/mcd-provisioning.c30
-rw-r--r--src/mcd-provisioning.h15
3 files changed, 47 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index fcabcaf4..e9e834bf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-06-08 Alberto Mardegan <alberto.mardegan@nokia.com>
+
+ * src/mcd-provisioning.[hc], src/mcd-provisioning-factory.c:
+ Add virtual method request_parameters() to McdProvisioning interface.
+ Add docstrings.
+
2007-06-01 Naba Kumar <naba.kumar@nokia.com>
* src/Makefile.am: Fixed enum generation.
diff --git a/src/mcd-provisioning.c b/src/mcd-provisioning.c
index 4444d4e1..ca08289c 100644
--- a/src/mcd-provisioning.c
+++ b/src/mcd-provisioning.c
@@ -70,3 +70,33 @@ mcd_provisioning_get_type (void)
}
return type;
}
+
+/**
+ * mcd_provisioning_request_parameters:
+ * @prov: the #McdProvisioning object.
+ * @url: URL of the provisioning server.
+ * @username: username for connecting to the server.
+ * @password: password for connecting to the server.
+ * @callback: #McdProvisioningCallback which will receive the parameters.
+ * @user_data: extra argument for @callback.
+ *
+ * Queries the provisioning service and registers the @callback function for
+ * handling the result.
+ */
+void
+mcd_provisioning_request_parameters (McdProvisioning *prov,
+ const gchar *url,
+ const gchar *username,
+ const gchar *password,
+ McdProvisioningCallback callback,
+ gpointer user_data)
+{
+ g_return_if_fail (MCD_IS_PROVISIONING (prov));
+
+ MCD_PROVISIONING_GET_IFACE (prov)->request_parameters (prov, url,
+ username,
+ password,
+ callback,
+ user_data);
+}
+
diff --git a/src/mcd-provisioning.h b/src/mcd-provisioning.h
index 2351c097..844a19a7 100644
--- a/src/mcd-provisioning.h
+++ b/src/mcd-provisioning.h
@@ -44,15 +44,22 @@ typedef enum
MCD_PROVISIONING_ERROR_BAD_RESULT,
} McdProvisioningError;
-struct _McdProvisioningIface {
- GTypeInterface g_iface;
-};
-
typedef void (*McdProvisioningCallback) (McdProvisioning *prov,
GHashTable *parameters,
GError *error,
gpointer user_data);
+struct _McdProvisioningIface {
+ GTypeInterface g_iface;
+
+ void (*request_parameters) (McdProvisioning *prov,
+ const gchar *url,
+ const gchar *username,
+ const gchar *password,
+ McdProvisioningCallback callback,
+ gpointer user_data);
+};
+
GQuark mcd_provisioning_error_quark (void);
GType mcd_provisioning_get_type (void);