aboutsummaryrefslogtreecommitdiff
path: root/libmm-glib
diff options
context:
space:
mode:
authorAleksander Morgado <aleksandermj@chromium.org>2023-04-27 12:19:18 +0000
committerAleksander Morgado <aleksander@aleksander.es>2023-04-27 12:23:04 +0000
commitbf2843ad77732f5fbe1ee04e7ad5415a60bf5eeb (patch)
treed9be783f8a8e239652ea7837700d98dc6359765f /libmm-glib
parentfdf03f9b2ccbc4a6a0a8102d44a991f78673e5a1 (diff)
libmm-glib: separate files for flags and enums types
This allows us to skip needing to include the non-existent build_string_from_mask() or get_string() counterparts in the documentation index.
Diffstat (limited to 'libmm-glib')
-rw-r--r--libmm-glib/generated/meson.build36
-rw-r--r--libmm-glib/libmm-glib.h1
-rw-r--r--libmm-glib/mm-3gpp-profile.c1
-rw-r--r--libmm-glib/mm-bearer-properties.c1
-rw-r--r--libmm-glib/mm-call-properties.c1
-rw-r--r--libmm-glib/mm-cell-info.c1
-rw-r--r--libmm-glib/mm-common-helpers.c1
-rw-r--r--libmm-glib/mm-kernel-event-properties.c1
-rw-r--r--libmm-glib/mm-pco.c1
-rw-r--r--libmm-glib/mm-simple-status.c1
-rw-r--r--libmm-glib/mm-sms-properties.c1
-rw-r--r--libmm-glib/mm-unlock-retries.c1
12 files changed, 47 insertions, 0 deletions
diff --git a/libmm-glib/generated/meson.build b/libmm-glib/generated/meson.build
index 268c4fb1..2f77e1bd 100644
--- a/libmm-glib/generated/meson.build
+++ b/libmm-glib/generated/meson.build
@@ -24,6 +24,7 @@ gen_sources += custom_target(
command: [
python,
mm_mkenums,
+ '--enums-only',
'--fhead', '#include "mm-enums-types.h"\n',
'--template', files(templates_dir / enums_types + '.c.template'),
'@INPUT@'],
@@ -37,6 +38,7 @@ gen_headers += custom_target(
command: [
python,
mm_mkenums,
+ '--enums-only',
'--fhead', '#include <ModemManager.h>\n#ifndef __MM_ENUMS_TYPES_H__\n#define __MM_ENUMS_TYPES_H__\n',
'--template', files(templates_dir / enums_types + '.h.template'),
'--ftail', '#endif /* __MM_ENUMS_TYPES_H__ */\n',
@@ -46,6 +48,40 @@ gen_headers += custom_target(
install_dir: mm_glib_pkgincludedir,
)
+# Flag types
+enums_types = 'mm-flags-types'
+
+gen_sources += custom_target(
+ enums_types + '.c',
+ input: mm_enums_header,
+ output: enums_types + '.c',
+ command: [
+ python,
+ mm_mkenums,
+ '--flags-only',
+ '--fhead', '#include "mm-flags-types.h"\n',
+ '--template', files(templates_dir / enums_types + '.c.template'),
+ '@INPUT@'],
+ capture: true,
+)
+
+gen_headers += custom_target(
+ enums_types + '.h',
+ input: mm_enums_header,
+ output: enums_types + '.h',
+ command: [
+ python,
+ mm_mkenums,
+ '--flags-only',
+ '--fhead', '#include <ModemManager.h>\n#ifndef __MM_FLAGS_TYPES_H__\n#define __MM_FLAGS_TYPES_H__\n',
+ '--template', files(templates_dir / enums_types + '.h.template'),
+ '--ftail', '#endif /* __MM_FLAGS_TYPES_H__ */\n',
+ '@INPUT@'],
+ capture: true,
+ install: true,
+ install_dir: mm_glib_pkgincludedir,
+)
+
# Error types & quarks
errors_types = 'mm-errors-types'
diff --git a/libmm-glib/libmm-glib.h b/libmm-glib/libmm-glib.h
index a6490fd8..8c282562 100644
--- a/libmm-glib/libmm-glib.h
+++ b/libmm-glib/libmm-glib.h
@@ -98,6 +98,7 @@
/* generated */
#include <mm-errors-types.h>
#include <mm-enums-types.h>
+#include <mm-flags-types.h>
#include <mm-gdbus-manager.h>
#include <mm-gdbus-modem.h>
#include <mm-gdbus-bearer.h>
diff --git a/libmm-glib/mm-3gpp-profile.c b/libmm-glib/mm-3gpp-profile.c
index 88c41756..65fe94ca 100644
--- a/libmm-glib/mm-3gpp-profile.c
+++ b/libmm-glib/mm-3gpp-profile.c
@@ -24,6 +24,7 @@
#include <string.h>
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-errors-types.h"
#include "mm-common-helpers.h"
#include "mm-3gpp-profile.h"
diff --git a/libmm-glib/mm-bearer-properties.c b/libmm-glib/mm-bearer-properties.c
index 6d0750bc..6005405c 100644
--- a/libmm-glib/mm-bearer-properties.c
+++ b/libmm-glib/mm-bearer-properties.c
@@ -25,6 +25,7 @@
#include "mm-errors-types.h"
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-common-helpers.h"
#include "mm-bearer-properties.h"
diff --git a/libmm-glib/mm-call-properties.c b/libmm-glib/mm-call-properties.c
index eef66507..c5da4920 100644
--- a/libmm-glib/mm-call-properties.c
+++ b/libmm-glib/mm-call-properties.c
@@ -26,6 +26,7 @@
#include "mm-errors-types.h"
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-common-helpers.h"
#include "mm-call-properties.h"
diff --git a/libmm-glib/mm-cell-info.c b/libmm-glib/mm-cell-info.c
index 9ba77555..846e470f 100644
--- a/libmm-glib/mm-cell-info.c
+++ b/libmm-glib/mm-cell-info.c
@@ -29,6 +29,7 @@
#include "mm-cell-info-nr5g.h"
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-errors-types.h"
/**
diff --git a/libmm-glib/mm-common-helpers.c b/libmm-glib/mm-common-helpers.c
index d233a801..217daf98 100644
--- a/libmm-glib/mm-common-helpers.c
+++ b/libmm-glib/mm-common-helpers.c
@@ -29,6 +29,7 @@
#include <ModemManager.h>
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-errors-types.h"
#include "mm-common-helpers.h"
diff --git a/libmm-glib/mm-kernel-event-properties.c b/libmm-glib/mm-kernel-event-properties.c
index 250c8350..23d08804 100644
--- a/libmm-glib/mm-kernel-event-properties.c
+++ b/libmm-glib/mm-kernel-event-properties.c
@@ -26,6 +26,7 @@
#include "mm-errors-types.h"
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-common-helpers.h"
#include "mm-kernel-event-properties.h"
diff --git a/libmm-glib/mm-pco.c b/libmm-glib/mm-pco.c
index ab3d0886..137e4c2d 100644
--- a/libmm-glib/mm-pco.c
+++ b/libmm-glib/mm-pco.c
@@ -24,6 +24,7 @@
#include <glib.h>
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-errors-types.h"
#include "mm-common-helpers.h"
#include "mm-pco.h"
diff --git a/libmm-glib/mm-simple-status.c b/libmm-glib/mm-simple-status.c
index 7ac79ecc..75e1a054 100644
--- a/libmm-glib/mm-simple-status.c
+++ b/libmm-glib/mm-simple-status.c
@@ -23,6 +23,7 @@
#include <string.h>
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-errors-types.h"
#include "mm-common-helpers.h"
#include "mm-simple-status.h"
diff --git a/libmm-glib/mm-sms-properties.c b/libmm-glib/mm-sms-properties.c
index 1783c423..72817ac2 100644
--- a/libmm-glib/mm-sms-properties.c
+++ b/libmm-glib/mm-sms-properties.c
@@ -26,6 +26,7 @@
#include "mm-errors-types.h"
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-common-helpers.h"
#include "mm-sms-properties.h"
diff --git a/libmm-glib/mm-unlock-retries.c b/libmm-glib/mm-unlock-retries.c
index d66d82e5..b093bab8 100644
--- a/libmm-glib/mm-unlock-retries.c
+++ b/libmm-glib/mm-unlock-retries.c
@@ -25,6 +25,7 @@
#include <stdlib.h>
#include "mm-enums-types.h"
+#include "mm-flags-types.h"
#include "mm-unlock-retries.h"
/**