]> git.alsa-project.org Git - alsa-gobject.git/commitdiff
hwdep: add entry header to aggregate header inclusion
authorTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 16 Mar 2022 00:03:48 +0000 (09:03 +0900)
committerTakashi Sakamoto <o-takashi@sakamocchi.jp>
Wed, 16 Mar 2022 00:03:48 +0000 (09:03 +0900)
It's convenient to add header to include all of headers in regard of
documentation.

Signed-off-by: Takashi Sakamoto <o-takashi@sakamocchi.jp>
src/hwdep/alsahwdep-enum-types.h
src/hwdep/alsahwdep.h [new file with mode: 0644]
src/hwdep/device-info.h
src/hwdep/meson.build
src/hwdep/privates.h
src/hwdep/query.c
src/hwdep/query.h

index b51166699acf70a5af488ef33e4c566eb498444b..0c2ebbf3625421d4efde3298154a874b8d269010 100644 (file)
@@ -2,7 +2,6 @@
 #ifndef __ALSA_GOBJECT_ALSAHWDEP_ENUM_TYPES__H__
 #define __ALSA_GOBJECT_ALSAHWDEP_ENUM_TYPES__H__
 
-#include <sound/asound.h>
 #include <linux/version.h>
 
 #if LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
diff --git a/src/hwdep/alsahwdep.h b/src/hwdep/alsahwdep.h
new file mode 100644 (file)
index 0000000..cd2c2da
--- /dev/null
@@ -0,0 +1,17 @@
+// SPDX-License-Identifier: LGPL-3.0-or-later
+#ifndef __ALSA_GOBJECT_ALSAHWDEP_H__
+#define __ALSA_GOBJECT_ALSAHWDEP_H__
+
+#include <glib.h>
+#include <glib-object.h>
+
+#include <sound/asound.h>
+
+#include <alsahwdep-enum-types.h>
+#include <alsahwdep-enums.h>
+
+#include <device-info.h>
+
+#include <query.h>
+
+#endif
index faee53f59efca0e61877e41aca0f35b96893e5d3..3e6a41706e3fa05ec369a70b386f8c014253b678 100644 (file)
@@ -2,10 +2,7 @@
 #ifndef __ALSA_GOBJECT_ALSAHWDEP_DEVICE_INFO__H__
 #define __ALSA_GOBJECT_ALSAHWDEP_DEVICE_INFO__H__
 
-#include <glib.h>
-#include <glib-object.h>
-
-#include <hwdep/alsahwdep-enums.h>
+#include <alsahwdep.h>
 
 G_BEGIN_DECLS
 
index cdbbbb8571267cf7919a84e8882582d40661d557..d02b38287a6c3ab24582309ec86eaf6eeab894cf 100644 (file)
@@ -9,17 +9,18 @@ has_enumerations = true
 has_marshaller = false
 
 sources = files(
-    'query.c',
-    'device-info.c',
+  'query.c',
+  'device-info.c',
 )
 
 headers = files(
-    'query.h',
-    'device-info.h',
+  'alsahwdep.h',
+  'query.h',
+  'device-info.h',
 )
 
 privates = files(
-    'privates.h',
+  'privates.h',
 )
 
 # For test.
@@ -53,7 +54,7 @@ if has_enumerations
     identifier_prefix: namespace,
     install_header: true,
     install_dir: join_paths(get_option('includedir'), inc_dir),
-    header_prefix: '#include <@0@-enum-types.h>'.format(join_paths(path, name)),
+    header_prefix: '#include <alsahwdep.h>',
   )
 else
   enums = []
@@ -85,7 +86,7 @@ library = library(name,
   dependencies: dependencies,
   link_args : linker_flag,
   link_depends : mapfile_name,
-  include_directories: include_directories('..'),
+  include_directories: include_directories('.'),
 )
 
 install_headers(headers,
@@ -96,7 +97,7 @@ install_headers(headers,
 pkg = import('pkgconfig')
 pkg.generate(library,
   description: 'GObject instrospection library for HwDep interface in asound.h',
-  subdirs: meson.project_name(),
+  subdirs: inc_dir,
 )
 
 # Generate metadata for gobject introspection.
@@ -112,6 +113,7 @@ gnome.generate_gir(library,
     'GLib-2.0',
     'GObject-2.0',
   ],
+  header: 'alsahwdep.h',
   install: true,
 )
 
index e94070c2089ab31eda7259f9285cae0dacd743dc..ee3f38d0eee84b4cb6bc5989b17fedb298648071 100644 (file)
@@ -2,9 +2,7 @@
 #ifndef __ALSA_GOBJECT_ALSAHWDEP_PRIVATES__H__
 #define __ALSA_GOBJECT_ALSAHWDEP_PRIVATES__H__
 
-#include "device-info.h"
-
-#include <sound/asound.h>
+#include "alsahwdep.h"
 
 G_BEGIN_DECLS
 
index 3298c19ab9e947003f6ac1b2300af71b498cd753..9731ab8c022b7bbaf0b10c23569acc2b677a60b4 100644 (file)
@@ -1,5 +1,4 @@
 // SPDX-License-Identifier: LGPL-3.0-or-later
-#include "query.h"
 #include "privates.h"
 
 #include <stdio.h>
index 58369d45fb1fe5fc0a7b11d4b891e9ecb8ef6456..113764027b30988f4e67168e35550bd92c9cd72b 100644 (file)
@@ -2,10 +2,7 @@
 #ifndef __ALSA_GOBJECT_ALSAHWDEP_QUERY__H__
 #define __ALSA_GOBJECT_ALSAHWDEP_QUERY__H__
 
-#include <glib.h>
-#include <glib-object.h>
-
-#include <hwdep/device-info.h>
+#include <alsahwdep.h>
 
 G_BEGIN_DECLS