| 1 |
/* WirePlumber |
| 2 |
* |
| 3 |
* Copyright © 2019 Collabora Ltd. |
| 4 |
* @author George Kiagiadakis <[email protected]> |
| 5 |
* |
| 6 |
* SPDX-License-Identifier: MIT |
| 7 |
*/ |
| 8 |
|
| 9 |
#ifndef __WIREPLUMBER_OBJECT_MANAGER_H__ |
| 10 |
#define __WIREPLUMBER_OBJECT_MANAGER_H__ |
| 11 |
|
| 12 |
#include <glib-object.h> |
| 13 |
#include "object.h" |
| 14 |
#include "iterator.h" |
| 15 |
#include "object-interest.h" |
| 16 |
|
| 17 |
G_BEGIN_DECLS |
| 18 |
|
| 19 |
/*! |
| 20 |
* \brief The WpObjectManager GType |
| 21 |
* \ingroup wpobjectmanager |
| 22 |
*/ |
| 23 |
#define WP_TYPE_OBJECT_MANAGER (wp_object_manager_get_type ()) |
| 24 |
WP_API |
| 25 |
G_DECLARE_FINAL_TYPE (WpObjectManager, wp_object_manager, WP, OBJECT_MANAGER, GObject) |
| 26 |
|
| 27 |
WP_API |
| 28 |
WpObjectManager * wp_object_manager_new (void); |
| 29 |
|
| 30 |
/* installation */ |
| 31 |
|
| 32 |
WP_API |
| 33 |
gboolean wp_object_manager_is_installed (WpObjectManager * self); |
| 34 |
|
| 35 |
/* interest */ |
| 36 |
|
| 37 |
WP_API |
| 38 |
void wp_object_manager_add_interest (WpObjectManager * self, |
| 39 |
GType gtype, ...) G_GNUC_NULL_TERMINATED; |
| 40 |
|
| 41 |
WP_API |
| 42 |
void wp_object_manager_add_interest_full (WpObjectManager * self, |
| 43 |
WpObjectInterest * interest); |
| 44 |
|
| 45 |
/* object features */ |
| 46 |
|
| 47 |
WP_API |
| 48 |
void wp_object_manager_request_object_features (WpObjectManager *self, |
| 49 |
GType object_type, WpObjectFeatures wanted_features); |
| 50 |
|
| 51 |
/* object inspection */ |
| 52 |
|
| 53 |
WP_API |
| 54 |
guint wp_object_manager_get_n_objects (WpObjectManager * self); |
| 55 |
|
| 56 |
WP_API |
| 57 |
WpIterator * wp_object_manager_new_iterator (WpObjectManager * self); |
| 58 |
|
| 59 |
WP_API |
| 60 |
WpIterator * wp_object_manager_new_filtered_iterator (WpObjectManager * self, |
| 61 |
GType gtype, ...); |
| 62 |
|
| 63 |
WP_API |
| 64 |
WpIterator * wp_object_manager_new_filtered_iterator_full ( |
| 65 |
WpObjectManager * self, WpObjectInterest * interest); |
| 66 |
|
| 67 |
WP_API |
| 68 |
gpointer wp_object_manager_lookup (WpObjectManager * self, |
| 69 |
GType gtype, ...) G_GNUC_NULL_TERMINATED; |
| 70 |
|
| 71 |
WP_API |
| 72 |
gpointer wp_object_manager_lookup_full (WpObjectManager * self, |
| 73 |
WpObjectInterest * interest); |
| 74 |
|
| 75 |
/* private */ |
| 76 |
|
| 77 |
typedef struct _WpGlobal WpGlobal; |
| 78 |
|
| 79 |
WP_PRIVATE_API |
| 80 |
void wp_object_manager_maybe_objects_changed (WpObjectManager * self); |
| 81 |
|
| 82 |
WP_PRIVATE_API |
| 83 |
void wp_object_manager_add_object (WpObjectManager * self, gpointer object); |
| 84 |
|
| 85 |
WP_PRIVATE_API |
| 86 |
void wp_object_manager_rm_object (WpObjectManager * self, gpointer object); |
| 87 |
|
| 88 |
WP_PRIVATE_API |
| 89 |
void wp_object_manager_add_global (WpObjectManager * self, WpGlobal * global); |
| 90 |
|
| 91 |
G_END_DECLS |
| 92 |
|
| 93 |
#endif |