/* * Copyright (C) 2013 - Juan Ferrer Toribio * * 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 3 of the License, 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. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ #ifndef DB_MODEL_HOLDER_H #define DB_MODEL_HOLDER_H #include "db-model.h" #define DB_TYPE_MODEL_HOLDER (db_model_holder_get_type ()) #define DB_MODEL_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), DB_TYPE_MODEL_HOLDER, DbModelHolder)) #define DB_IS_MODEL_HOLDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), DB_TYPE_MODEL_HOLDER)) #define DB_MODEL_HOLDER_GET_INTERFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), DB_TYPE_MODEL_HOLDER, DbModelHolderInterface)) typedef struct _DbModelHolder DbModelHolder; typedef struct _DbModelHolderInterface DbModelHolderInterface; typedef DbModel * (* DbModelHolderGetModelFunc) (DbModelHolder * obj); typedef void (* DbModelHolderSetModelFunc) (DbModelHolder * obj, DbModel * sql); struct _DbModelHolder {}; struct _DbModelHolderInterface { /* */ GTypeInterface parent; DbModelHolderGetModelFunc get_model; DbModelHolderSetModelFunc set_model; }; GType db_model_holder_get_type (); DbModel * db_model_holder_get_model (DbModelHolder * obj); void db_model_holder_set_model (DbModelHolder * obj, DbModel * model); #endif