gisi: Add API for setting modem flags
authorAki Niemi <aki.niemi@nokia.com>
Fri, 4 Feb 2011 12:49:29 +0000 (14:49 +0200)
committerAki Niemi <aki.niemi@nokia.com>
Mon, 7 Feb 2011 07:51:34 +0000 (09:51 +0200)
gisi/modem.c
gisi/modem.h

index 8750367..3a0886b 100644 (file)
@@ -68,6 +68,7 @@ struct _GIsiModem {
        GIsiDebugFunc debug;
        GIsiNotifyFunc trace;
        void *opaque;
+       unsigned long flags;
 };
 
 struct _GIsiPending {
@@ -512,6 +513,22 @@ void *g_isi_modem_get_userdata(GIsiModem *modem)
        return modem->opaque;
 }
 
+unsigned long g_isi_modem_flags(GIsiModem *modem)
+{
+       if (modem == NULL)
+               return 0;
+
+       return modem->flags;
+}
+
+void g_isi_modem_set_flags(GIsiModem *modem, unsigned long flags)
+{
+       if (modem == NULL)
+               return;
+
+       modem->flags = flags;
+}
+
 static uint8_t service_next_utid(GIsiServiceMux *mux)
 {
        if (mux->last_utid == 0x00 || mux->last_utid == 0xFF)
index f0a1617..ae90046 100644 (file)
 extern "C" {
 #endif
 
+enum GIsiModemFlags {
+       GISI_MODEM_FLAG_USE_LEGACY_SUBSCRIBE = 1,
+};
+
 struct _GIsiModem;
 typedef struct _GIsiModem GIsiModem;
 
@@ -50,6 +54,9 @@ void g_isi_modem_set_debug(GIsiModem *modem, GIsiDebugFunc debug);
 void *g_isi_modem_set_userdata(GIsiModem *modem, void *data);
 void *g_isi_modem_get_userdata(GIsiModem *modem);
 
+unsigned long g_isi_modem_flags(GIsiModem *modem);
+void g_isi_modem_set_flags(GIsiModem *modem, unsigned long flags);
+
 GIsiPending *g_isi_request_send(GIsiModem *modem, uint8_t resource,
                                        const void *__restrict buf, size_t len,
                                        unsigned timeout, GIsiNotifyFunc notify,