midgard/midgard_quota.h

00001 /* 
00002  * Copyright (C) 2005 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_QUOTA_H
00020 #define MIDGARD_QUOTA_H
00021 
00022 #include "midgard/types.h"
00023 #include "midgard/midgard_object.h"
00024 
00038 guint midgard_quota_get_object_size(MgdObject *object);
00039 
00040 
00054 guint midgard_object_get_size(MgdObject *object);
00055 
00068 gboolean midgard_quota_create(MgdObject *object);
00069 
00081 gboolean midgard_quota_update(MgdObject *object);
00082 
00093 void midgard_quota_remove(MgdObject *object, guint size);
00094 
00108 void midgard_quota_set_type_size(midgard *mgd, guint sitegroup, const gchar *typename,
00109                 guint size, guint records);
00110 
00122 guint midgard_quota_get_type_size(midgard *mgd, const gchar *typename);
00123 
00124 
00139 void midgard_quota_set_sitegroup_size(midgard *mgd, guint sitegroup,
00140                 guint size, guint records);
00141 
00153 guint midgard_quota_get_sitegroup_size(midgard *mgd, guint sitegroup);
00154 
00166 gboolean midgard_quota_size_is_reached(MgdObject *object, gint size);
00167 
00180 guint32 midgard_quota_get_sitegroup_size(midgard *mgd, guint sg);
00181 
00182 #endif /* MIDGARD_QUOTA_H */

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