13360N/A<!
DOCTYPE REFENTRY PUBLIC "-//Sun Microsystems//DTD DocBook V3.0-Based SolBook Subset V2.0//EN" [
13360N/A<!--ArborText, Inc., 1988-1999, v.4002-->
13360N/A<!
ENTITY suncopy "Copyright (c) 2008, Sun Microsystems, Inc. All Rights Reserved.">
13360N/A <
refentrytitle>libggz</
refentrytitle><
manvolnum>3</
manvolnum>
13360N/A <
refmiscinfo class="date">29 May 2008</
refmiscinfo>
13360N/A <
refmiscinfo class="sectdesc">&man3;</
refmiscinfo>
13360N/A <
refmiscinfo class="software">&release;</
refmiscinfo>
13360N/A <
refmiscinfo class="arch">generic</
refmiscinfo>
13360N/A <
refmiscinfo class="copyright">&suncopy;</
refmiscinfo>
13360N/A<
indexterm><
primary>libggz</
primary></
indexterm>
13360N/A<
indexterm><
primary>The GGZ Gaming Zone base library</
primary></
indexterm>
13360N/AThe GGZ Gaming Zone base library
13360N/A&cmd; is used by GGZ Gaming Zone server, the ggzcore library and other
13360N/Acomponents. This library handles networking, configuration files, structure
13360N/Amanagement functions and wrappers around glibc functions.
13360N/AThe <
filename>libggz</
filename> library contains different groups of functions:
13360N/A<
refsect2 id="libggz-3-exde-optb-func">
13360N/A<
variablelist termlength="long">
13360N/A<
varlistentry><
term><
literal>Memory handling</
literal></
term><
listitem>
13360N/AThese functions provide an alternative to the normal C library functions for
13360N/Adynamically allocating memory. They keep track of memory allocated by storing
13360N/Athe name of the function and file in which they were called similar to glibc but
13360N/Aare more convenient to use. For instance, ggz_strdup(NULL) returns NULL instead
13360N/Aof crashing, and ggz_malloc() includes a reference counter to be used for
13360N/Adebugging in combination with ggz_free(). With enabled MEMORY debugging the
13360N/Afunction ggz_memory_check() may be called to make sure all allocated memory has
13360N/A<
varlistentry><
term><
literal>Configuration file management</
literal></
term><
listitem>
13360N/AThis group of functions is used for XML configuration file routines to store
13360N/Aand retrieve values. For example, the ggz_conf_parse() function can be used to
13360N/Aopen a config file. To create such file automatically the GGZ_CONF_CREATE must
13360N/Abe specified. If exactly the same configuration pathname is being opened more
13360N/Athan one time, the original handle is being returned and only one copy is
13360N/AConfiguration values are stored using a system of sections and keys. A key must
13360N/Abe unique within a section and cannot be both an integer and a string within the
13360N/Asame key. Section and key names may contain any characters except an equal sign.
13360N/AAlthough keys may not have leading or trailing whitespace, section names may
13360N/Ahave them. It is suggested that any whitespace (other than possibly internal
13360N/Aspaces) be avoided when specifying section and key names.
13360N/AFor writing the values to the physical file, the ggz_conf_commit() function must
13360N/Abe called, otherwise all values are in the memory only, which makes writing
13360N/Amultiple values in rapid succession more efficient, as the entire file must be
13360N/Aregenerated in order to be written to the flat-file format of the configuration
13360N/AThe string and list reading functions return dynamically allocated memory to
13360N/Athe caller. The user is responsible for calling ggz_free() on this memory when
13360N/Athey no longer need the returned values.
13360N/AAll memory used internally by the configuration functions will be released when
13360N/Aggz_conf_cleanup() is called. Note that this does not commit any changes made
13360N/Ato the configuration files, so the ggz_conf_commit() have to be called to do
13360N/Asuch commit. The ggz_conf_cleanup() is expected to call this at program
13360N/Atermination, but it may be called at any time earlier than termination and new
13360N/Afiles may be subsequently opened.
13360N/A<
varlistentry><
term><
literal>Debug functions</
literal></
term><
listitem>
13360N/AThe functions allow switching on and off debug messages for a certain tag.
13360N/A<
varlistentry><
term><
literal>Network functions</
literal></
term><
listitem>
13360N/AThose functions, historically known as the easysock library, permits the
13360N/Acreation of server or client sockets, compatible with IPv6, as well as reading
13360N/Aand writing basic datatypes such as integers or strings.
13360N/A<
varlistentry><
term><
literal>Security functions</
literal></
term><
listitem>
13360N/AThis group of functions are for both cryptographic hash creation and comparison
13360N/Ausing the gcrypt library, and for TLS encryption for network channels using
13360N/A <
para>The following files are used by this library:</
para>
13360N/A <
variablelist termlength="wide">
13360N/A <
para>The base GGZ Gaming Zone shared library</
para>
13360N/A <
para>See <
olink targetdocent="REFMAN5" localinfo="attributes-5"><
citerefentry>
13360N/A<
refentrytitle>attributes</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>
13360N/A</
olink> for descriptions of the following attributes:
13360N/A <
tgroup cols="2" colsep="1" rowsep="1">
13360N/A <
colspec colname="COLSPEC0" colwidth="1*">
13360N/A <
colspec colname="COLSPEC1" colwidth="1*">
13360N/A <
entry align="center" valign="middle">ATTRIBUTE TYPE</
entry>
13360N/A <
entry align="center" valign="middle">ATTRIBUTE VALUE</
entry>
13360N/A <
entry><
para>Availability</
para></
entry>
13360N/A <
entry colname="COLSPEC0"><
para>Interface stability</
para></
entry>
13360N/A <
entry colname="COLSPEC1"><
para>Volatile</
para></
entry>
13360N/A<
refsect1 id="libggz-3-also"><
title>&also-tt;</
title>
13360N/A <!--Reference to another man page--> 13360N/A <!--Reference to a Help manual--> 13360N/A<
citerefentry><
refentrytitle>ggz_h</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>ggzcore_h</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>ggzmod_h</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>libggzcore</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>libggzmod</
refentrytitle><
manvolnum>3</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>attributes</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>
ggz.modules</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>gnome-interfaces</
refentrytitle><
manvolnum>5</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>ggz</
refentrytitle><
manvolnum>6</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>ggz-config</
refentrytitle><
manvolnum>6</
manvolnum></
citerefentry>,
13360N/A<
citerefentry><
refentrytitle>ggz</
refentrytitle><
manvolnum>7</
manvolnum></
citerefentry>
13360N/A<
variablelist termlength="wholeline">
13360N/A<
term><
filename>GGZ Gaming Zone:</
filename></
term>
13360N/A<
refsect1 id="libggz-3-note"><
title>¬e-tt;</
title>
13360N/A <
para>Written by Michal Pryc, Sun Microsystems Inc., 2008.</
para>