1 /* gtd-object.h 2 * 3 * Copyright (C) 2015 Georges Basile Stavracas Neto <georges.stavracas@gmail.com> 4 * 5 * This program is free software: you can redistribute it and/or modify 6 * it under the terms of the GNU General Public License as published by 7 * the Free Software Foundation, either version 3 of the License, or 8 * (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 13 * GNU General Public License for more details. 14 * 15 * You should have received a copy of the GNU General Public License 16 * along with this program. If not, see <http://www.gnu.org/licenses/>. 17 */ 18 19 #pragma once 20 21 #include "gtd-types.h" 22 23 #include <glib-object.h> 24 25 G_BEGIN_DECLS 26 27 #define GTD_TYPE_OBJECT (gtd_object_get_type()) 28 29 G_DECLARE_DERIVABLE_TYPE (GtdObject, gtd_object, GTD, OBJECT, GObject) 30 31 struct _GtdObjectClass 32 { 33 GObjectClass parent; 34 35 /* public */ 36 const gchar* (* get_uid) (GtdObject *object); 37 void (* set_uid) (GtdObject *object, 38 const gchar *uid); 39 }; 40 41 GtdObject* gtd_object_new (const gchar *uid); 42 43 const gchar* gtd_object_get_uid (GtdObject *object); 44 45 void gtd_object_set_uid (GtdObject *object, 46 const gchar *uid); 47 48 gboolean gtd_object_get_loading (GtdObject *object); 49 50 void gtd_object_push_loading (GtdObject *object); 51 52 void gtd_object_pop_loading (GtdObject *object); 53 54 G_END_DECLS 55