midgard/midgard_blob.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_BLOB_H
00020 #define _MIDGARD_BLOB_H
00021 
00032 #include "midgard/midgard_connection.h"
00033 
00034 G_BEGIN_DECLS
00035 
00036 /* convention macros */
00037 #define MIDGARD_TYPE_BLOB (midgard_blob_get_type())
00038 #define MIDGARD_BLOB(object)  \
00039         (G_TYPE_CHECK_INSTANCE_CAST ((object),MIDGARD_TYPE_BLOB, MidgardBlob))
00040 #define MIDGARD_BLOB_CLASS(klass)  \
00041         (G_TYPE_CHECK_CLASS_CAST ((klass), MIDGARD_TYPE_BLOB, MidgardBlobClass))
00042 #define MIDGARD_IS_BLOB(object)   \
00043         (G_TYPE_CHECK_INSTANCE_TYPE ((object), MIDGARD_TYPE_BLOB))
00044 #define MIDGARD_IS_BLOB_CLASS(klass) \
00045         (G_TYPE_CHECK_CLASS_TYPE ((klass), MIDGARD_TYPE_BLOB))
00046 #define MIDGARD_BLOB_GET_CLASS(obj) \
00047         (G_TYPE_INSTANCE_GET_CLASS ((obj), MIDGARD_TYPE_BLOB, MidgardBlobClass))
00048 
00049 typedef struct MidgardBlob MidgardBlob;
00050 typedef struct MidgardBlobClass MidgardBlobClass;
00051 typedef struct _MidgardBlobPrivate MidgardBlobPrivate;
00052 
00058 struct MidgardBlobClass {
00059         GObjectClass parent;
00060 }
00061 
00067 struct MidgardBlob {
00068         GObject parent;
00069 
00070         MidgardBlobPrivate *private;
00071 }
00072 
00079 extern GType 
00080 midgard_blob_get_type(void);
00081 
00098 extern MidgardBlob 
00099 midgard_blob_new(MidgardConection *mgd, MidgardObject *attachment);
00100 
00114 extern GIOChannel 
00115 midgard_blob_read(MidgardBlob *self);
00116 
00128 extern GIOChannel 
00129 midgard_blob_write(MidgardBlob *self,
00130                                 const gchar *content);
00131 
00144 extern void 
00145 midgard_blob_destroy(MidgardBlob *self);
00146 
00147 G_END_DECLS
00148 
00149 #endif /* _MIDGARD_BLOB_H */

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