emulator: Refactor data types
authorDenis Kenzior <denkenz@gmail.com>
Wed, 22 Jan 2014 16:10:44 +0000 (10:10 -0600)
committerDenis Kenzior <denkenz@gmail.com>
Mon, 20 Oct 2014 18:40:28 +0000 (13:40 -0500)
src/emulator.c

index 8356a4ca1e21508a49e56ccfa37f7f07d884a6e3..725a5d0181eced344edb20b848839df6cdfa3e1c 100644 (file)
@@ -26,6 +26,7 @@
 #include <stdio.h>
 #include <string.h>
 #include <unistd.h>
+#include <stdbool.h>
 
 #include <glib.h>
 
@@ -42,17 +43,17 @@ struct ofono_emulator {
        enum ofono_emulator_type type;
        GAtServer *server;
        GAtPPP *ppp;
-       gboolean slc;
        int l_features;
        int r_features;
-       int events_mode;
-       gboolean events_ind;
-       unsigned char cmee_mode;
        GSList *indicators;
        guint callsetup_source;
-       gboolean clip;
-       gboolean ccwa;
        int pns_id;
+       bool slc : 1;
+       unsigned int events_mode : 2;
+       bool events_ind : 1;
+       unsigned int cmee_mode : 2;
+       bool clip : 1;
+       bool ccwa : 1;
 };
 
 struct indicator {