[pkg-fso-commits] [SCM] libframeworkd-glib branch, master, updated. ad3bb0a5bb521ce8de424cf5ca702f23731c6333
quickdev
niklas.coding at gmail.com
Sat Dec 27 20:46:39 UTC 2008
The following commit has been merged in the master branch:
commit 20954567ec28282b9cc6d1844e671fb2d3ba8815
Author: quickdev <niklas.coding at gmail.com>
Date: Tue Dec 23 12:41:49 2008 +0100
As of now, the mode parameter of the IncomingUssd signal is an integer.
diff --git a/src/frameworkd-glib-dbus.h b/src/frameworkd-glib-dbus.h
index 49f1218..b64f318 100644
--- a/src/frameworkd-glib-dbus.h
+++ b/src/frameworkd-glib-dbus.h
@@ -37,7 +37,7 @@ typedef struct {
void (*simIncomingStoredMessage)(const int);
void (*callCallStatus)(const int, const int, GHashTable *);
void (*deviceIdleNotifierState)(const int);
- void (*incomingUssd)(const char*, const char*);
+ void (*incomingUssd)(int, const char*);
} FrameworkdHandlers;
void lose (const char *str, ...);
diff --git a/src/ogsmd/frameworkd-glib-ogsmd-network.c b/src/ogsmd/frameworkd-glib-ogsmd-network.c
index faeca40..7defe1d 100644
--- a/src/ogsmd/frameworkd-glib-ogsmd-network.c
+++ b/src/ogsmd/frameworkd-glib-ogsmd-network.c
@@ -49,12 +49,29 @@ void ogsmd_network_signal_strength_handler (DBusGProxy *proxy, const int signal_
void ogsmd_network_incoming_ussd_handler (DBusGProxy *proxy, const char *mode, const char *message, gpointer user_data)
{
- void (*callback)(const char*, const char*) = NULL;
+ void (*callback)(int, const char*) = NULL;
+
+ int m;
+ if(!strcmp(mode, DBUS_NETWORK_USSD_MODE_COMPLETED)) {
+ m = NETWORK_USSD_MODE_COMPLETED;
+ } else if(!strcmp(mode, DBUS_NETWORK_USSD_MODE_USERACTION)) {
+ m = NETWORK_USSD_MODE_USERACTION;
+ } else if(!strcmp(mode, DBUS_NETWORK_USSD_MODE_TERMINATED)) {
+ m = NETWORK_USSD_MODE_TERMINATED;
+ } else if(!strcmp(mode, DBUS_NETWORK_USSD_MODE_LOCALCLIENT)) {
+ m = NETWORK_USSD_MODE_LOCALCLIENT;
+ } else if(!strcmp(mode, DBUS_NETWORK_USSD_MODE_UNSUPPORTED)) {
+ m = NETWORK_USSD_MODE_UNSUPPORTED;
+ } else if(!strcmp(mode, DBUS_NETWORK_USSD_MODE_TIMEOUT)) {
+ m = NETWORK_USSD_MODE_TIMEOUT;
+ } else {
+ g_error("Unknown USSD mode: %s", mode);
+ }
callback = user_data;
if(callback != NULL)
- (*callback)(mode, message);
+ (*callback)(m, message);
}
GError* ogsmd_network_handle_errors(GError *dbus_error) {
diff --git a/src/ogsmd/frameworkd-glib-ogsmd-network.h b/src/ogsmd/frameworkd-glib-ogsmd-network.h
index 87f55e4..9b6ce12 100644
--- a/src/ogsmd/frameworkd-glib-ogsmd-network.h
+++ b/src/ogsmd/frameworkd-glib-ogsmd-network.h
@@ -63,6 +63,14 @@
#define DBUS_NETWORK_IDENTIFICATION_STATUS_OFF "off"
#define DBUS_NETWORK_IDENTIFICATION_STATUS_NETWORK "network"
+#define DBUS_NETWORK_USSD_MODE_COMPLETED "completed"
+#define DBUS_NETWORK_USSD_MODE_USERACTION "useraction"
+#define DBUS_NETWORK_USSD_MODE_TERMINATED "terminated"
+#define DBUS_NETWORK_USSD_MODE_LOCALCLIENT "localclient"
+#define DBUS_NETWORK_USSD_MODE_UNSUPPORTED "unsupported"
+#define DBUS_NETWORK_USSD_MODE_TIMEOUT "timeout"
+
+
typedef enum {
NETWORK_ERROR_NOT_PRESENT = -1,
NETWORK_ERROR_UNAUTHORIZED = -2,
@@ -114,6 +122,15 @@ typedef enum {
NETWORK_IDENTIFICATION_STATUS_NETWORK
} NetworkIdentificationStatus;
+typedef enum {
+ NETWORK_USSD_MODE_COMPLETED,
+ NETWORK_USSD_MODE_USERACTION,
+ NETWORK_USSD_MODE_TERMINATED,
+ NETWORK_USSD_MODE_LOCALCLIENT,
+ NETWORK_USSD_MODE_UNSUPPORTED,
+ NETWORK_USSD_MODE_TIMEOUT
+} NetworkUssdModes;
+
extern DBusGProxy *networkBus;
void ogsmd_network_status_handler (DBusGProxy *proxy, const GHashTable * status, gpointer user_data);
--
libframeworkd-glib
More information about the pkg-fso-commits
mailing list