yelp-document: Fix return type of document_indexed
[yelp.git] / libyelp / yelp-storage.h
blobf5d622661d1629b9dfe9be3a554e437f0f0957db
1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * Copyright (C) 2011 Shaun McCance <shaunm@gnome.org>
5 * This program is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU General Public License as
7 * published by the Free Software Foundation; either version 2 of the
8 * License, or (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * General Public License for more details.
15 * You should have received a copy of the GNU General Public
16 * License along with this program; if not, see <http://www.gnu.org/licenses/>.
18 * Author: Shaun McCance <shaunm@gnome.org>
21 #ifndef __YELP_STORAGE_H__
22 #define __YELP_STORAGE_H__
24 #include <glib-object.h>
26 G_BEGIN_DECLS
28 #define YELP_TYPE_STORAGE (yelp_storage_get_type ())
29 #define YELP_STORAGE(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), YELP_TYPE_STORAGE, YelpStorage))
30 #define YELP_IS_STORAGE(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), YELP_TYPE_STORAGE))
31 #define YELP_STORAGE_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), YELP_TYPE_STORAGE, YelpStorageInterface))
33 typedef struct _YelpStorage YelpStorage;
34 typedef struct _YelpStorageInterface YelpStorageInterface;
36 struct _YelpStorageInterface {
37 GTypeInterface base_iface;
39 void (*update) (YelpStorage *storage,
40 const gchar *doc_uri,
41 const gchar *full_uri,
42 const gchar *title,
43 const gchar *desc,
44 const gchar *icon,
45 const gchar *text);
46 GVariant * (*search) (YelpStorage *storage,
47 const gchar *doc_uri,
48 const gchar *text);
49 gchar * (*get_root_title) (YelpStorage *storage,
50 const gchar *doc_uri);
51 void (*set_root_title) (YelpStorage *storage,
52 const gchar *doc_uri,
53 const gchar *title);
56 GType yelp_storage_get_type (void);
58 void yelp_storage_set_default (YelpStorage *storage);
59 YelpStorage * yelp_storage_get_default (void);
61 void yelp_storage_update (YelpStorage *storage,
62 const gchar *doc_uri,
63 const gchar *full_uri,
64 const gchar *title,
65 const gchar *desc,
66 const gchar *icon,
67 const gchar *text);
68 GVariant * yelp_storage_search (YelpStorage *storage,
69 const gchar *doc_uri,
70 const gchar *text);
71 gchar * yelp_storage_get_root_title (YelpStorage *storage,
72 const gchar *doc_uri);
73 void yelp_storage_set_root_title (YelpStorage *storage,
74 const gchar *doc_uri,
75 const gchar *title);
77 G_END_DECLS
79 #endif /* __YELP_STORAGE_H__ */