port-probe: convert port probe flags to a private enum
This commit is contained in:
+4
-2
@@ -73,11 +73,13 @@ libserial_la_SOURCES = \
|
||||
mm-qcdm-serial-port.h
|
||||
|
||||
# Daemon specific enum types
|
||||
DAEMON_ENUMS = $(srcdir)/mm-bearer.h
|
||||
DAEMON_ENUMS = \
|
||||
$(srcdir)/mm-bearer.h \
|
||||
$(srcdir)/mm-port-probe.h
|
||||
|
||||
mm-daemon-enums-types.h: Makefile.am $(DAEMON_ENUMS) $(top_srcdir)/build-aux/mm-enums-template.h
|
||||
$(AM_V_GEN) $(GLIB_MKENUMS) \
|
||||
--fhead "#include \"mm-bearer.h\"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n" \
|
||||
--fhead "#include \"mm-bearer.h\"\n#include \"mm-port-probe.h\"\n#ifndef __MM_DAEMON_ENUMS_TYPES_H__\n#define __MM_DAEMON_ENUMS_TYPES_H__\n" \
|
||||
--template $(top_srcdir)/build-aux/mm-enums-template.h \
|
||||
--ftail "#endif /* __MM_DAEMON_ENUMS_TYPES_H__ */\n" \
|
||||
$(DAEMON_ENUMS) > $@
|
||||
|
||||
+7
-4
@@ -34,10 +34,13 @@
|
||||
#define MM_PORT_PROBE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), MM_TYPE_PORT_PROBE, MMPortProbeClass))
|
||||
|
||||
/* Flags to request port probing */
|
||||
#define MM_PORT_PROBE_AT 0x0001
|
||||
#define MM_PORT_PROBE_AT_VENDOR 0x0002
|
||||
#define MM_PORT_PROBE_AT_PRODUCT 0x0004
|
||||
#define MM_PORT_PROBE_QCDM 0x0008
|
||||
typedef enum { /*< underscore_name=mm_port_probe_flag >*/
|
||||
MM_PORT_PROBE_NONE = 0,
|
||||
MM_PORT_PROBE_AT = 1 << 0,
|
||||
MM_PORT_PROBE_AT_VENDOR = 1 << 1,
|
||||
MM_PORT_PROBE_AT_PRODUCT = 1 << 2,
|
||||
MM_PORT_PROBE_QCDM = 1 << 3,
|
||||
} MMPortProbeFlag;
|
||||
|
||||
typedef struct _MMPortProbe MMPortProbe;
|
||||
typedef struct _MMPortProbeClass MMPortProbeClass;
|
||||
|
||||
Reference in New Issue
Block a user