diff options
author | Guido Günther <agx@sigxcpu.org> | 2014-03-10 10:35:52 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2014-03-10 11:56:05 +0100 |
commit | 79e2834af9af2ef6eef297c66c8d5fed6c680ec7 (patch) | |
tree | 2dc45b49e059168fd9649ff254334211fc7ee374 | |
parent | 1b38625628edf159668f30b95a1badb248baa4e6 (diff) |
Add constructor
-rw-r--r-- | libplanfahr/libplanfahr.sym | 3 | ||||
-rw-r--r-- | libplanfahr/lpf-manager.c | 5 | ||||
-rw-r--r-- | libplanfahr/lpf-manager.h | 1 |
3 files changed, 8 insertions, 1 deletions
diff --git a/libplanfahr/libplanfahr.sym b/libplanfahr/libplanfahr.sym index 1fc8515..7b72b02 100644 --- a/libplanfahr/libplanfahr.sym +++ b/libplanfahr/libplanfahr.sym @@ -1,11 +1,12 @@ LIBPLANFAHR_0.0.0 { global: /* LpfManager */ - lpf_manager_get_available_providers; lpf_manager_activate_provider; lpf_manager_deactivate_provider; lpf_manager_error_quark; + lpf_manager_get_available_providers; lpf_manager_get_type; + lpf_manager_new; /* LpfProvider */ lpf_provider_activate; lpf_provider_deactivate; diff --git a/libplanfahr/lpf-manager.c b/libplanfahr/lpf-manager.c index e67ddf5..bb17d33 100644 --- a/libplanfahr/lpf-manager.c +++ b/libplanfahr/lpf-manager.c @@ -227,6 +227,11 @@ LpfProvider *lpf_manager_activate_provider(LpfManager *self, return provider; } +LpfManager *lpf_manager_new (void) +{ + return LPF_MANAGER(g_object_new (LPF_TYPE_MANAGER, NULL)); +} + static void deactivate_provider(gpointer provider, gpointer user_data) { diff --git a/libplanfahr/lpf-manager.h b/libplanfahr/lpf-manager.h index e1bef71..8de5bc7 100644 --- a/libplanfahr/lpf-manager.h +++ b/libplanfahr/lpf-manager.h @@ -76,6 +76,7 @@ typedef struct { GObjectClass parent_class; } LpfManagerClass; +LpfManager *lpf_manager_new (void); GType lpf_manager_get_type (void); GQuark lpf_manager_error_quark (void); GStrv lpf_manager_get_available_providers(void); |