charsets: define charset enum explicitly as flags

This commit is contained in:
Aleksander Morgado
2021-02-23 11:35:10 +00:00
parent 19e5d5f926
commit a025e83e5a
+10 -10
View File
@@ -19,16 +19,16 @@
#include <glib.h>
typedef enum {
MM_MODEM_CHARSET_UNKNOWN = 0x00000000,
MM_MODEM_CHARSET_GSM = 0x00000001,
MM_MODEM_CHARSET_IRA = 0x00000002,
MM_MODEM_CHARSET_8859_1 = 0x00000004,
MM_MODEM_CHARSET_UTF8 = 0x00000008,
MM_MODEM_CHARSET_UCS2 = 0x00000010,
MM_MODEM_CHARSET_PCCP437 = 0x00000020,
MM_MODEM_CHARSET_PCDN = 0x00000040,
MM_MODEM_CHARSET_HEX = 0x00000080,
MM_MODEM_CHARSET_UTF16 = 0x00000100,
MM_MODEM_CHARSET_UNKNOWN = 0,
MM_MODEM_CHARSET_GSM = 1 << 0,
MM_MODEM_CHARSET_IRA = 1 << 1,
MM_MODEM_CHARSET_8859_1 = 1 << 2,
MM_MODEM_CHARSET_UTF8 = 1 << 3,
MM_MODEM_CHARSET_UCS2 = 1 << 4,
MM_MODEM_CHARSET_PCCP437 = 1 << 5,
MM_MODEM_CHARSET_PCDN = 1 << 6,
MM_MODEM_CHARSET_HEX = 1 << 7,
MM_MODEM_CHARSET_UTF16 = 1 << 8,
} MMModemCharset;
const gchar *mm_modem_charset_to_string (MMModemCharset charset);