2
* Copyright (C) 2010 Canonical, Ltd.
4
* This library is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU Lesser General Public License
6
* version 3.0 as published by the Free Software Foundation.
8
* This library is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU Lesser General Public License version 3.0 for more details.
13
* You should have received a copy of the GNU Lesser General Public
14
* License along with this library. If not, see
15
* <http://www.gnu.org/licenses/>.
17
* Authored by: Michal Hruby <michal.mhr@gmail.com>
20
#if !defined (_ZEITGEIST_H_INSIDE_) && !defined (ZEITGEIST_COMPILATION)
21
#error "Only <zeitgeist.h> can be included directly."
24
#ifndef _ZEITGEIST_DATA_SOURCE_REGISTRY_H_
25
#define _ZEITGEIST_DATA_SOURCE_REGISTRY_H_
28
#include <glib-object.h>
30
#include <zeitgeist-event.h>
31
#include <zeitgeist-enums.h>
32
#include <zeitgeist-data-source.h>
36
#define ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY (zeitgeist_data_source_registry_get_type())
37
#define ZEITGEIST_DATA_SOURCE_REGISTRY(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistry))
38
#define ZEITGEIST_DATA_SOURCE_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistryClass))
39
#define ZEITGEIST_DATA_SOURCE_REGISTRY_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY, ZeitgeistDataSourceRegistryClass))
40
#define ZEITGEIST_IS_DATA_SOURCE_REGISTRY(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY))
41
#define ZEITGEIST_IS_DATA_SOURCE_REGISTRY_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), ZEITGEIST_TYPE_DATA_SOURCE_REGISTRY))
43
typedef struct _ZeitgeistDataSourceRegistry ZeitgeistDataSourceRegistry;
44
typedef struct _ZeitgeistDataSourceRegistryClass ZeitgeistDataSourceRegistryClass;
46
struct _ZeitgeistDataSourceRegistryClass
48
GObjectClass parent_class;
50
void (*source_registered) (ZeitgeistDataSourceRegistry *registry,
51
ZeitgeistDataSource *source);
52
void (*source_disconnected) (ZeitgeistDataSourceRegistry *registry,
53
ZeitgeistDataSource *source);
54
void (*source_enabled) (ZeitgeistDataSourceRegistry *registry,
60
struct _ZeitgeistDataSourceRegistry
62
GObject parent_instance;
65
GType zeitgeist_data_source_registry_get_type (void);
67
ZeitgeistDataSourceRegistry* zeitgeist_data_source_registry_new (void);
69
void zeitgeist_data_source_registry_get_data_sources (
70
ZeitgeistDataSourceRegistry *self,
71
GCancellable *cancellable,
72
GAsyncReadyCallback callback,
75
GPtrArray* zeitgeist_data_source_registry_get_data_sources_finish (
76
ZeitgeistDataSourceRegistry *self,
80
void zeitgeist_data_source_registry_register_data_source (
81
ZeitgeistDataSourceRegistry *self,
82
ZeitgeistDataSource *source,
83
GCancellable *cancellable,
84
GAsyncReadyCallback callback,
87
gboolean zeitgeist_data_source_registry_register_data_source_finish (
88
ZeitgeistDataSourceRegistry *self,
92
void zeitgeist_data_source_registry_set_data_source_enabled (
93
ZeitgeistDataSourceRegistry *self,
94
const gchar *unique_id,
96
GCancellable *cancellable,
97
GAsyncReadyCallback callback,
100
void zeitgeist_data_source_registry_set_data_source_enabled_finish (
101
ZeitgeistDataSourceRegistry *self,
107
#endif /* _ZEITGEIST_DATA_SOURCE_REGISTRY_H_ */