/* * Author: Chris Lord * * Copyright (c) 2007 OpenedHand Ltd - http://www.openedhand.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2, or (at your option) * any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * */ #ifndef JANA_STORE_H #define JANA_STORE_H #include #define JANA_TYPE_STORE (jana_store_get_type ()) #define JANA_STORE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj),\ JANA_TYPE_STORE,\ JanaStore)) #define JANA_IS_STORE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj),\ JANA_TYPE_STORE)) #define JANA_STORE_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst),\ JANA_TYPE_STORE,\ JanaStoreInterface)) /** * JanaStore: * * The #JanaStore struct contains only private data. */ typedef struct _JanaStore JanaStore; /* Dummy object */ typedef struct _JanaStoreInterface JanaStoreInterface; #include #include struct _JanaStoreInterface { GTypeInterface parent; void (*open) (JanaStore *self); JanaComponent * (*get_component) (JanaStore *self, const gchar *uid); JanaStoreView * (*get_view) (JanaStore *self); void (*add_component) (JanaStore *self, JanaComponent *comp); void (*modify_component) (JanaStore *self, JanaComponent *comp); void (*remove_component) (JanaStore *self, JanaComponent *comp); /* Signals */ void (*opened) (JanaStore *self); /*gchar * (*auth) (JanaStore *self, */ }; GType jana_store_get_type (void); void jana_store_open (JanaStore *self); JanaComponent * jana_store_get_component (JanaStore *self, const gchar *uid); JanaStoreView * jana_store_get_view (JanaStore *self); void jana_store_add_component (JanaStore *self, JanaComponent *comp); void jana_store_modify_component (JanaStore *self, JanaComponent *comp); void jana_store_remove_component (JanaStore *self, JanaComponent *comp); #endif /* JANA_STORE_H */