Main Page | Data Structures | File List | Data Fields | Globals

xml-common.h

Go to the documentation of this file.
00001 /**
00002  * This file is part of alarmd
00003  *
00004  * Contact Person: David Weinehall <david.weinehall@nokia.com>
00005  *
00006  * Copyright (C) 2006 Nokia Corporation
00007  * alarmd and libalarm are free software; you can redistribute them
00008  * and/or modify them under the terms of the GNU Lesser General Public
00009  * License version 2.1 as published by the Free Software Foundation.
00010  *
00011  * alarmd and libalarm are distributed in the hope that they will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Lesser General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Lesser General Public
00017  * License along with this software; if not, write to the Free
00018  * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
00019  * 02110-1301 USA
00020  */
00021 
00022 #ifndef _XML_COMMON_H_
00023 #define _XML_COMMON_H_
00024 
00025 /**
00026  * SECTION:xml-common
00027  * @short_description: Definitions for xml<->glib typing.
00028  *
00029  * These arrays help to get a GType for a type string from xml file and vice
00030  * versa.
00031  **/
00032 
00033 enum Types {
00034         Y_BOOLEAN,
00035         Y_CHAR,
00036         Y_DOUBLE,
00037         Y_FLOAT,
00038         Y_INT,
00039         Y_INT64,
00040         Y_LONG,
00041         Y_OBJECT,
00042         Y_STRING,
00043         Y_UCHAR,
00044         Y_UINT,
00045         Y_UINT64,
00046         Y_ULONG,
00047         Y_COUNT
00048 };
00049 
00050 static const char * const type_names[Y_COUNT] = {
00051         "boolean",
00052         "char",
00053         "double",
00054         "float",
00055         "int",
00056         "int64",
00057         "long",
00058         "object",
00059         "string",
00060         "uchar",
00061         "uint",
00062         "uint64",
00063         "ulong",
00064 };
00065 
00066 static const GType type_gtypes[Y_COUNT] = {
00067         G_TYPE_BOOLEAN,       
00068         G_TYPE_CHAR,
00069         G_TYPE_DOUBLE,
00070         G_TYPE_FLOAT,
00071         G_TYPE_INT,
00072         G_TYPE_INT64,
00073         G_TYPE_LONG,
00074         G_TYPE_OBJECT,
00075         G_TYPE_STRING,
00076         G_TYPE_UCHAR,
00077         G_TYPE_UINT,
00078         G_TYPE_UINT64,
00079         G_TYPE_ULONG
00080 };
00081 
00082 #endif /* _XML_COMMON_H_ */

Generated on Thu Dec 21 18:23:30 2006 for Alarmd by  doxygen 1.4.2