[librest/tintou/annotations: 2/4] Make the single-header usable




commit b55a7aad46554658916e57c28e024fa34e0b1e82
Author: Corentin Noël <corentin noel collabora com>
Date:   Tue Aug 9 11:16:39 2022 +0200

    Make the single-header usable
    
    The pkg-config is only declaring the rest-1.0 directory so we always need to use
    rest/rest-foo.h and not rest-foo.h
    
    Also make sure to include all the headers.

 rest/meson.build              |  5 -----
 rest/rest-oauth2-proxy-call.c |  1 +
 rest/rest-oauth2-proxy-call.h |  3 ++-
 rest/rest.h                   | 17 ++++++++++++-----
 4 files changed, 15 insertions(+), 11 deletions(-)
---
diff --git a/rest/meson.build b/rest/meson.build
index fd3ae79..224b24a 100644
--- a/rest/meson.build
+++ b/rest/meson.build
@@ -79,13 +79,8 @@ endif
 if get_option('introspection')
   librest_gir_extra_args = [
     '--accept-unprefixed',
-    '--c-include=rest/rest-enum-types.h',
   ]
 
-  foreach header : librest_headers
-    librest_gir_extra_args += '--c-include=rest/@0@'.format(header)
-  endforeach
-
   librest_gir = gnome.generate_gir(librest_lib,
     sources: librest_sources + librest_headers + librest_enums,
     nsversion: librest_api_version,
diff --git a/rest/rest-oauth2-proxy-call.c b/rest/rest-oauth2-proxy-call.c
index 88840b3..cfed247 100644
--- a/rest/rest-oauth2-proxy-call.c
+++ b/rest/rest-oauth2-proxy-call.c
@@ -17,6 +17,7 @@
  */
 
 #include "rest-oauth2-proxy-call.h"
+#include "rest-oauth2-proxy.h"
 
 G_DEFINE_TYPE (RestOAuth2ProxyCall, rest_oauth2_proxy_call, REST_TYPE_PROXY_CALL)
 
diff --git a/rest/rest-oauth2-proxy-call.h b/rest/rest-oauth2-proxy-call.h
index 799157d..3da126d 100644
--- a/rest/rest-oauth2-proxy-call.h
+++ b/rest/rest-oauth2-proxy-call.h
@@ -18,7 +18,8 @@
 
 #pragma once
 
-#include <rest/rest.h>
+#include <glib-object.h>
+#include <rest/rest-proxy-call.h>
 
 G_BEGIN_DECLS
 
diff --git a/rest/rest.h b/rest/rest.h
index 0c4afbb..4dbd135 100644
--- a/rest/rest.h
+++ b/rest/rest.h
@@ -25,11 +25,18 @@
 G_BEGIN_DECLS
 
 #define REST_INSIDE
-# include "rest-proxy.h"
-# include "rest-proxy-call.h"
-# include "rest-oauth2-proxy.h"
-# include "rest-utils.h"
-# include "rest-pkce-code-challenge.h"
+# include <rest/rest-oauth2-proxy.h>
+# include <rest/rest-oauth2-proxy-call.h>
+# include <rest/rest-param.h>
+# include <rest/rest-params.h>
+# include <rest/rest-pkce-code-challenge.h>
+# include <rest/rest-pkce-code-challenge.h>
+# include <rest/rest-proxy.h>
+# include <rest/rest-proxy-auth.h>
+# include <rest/rest-proxy-call.h>
+# include <rest/rest-utils.h>
+# include <rest/rest-xml-node.h>
+# include <rest/rest-xml-parser.h>
 #undef REST_INSIDE
 
 G_END_DECLS


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]