libpurple/protocols/gg/xml.h

Tue, 10 Sep 2019 00:06:36 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Tue, 10 Sep 2019 00:06:36 -0400
changeset 39819
3554dac2991b
parent 34935
686fa55b0deb
child 40358
e6fe6fc1f516
permissions
-rw-r--r--

Standardize all protocol header guard macros.

These are all basically standardized replacements on the file path,
removing 'lib' and '/protocols/', replacing invalid characters by
underscore, and then converting to upper case.

This avoids a lot of reserved identifier usage.

/* purple
 *
 * Purple is the legal property of its developers, whose names are too numerous
 * to list here.  Please refer to the COPYRIGHT file distributed with this
 * source distribution.
 *
 * Rewritten from scratch during Google Summer of Code 2012
 * by Tomek Wasilczyk (http://www.wasilczyk.pl).
 *
 * Previously implemented by:
 *  - Arkadiusz Miskiewicz <misiek@pld.org.pl> - first implementation (2001);
 *  - Bartosz Oler <bartosz@bzimage.us> - reimplemented during GSoC 2005;
 *  - Krzysztof Klinikowski <grommasher@gmail.com> - some parts (2009-2011).
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02111-1301  USA
 */

#ifndef PURPLE_GG_XML_H
#define PURPLE_GG_XML_H

#include <internal.h>
#include <xmlnode.h>

gboolean ggp_xml_get_string(const PurpleXmlNode *xml, gchar *childName, gchar **var);
gboolean ggp_xml_get_bool(const PurpleXmlNode *xml, gchar *childName, gboolean *var);
gboolean ggp_xml_get_uint(const PurpleXmlNode *xml, gchar *childName, unsigned int *var);

gboolean ggp_xml_set_string(PurpleXmlNode *xml, gchar *childName, const gchar *val);
gboolean ggp_xml_set_bool(PurpleXmlNode *xml, gchar *childName, gboolean val);
gboolean ggp_xml_set_uint(PurpleXmlNode *xml, gchar *childName, unsigned int val);

void ggp_xmlnode_remove_children(PurpleXmlNode *xml);

unsigned int ggp_xml_child_count(PurpleXmlNode *xml, const gchar *childName);

#endif /* PURPLE_GG_XML_H */

mercurial