1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 8 -*- */ 2 /* 3 * Copyright (C) 2010 Lanedo GmbH 4 * 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. 9 * 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. 14 * 15 * You should have received a copy of the GNU General Public 16 * License along with this program; if not, write to the 17 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 18 * Boston, MA 02111-1307, USA. 19 */ 20 21 #ifndef __DH_BOOK_MANAGER_H__ 22 #define __DH_BOOK_MANAGER_H__ 23 24 #include <gtk/gtk.h> 25 26 #include "dh-book.h" 27 28 G_BEGIN_DECLS 29 30 typedef struct _DhBookManager DhBookManager; 31 typedef struct _DhBookManagerClass DhBookManagerClass; 32 33 #define DH_TYPE_BOOK_MANAGER (dh_book_manager_get_type ()) 34 #define DH_BOOK_MANAGER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), DH_TYPE_BOOK_MANAGER, DhBookManager)) 35 #define DH_BOOK_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), DH_TYPE_BOOK_MANAGER, DhBookManagerClass)) 36 #define DH_IS_BOOK_MANAGER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), DH_TYPE_BOOK_MANAGER)) 37 #define DH_IS_BOOK_MANAGER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), DH_TYPE_BOOK_MANAGER)) 38 #define DH_BOOK_MANAGER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), DH_TYPE_BOOK_MANAGER, DhBookManagerClass)) 39 40 struct _DhBookManager { 41 GObject parent_instance; 42 }; 43 44 struct _DhBookManagerClass { 45 GObjectClass parent_class; 46 47 /* Signals */ 48 void (* disabled_book_list_updated) (DhBookManager *book_manager); 49 }; 50 51 GType dh_book_manager_get_type (void) G_GNUC_CONST; 52 DhBookManager *dh_book_manager_new (void); 53 void dh_book_manager_populate (DhBookManager *book_manager); 54 GList *dh_book_manager_get_books (DhBookManager *book_manager); 55 DhBook *dh_book_manager_get_book_by_name (DhBookManager *book_manager, 56 const gchar *name); 57 void dh_book_manager_update (DhBookManager *book_manager); 58 59 G_END_DECLS 60 61 #endif /* __DH_BOOK_MANAGER_H__ */ 62