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

xmlobjectfactory.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 _XMLOBJECTFACTORY_H_
00023 #define _XMLOBJECTFACTORY_H_
00024 
00025 #include <libxml/tree.h>
00026 #include "object.h"
00027 
00028 /**
00029  * SECTION:xmlobjectfactory
00030  * @short_description: Utilities for creating objects out of xml tree.
00031  *
00032  * Contains functions that are needed to get an object from a xml tree.
00033  **/
00034 
00035 /**
00036  * object_factory:
00037  * @object_node: The node in the tree, which describes the object to be.
00038  *
00039  * Creates a new object from the xnk tree. May recursively call self to create
00040  * sub-objects.
00041  * Returns: Newly created object.
00042  **/
00043 AlarmdObject *object_factory(xmlNode *object_node);
00044 
00045 /**
00046  * elements_to_parameters:
00047  * @object_node: Node whose children should be handled.
00048  * @n_params: Pointer to guint that should hold the size of returned array.
00049  *
00050  * Scans the children of #object_node for occurrencies of parameter nodes.
00051  * A GParameter array is build of these.
00052  * Returns: Newly allocated GParameter array, use alarmd_gparameterv_free to
00053  * free.
00054  **/
00055 GParameter *elements_to_parameters(xmlNode *object_node, guint *n_params);
00056 
00057 #endif /* _XMLOBJECTFACTORY_H_ */

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