midgard/midgard_sitegroup.h

00001 /* 
00002  * Copyright (C) 2006 Piotr Pokora <piotr.pokora@infoglob.pl>
00003  *
00004  * This program is free software; you can redistribute it and/or modify it
00005  * under the terms of the GNU Lesser General Public License as published
00006  * by the Free Software Foundation; either version 2 of the License, or
00007  * (at your option) any later version.
00008  * 
00009  * This program is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  * GNU General Public License for more details.
00013  * 
00014  * You should have received a copy of the GNU General Public License
00015  * along with this program; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017  */
00018 
00019 #ifndef MIDGARD_SITEGROUP_H
00020 #define MIDGARD_SITEGROUP_H
00021 
00036 #include "midgard/midgard_connection.h"
00037 
00038 /* convention macros */
00039 #define MIDGARD_TYPE_SITEGROUP (midgard_sitegroup_get_type())
00040 #define MIDGARD_SITEGROUP(object)  \
00041                 (G_TYPE_CHECK_INSTANCE_CAST ((object),MIDGARD_TYPE_SITEGROUP, MidgardSitegroup))
00042 #define MIDGARD_SITEGROUP_CLASS(klass)  \
00043                 (G_TYPE_CHECK_CLASS_CAST ((klass), MIDGARD_TYPE_SITEGROUP, MidgardSitegroupClass))
00044 #define MIDGARD_IS_SITEGROUP(object)   \
00045                 (G_TYPE_CHECK_INSTANCE_TYPE ((object), MIDGARD_TYPE_SITEGROUP))
00046 #define MIDGARD_IS_SITEGROUP_CLASS(klass) \
00047                 (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDGARD_TYPE_SITEGROUP))
00048 #define MIDGARD_SITEGROUP_GET_CLASS(obj) \
00049                 (G_TYPE_INSTANCE_GET_CLASS ((object), MIDGARD_TYPE_SITEGROUP, MidgardSitegroupClass))
00050 
00058 typedef struct _MidgardSitegroup MidgardSitegroup;
00059 
00065 typedef struct _MidgardSitegroupClass MidgardSitegroupClass;
00066 
00101 extern MidgardSitegroup *midgard_sitegroup_new(MidgardConnection *mgd);
00102 
00114 extern gboolean midgard_sitegroup_get(MidgardSitegroup *sitegroup, const gchar *guid);
00115 
00129 extern GObjects **midgard_sitegroup_list(MidgardSitegroup *sitegroup);
00130 
00131 /*
00132  * \ingroup sitegroup
00133  *
00134  * Creates new record for the given MidgardSitegroup object.
00135  * This method can be used only by SG0 Midgard Administrator.
00136  *
00137  * \param sitegroup MidgardSitegroup
00138  * \return TRUE when record was successully created , FALSE otherwise.
00139  *
00140  * Before this method is invoked SG0 Midgard Administrator is responsible 
00141  * to set values for these properties:
00142  * 
00143  * - name
00144  * - realm
00145  *  
00146  * Optionally public value property may be set. By default it's set to TRUE. 
00147  *
00148  * ?? Should we create admingroup in the background automagically ?? 
00149  * ?? Any use case to create sitegroup without admingroup ??
00150  */
00151 extern gboolean midgard_sitegroup_create(MidgardSitegroup *sitegroup);
00152 
00153 
00171 extern gboolean midgard_sitegroup_update(MidgardSitegroup *sitegroup);
00172 
00182 extern gboolean midgard_sitegroup_delete(MidgardSitegroup *sitegroup);  
00183 
00184 #endif /* MIDGARD_SITEGROUP_H */

Generated on Thu Feb 22 06:15:14 2007 for midgard-core by  doxygen 1.4.6