libfeedback: Make libfeedback.h only include other files
Move the init functions to their own header so we don't clutter libfeedback.h more in the future. Signed-off-by: Guido Günther <agx@sigxcpu.org>
This commit is contained in:
committed by
Guido Günther
parent
d36ac3162c
commit
73d5a02bfc
@@ -1,9 +1,12 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 Purism SPC
|
* Copyright (C) 2020 Purism SPC
|
||||||
|
* 2025 The Phosh Developers
|
||||||
|
*
|
||||||
* SPDX-License-Identifier: LGPL-2.1+
|
* SPDX-License-Identifier: LGPL-2.1+
|
||||||
|
*
|
||||||
* Author: Guido Günther <agx@sigxcpu.org>
|
* Author: Guido Günther <agx@sigxcpu.org>
|
||||||
*/
|
*/
|
||||||
#include "libfeedback.h"
|
#include "lfb-main.h"
|
||||||
#include "lfb-gdbus.h"
|
#include "lfb-gdbus.h"
|
||||||
#include "lfb-priv.h"
|
#include "lfb-priv.h"
|
||||||
|
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2025 The Phosh Developers
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: LGPL-2.1+
|
||||||
|
*/
|
||||||
|
#pragma once
|
||||||
|
|
||||||
|
#include "lfb-gdbus.h"
|
||||||
|
|
||||||
|
#include <glib.h>
|
||||||
|
|
||||||
|
#if !defined (__LIBFEEDBACK_H_INSIDE__) && !defined (LIBFEEDBACK_COMPILATION)
|
||||||
|
#error "Only <libfeedback.h> can be included directly."
|
||||||
|
#endif
|
||||||
|
|
||||||
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
gboolean lfb_init (const gchar *app_id, GError **error);
|
||||||
|
void lfb_uninit (void);
|
||||||
|
void lfb_set_app_id (const char *app_id);
|
||||||
|
const char *lfb_get_app_id (void);
|
||||||
|
gboolean lfb_is_initted (void);
|
||||||
|
void lfb_set_feedback_profile (const char *profile);
|
||||||
|
const char *lfb_get_feedback_profile (void);
|
||||||
|
LfbGdbusFeedback *lfb_get_proxy (void);
|
||||||
|
|
||||||
|
G_END_DECLS
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2020 Purism SPC
|
* Copyright (C) 2020 Purism SPC
|
||||||
|
* 2025 The Phosh Developers
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: LGPL-2.1+
|
* SPDX-License-Identifier: LGPL-2.1+
|
||||||
*/
|
*/
|
||||||
@@ -18,14 +19,6 @@ G_BEGIN_DECLS
|
|||||||
#include "lfb-enums.h"
|
#include "lfb-enums.h"
|
||||||
#include "lfb-event.h"
|
#include "lfb-event.h"
|
||||||
#include "lfb-gdbus.h"
|
#include "lfb-gdbus.h"
|
||||||
|
#include "lfb-main.h"
|
||||||
gboolean lfb_init (const gchar *app_id, GError **error);
|
|
||||||
void lfb_uninit (void);
|
|
||||||
void lfb_set_app_id (const char *app_id);
|
|
||||||
const char *lfb_get_app_id (void);
|
|
||||||
gboolean lfb_is_initted (void);
|
|
||||||
void lfb_set_feedback_profile (const char *profile);
|
|
||||||
const char *lfb_get_feedback_profile (void);
|
|
||||||
LfbGdbusFeedback *lfb_get_proxy (void);
|
|
||||||
|
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|||||||
@@ -23,14 +23,15 @@ lfb_enum_sources = gnome.mkenums_simple('lfb-enums',
|
|||||||
libfeedback_headers = [
|
libfeedback_headers = [
|
||||||
'libfeedback.h',
|
'libfeedback.h',
|
||||||
'lfb-event.h',
|
'lfb-event.h',
|
||||||
|
'lfb-main.h',
|
||||||
]
|
]
|
||||||
|
|
||||||
libfeedback_sources = [
|
libfeedback_sources = [
|
||||||
generated_dbus_sources,
|
generated_dbus_sources,
|
||||||
lfb_enum_sources,
|
lfb_enum_sources,
|
||||||
libfeedback_headers,
|
libfeedback_headers,
|
||||||
'libfeedback.c',
|
|
||||||
'lfb-event.c',
|
'lfb-event.c',
|
||||||
|
'lfb-main.c',
|
||||||
]
|
]
|
||||||
|
|
||||||
libfeedback_deps = [
|
libfeedback_deps = [
|
||||||
|
|||||||
Reference in New Issue
Block a user