at-serial-port: define flags by shifting bits

Otherwise glib-mkenums doesn't take the enumeration as being flags.
This commit is contained in:
Aleksander Morgado
2012-03-26 15:46:25 +02:00
parent 62923f9086
commit 79c93f4333

View File

@@ -41,13 +41,13 @@ typedef struct _MMAtSerialPortClass MMAtSerialPortClass;
* only when connecting is port 0 opened for dialing (ATD) and PPP * only when connecting is port 0 opened for dialing (ATD) and PPP
*/ */
typedef enum { /*< underscore_name=mm_at_port_flag >*/ typedef enum { /*< underscore_name=mm_at_port_flag >*/
MM_AT_PORT_FLAG_NONE = 0x0000, MM_AT_PORT_FLAG_NONE = 0,
/* This port is preferred for command and status */ /* This port is preferred for command and status */
MM_AT_PORT_FLAG_PRIMARY = 0x0001, MM_AT_PORT_FLAG_PRIMARY = 1 << 0,
/* Use port for command and status if the primary port is connected */ /* Use port for command and status if the primary port is connected */
MM_AT_PORT_FLAG_SECONDARY = 0x0002, MM_AT_PORT_FLAG_SECONDARY = 1 << 1,
/* This port should be used for PPP */ /* This port should be used for PPP */
MM_AT_PORT_FLAG_PPP = 0x0004 MM_AT_PORT_FLAG_PPP = 1 << 2,
} MMAtPortFlag; } MMAtPortFlag;
typedef gboolean (*MMAtSerialResponseParserFn) (gpointer user_data, typedef gboolean (*MMAtSerialResponseParserFn) (gpointer user_data,