Commit 33774882 authored by Iain Holmes's avatar Iain Holmes

Remove all the old files

parent 18e89fe0
EXTRA_DIST = geoclue_web_service.h geoclue_position_error.h
noinst_LIBRARIES = libgeoclue_web_service.a libgeoclue_position_error.a
libgeoclue_web_service_a_SOURCES = geoclue_web_service.c
libgeoclue_web_service_a_CFLAGS = $(DBUS_CFLAGS) $(HTTPXML_CFLAGS) $(GOBJECT_CFLAGS) $(CONIC_CFLAGS) -I$(top_srcdir)
libgeoclue_position_error_a_SOURCES = geoclue_position_error.c
libgeoclue_position_error_a_CFLAGS = $(GLIB_CFLAGS)
#include "geoclue_iposition.h"
static void
geoclue_iposition_base_init (gpointer g_class)
{
static gboolean initialized = FALSE;
if (!initialized) {
/* create interface signals here. */
initialized = TRUE;
}
}
GType
geoclue_iposition_get_type (void)
{
static GType type = 0;
if (type == 0) {
static const GTypeInfo info = {
sizeof (GeoclueIPositionInterface),
geoclue_iposition_base_init, /* base_init */
NULL, /* base_finalize */
NULL, /* class_init */
NULL, /* class_finalize */
NULL, /* class_data */
0,
0, /* n_preallocs */
NULL /* instance_init */
};
type = g_type_register_static (G_TYPE_INTERFACE,
"GeoclueIPosition",
&info, 0);
}
return type;
}
void geoclue_iposition_do_action (GeoclueIPosition *self)
{
GEOCLUE_IPOSITION_GET_INTERFACE (self)->do_action (self);
}
#ifndef GEOCLUE_IPOSITION_H
#define GEOCLUE_IPOSITION_H
#include <glib-object.h>
#define GEOCLUE_TYPE_IPOSITION (geoclue_iposition_get_type ())
#define GEOCLUE_IPOSITION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEOCLUE_TYPE_IPOSITION, GeoclueIPosition))
#define GEOCLUE_IS_IPOSITION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEOCLUE_TYPE_IPOSITION))
#define GEOCLUE_IPOSITION_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GEOCLUE_TYPE_IPOSITION, GeoclueIPositionInterface))
typedef struct _GeoclueIPosition GeoclueIPosition; /* dummy object */
typedef struct _GeoclueIPositionInterface GeoclueIPositionInterface;
struct _GeoclueIPositionInterface {
GTypeInterface parent;
void (*do_action) (GeoclueIPosition *self);
};
GType geoclue_iposition_get_type (void);
/* Actual interface */
void geoclue_iposition_do_action (GeoclueIPosition *self);
#endif /*GEOCLUE_IPOSITION_H*/
#include <glib.h>
#include "geoclue_position_error.h"
/* Error domain for position backend errors */
GQuark geoclue_position_error_quark () {
static GQuark q = 0;
if (q == 0)
q = g_quark_from_static_string ("geoclue-position-error-quark");
return q;
}
#ifndef __GEOCLUE_POSITION_ERROR_H__
#define __GEOCLUE_POSITION_ERROR_H__
#define GEOCLUE_POSITION_ERROR geoclue_position_error_quark ()
GQuark geoclue_position_error_quark (void);
/* Error codes for position backends */
typedef enum
{
GEOCLUE_POSITION_ERROR_NOSERVICE, /* Backend cannot connect to needed service */
GEOCLUE_POSITION_ERROR_MALFORMEDDATA, /* Received data, but it is unreadable */
GEOCLUE_POSITION_ERROR_NODATA, /* Used service cannot provide position data at this time*/
GEOCLUE_POSITION_ERROR_NOTSUPPORTED, /* Backend does not implement this method */
GEOCLUE_POSITION_ERROR_FAILED /* generic fatal error */
} GeocluePositionError;
typedef enum position_status
{
GEOCLUE_POSITION_NO_SERVICE_AVAILABLE = 0,
GEOCLUE_POSITION_ACQUIRING_ALTITUDE = 1,
GEOCLUE_POSITION_ACQUIRING_LONGITUDE = 2,
GEOCLUE_POSITION_ACQUIRING_LATITUDE = 4,
GEOCLUE_POSITION_ALTITUDE_AVAILABLE = 8,
GEOCLUE_POSITION_LONGITUDE_AVAILABLE = 16,
GEOCLUE_POSITION_LATITUDE_AVAILABLE = 32
} position_status;
#endif /* __GEOCLUE_POSITION_ERROR_H__ */
This diff is collapsed.
/* Geoclue - A DBus api and wrapper for geography information
* Copyright (C) 2007 Jussi Kukkonen
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, see
* <http://www.gnu.org/licenses/>.
*/
/* GeoclueWebService is meant to be used in webservice-based geoclue
* provider implementations. It has two tasks:
* a) simplify interaction with webservices
* a) notify about connectivity changes
* The only thing these two have in common is that they're usually
* needed in the same place.
*
*** CONSTRUCTION
*
* GeoclueWebservice takes the webservice base url as a construction
* parameter (you can also set it using normal gobject property set).
* Example:
* obj = g_object_new (GEOCLUE_TYPE_WEB_SERVICE,
* "base_url", "http://plazes.com/suggestions.xml",
* NULL);
*
*** CONNECTION EVENT
*
* There's a "connection-event" signal for getting notified about
* connection events:
* g_signal_connect (GEOCLUE_WEB_SERVICE (obj),
* "connection-event",
* (GCallback)callback_func,
* NULL);
* This only works if the platform supports this: use
* "using-connection-events" property to check. Currently only Maemo
* (libconic) support is included, but Gnome (NetworkManager) support
* should be doable.
*
*** QUERYING DATA
*
* A typical web service query is done like this:
* if (geoclue_web_service_query (GEOCLUE_WEB_SERVICE (obj),
* "mac_address", "00:11:95:20:df:11",
* NULL)) {
* if (geoclue_web_service_get_string (GEOCLUE_WEB_SERVICE (obj),
* &addr, "//plaze/address")) {
* g_debug ("address: %s", addr);
* }
* if (geoclue_web_service_get_double (GEOCLUE_WEB_SERVICE (obj),
* &lat, "//plaze/latitude")) {
* g_debug ("latitude: %f", lat);
* }
* }
*
* So, geoclue_web_service_query takes a NULL-terminated list of
* key-value pairs that will be used as GET params. The value part
* of the pair will be escaped. The example case query url will be:
* "http://plazes.com/suggestions.xml?mac_address=00%3A11%3A95%3A20%3Adf%3A11"
*
* The actual response data is available (see "response"-property),
* but if the data is xml it's a lot easier to use
* "geoclue_web_service_get_*" -methods to get specific elements using
* simple xpath expressions, as in the example above.
*
* If the xml data uses namespaces, they should be added with
* geoclue_web_service_add_namespace after object construction but
* before calling "geoclue_web_service_get_*" -functions.
*/
#ifndef GEOCLUE_WEB_SERVICE_H
#define GEOCLUE_WEB_SERVICE_H
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <glib-object.h>
#include <libxml/xpath.h>
#ifdef HAVE_LIBCONIC
#define DBUS_API_SUBJECT_TO_CHANGE 1
#include <dbus/dbus.h>
#include <conicconnection.h>
#include <conicconnectionevent.h>
#endif
G_BEGIN_DECLS
typedef struct _XmlNamespace XmlNamespace;
struct _XmlNamespace {
gchar *name;
gchar *uri;
};
#define GEOCLUE_TYPE_WEB_SERVICE (geoclue_web_service_get_type ())
#define GEOCLUE_WEB_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEOCLUE_TYPE_WEB_SERVICE, GeoclueWebService))
#define GEOCLUE_WEB_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GEOCLUE_TYPE_WEB_SERVICE, GeoclueWebServiceClass))
#define GEOCLUE_IS_WEB_SERVICE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEOCLUE_TYPE_WEB_SERVICE))
#define GEOCLUE_IS_WEB_SERVICE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GEOCLUE_TYPE_WEB_SERVICE))
#define GEOCLUE_WEB_SERVICE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GEOCLUE_TYPE_WEB_SERVICE, GeoclueWebServiceClass))
typedef struct _GeoclueWebService GeoclueWebService;
typedef struct _GeoclueWebServiceClass GeoclueWebServiceClass;
struct _GeoclueWebService {
GObject parent;
/* private */
gchar* base_url;
guchar *response;
gint response_length;
GList *namespaces;
gboolean using_connection_events;
xmlXPathContext *xpath_ctx;
#ifdef HAVE_LIBCONIC
ConIcConnection* net_connection;
DBusConnection* system_bus;
#endif
};
struct _GeoclueWebServiceClass {
GObjectClass parent;
guint connection_event_signal_id;
/* default handler for connection event */
void (*connection_event) (GeoclueWebService *self,
gboolean connected);
};
GType geoclue_web_service_get_type (void);
/* Public methods */
gboolean geoclue_web_service_query (GeoclueWebService *self, ...);
gboolean geoclue_web_service_add_namespace (GeoclueWebService *self, gchar *namespace, gchar *uri);
gboolean geoclue_web_service_get_string (GeoclueWebService *self, gchar **OUT_value, gchar *xpath);
gboolean geoclue_web_service_get_double (GeoclueWebService *self, gdouble *OUT_value, gchar *xpath);
G_END_DECLS
#endif /* GEOCLUE_WEB_SERVICE_H */
bin_PROGRAMS = geoclue-master
geoclue_master_SOURCES = geoclue_master.c \
geoclue_map_master.c \
geoclue_position_master.c \
geoclue_map_signal_marshal.c \
geoclue_position_signal_marshal.c
AM_CPPFLAGS = $(DEPS_CFLAGS) -I$(top_srcdir)
AM_LDFLAGS = $(DEPS_LIBS)
BUILT_SOURCES = \
geoclue_map_signal_marshal.c \
geoclue_map_signal_marshal.h \
geoclue_map_server_glue.h \
geoclue_position_signal_marshal.c \
geoclue_position_signal_marshal.h \
geoclue_position_server_glue.h
CLEANFILES = \
geoclue_map_signal_marshal.c \
geoclue_map_signal_marshal.h \
geoclue_map_server_glue.h \
geoclue_position_signal_marshal.c \
geoclue_position_signal_marshal.h \
geoclue_position_server_glue.h
geoclue_map_server_glue.h:../../geoclue/map_glue.xml
$(DBUS_BINDING_TOOL) --prefix=geoclue_map --mode=glib-server $< | sed 's;\data = user_data;\data = (DBusGAsyncData\*)user_data;g' > $@
geoclue_map_signal_marshal.h:../../geoclue/map_signal_marshal.list
glib-genmarshal --prefix _geoclue_map --header $< > $@
geoclue_map_signal_marshal.c:../../geoclue/map_signal_marshal.list
glib-genmarshal --prefix _geoclue_map --body $< > $@
geoclue_position_server_glue.h:../../geoclue/position_glue.xml
$(DBUS_BINDING_TOOL) --prefix=geoclue_position --mode=glib-server $< | sed 's;\data = user_data;\data = (DBusGAsyncData\*)user_data;g' > $@
geoclue_position_signal_marshal.h:../../geoclue/position_signal_marshal.list
glib-genmarshal --prefix _geoclue_position --header $< > $@
geoclue_position_signal_marshal.c:../../geoclue/position_signal_marshal.list
glib-genmarshal --prefix _geoclue_position --body $< > $@
/* Geomap - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006-2007 by Garmin Ltd. or its subsidiaries
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <geoclue_map_master.h>
#include <geoclue_map_server_glue.h>
#include <geoclue_map_signal_marshal.h>
#include <dbus/dbus-glib-bindings.h>
G_DEFINE_TYPE(GeoclueMap, geoclue_map, G_TYPE_OBJECT)
/* Filter signals and args */
enum {
/* FILL ME */
GET_MAP_FINISHED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL];
//Default handler
void geoclue_map_get_map_finished(GeoclueMap* obj, gint returncode, GArray* map_buffer, gchar* buffer_mime_type)
{
printf("finished sending map\n");
}
static void
geoclue_map_init (GeoclueMap *obj)
{
GError *error = NULL;
DBusGProxy *driver_proxy;
GeoclueMapClass *klass = GEOCLUE_MAP_GET_CLASS(obj);
guint request_ret;
/* Register DBUS path */
dbus_g_connection_register_g_object (klass->connection,
GEOCLUE_MAP_DBUS_PATH ,
G_OBJECT (obj));
/* Register the service name, the constant here are defined in dbus-glib-bindings.h */
driver_proxy = dbus_g_proxy_new_for_name (klass->connection,
DBUS_SERVICE_DBUS,
DBUS_PATH_DBUS,
DBUS_INTERFACE_DBUS);
if(!org_freedesktop_DBus_request_name (driver_proxy,
GEOCLUE_MAP_DBUS_SERVICE,
0, &request_ret, /* See tutorial for more infos about these */
&error))
{
g_printerr("Unable to register geomap service: %s", error->message);
g_error_free (error);
}
}
static void
geoclue_map_class_init (GeoclueMapClass *klass)
{
GError *error = NULL;
klass->connection = dbus_g_bus_get (GEOCLUE_DBUS_BUS, &error);
signals[GET_MAP_FINISHED] =
g_signal_new ("get_map_finished",
TYPE_GEOCLUE_MAP,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (GeoclueMapClass, get_map_finished),
NULL, // accumulator
NULL, // accumulator data
_geoclue_map_VOID__INT_BOXED_STRING,
G_TYPE_NONE, 3 ,G_TYPE_INT, DBUS_TYPE_G_UCHAR_ARRAY , G_TYPE_STRING);
klass->get_map_finished = geoclue_map_get_map_finished;
if (klass->connection == NULL)
{
g_printerr("Unable to connect to dbus: %s", error->message);
g_error_free (error);
return;
}
/* &dbus_glib__object_info is provided in the server-bindings.h file */
/* OBJECT_TYPE_SERVER is the GType of your server object */
dbus_g_object_type_install_info (TYPE_GEOCLUE_MAP, &dbus_glib_geoclue_map_object_info);
}
gboolean geoclue_map_version (GeoclueMap *obj, gint* OUT_major, gint* OUT_minor, gint* OUT_micro, GError **error)
{
return TRUE;
}
gboolean geoclue_map_service_provider(GeoclueMap *obj, char** name, GError **error)
{
return TRUE;
}
gboolean geoclue_map_max_zoom(GeoclueMap *obj, int* max_zoom, GError **error)
{
return TRUE;
}
gboolean geoclue_map_min_zoom(GeoclueMap *obj, int* min_zoom, GError **error)
{
return TRUE;
}
gboolean geoclue_map_max_height(GeoclueMap *obj, int* max_height, GError **error)
{
return TRUE;
}
gboolean geoclue_map_min_height(GeoclueMap *obj, int* min_height, GError **error)
{
return TRUE;
}
gboolean geoclue_map_max_width(GeoclueMap *obj, int* max_width, GError **error)
{
return TRUE;
}
gboolean geoclue_map_min_width(GeoclueMap *obj, int* min_width, GError **error)
{
return TRUE;
}
gboolean geoclue_map_get_map (GeoclueMap *obj, const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_width, const gint IN_height, const gint IN_zoom, int* return_code, GError **error)
{
return TRUE;
}
gboolean geoclue_map_latlong_to_offset(GeoclueMap *obj, const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_zoom, const gdouble IN_center_latitude, const gdouble IN_center_longitude, int* OUT_x_offset, int* OUT_y_offset, GError **error)
{
return TRUE;
}
gboolean geoclue_map_offset_to_latlong(GeoclueMap *obj, const int IN_x_offset,const int IN_y_offset, const gint IN_zoom, const gdouble IN_center_latitude, const gdouble IN_center_longitude, gdouble* OUT_latitude, gdouble* OUT_longitude, GError **error )
{
return TRUE;
}
gboolean geoclue_map_find_zoom_level (GeoclueMap *obj, const gdouble IN_latitude_top_left, const gdouble IN_longitude_top_left, const gdouble IN_latitude_bottom_right, const gdouble IN_longitude_bottom_right, const gint IN_width, const gint IN_height, gint* OUT_zoom, GError** error)
{
return TRUE;
}
/* Geomap - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006-2007 by Garmin Ltd. or its subsidiaries
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#ifndef __GEOCLUE_MAP_SERVER_H__
#define __GEOCLUE_MAP_SERVER_H__
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib.h>
#include <glib.h>
#include <stdio.h>
#include <string.h>
#define GEOCLUE_MAP_DBUS_SERVICE "org.freedesktop.geoclue.map"
#define GEOCLUE_MAP_DBUS_PATH "/org/freedesktop/geoclue/map"
#define GEOCLUE_MAP_DBUS_INTERFACE "org.freedesktop.geoclue.map"
G_BEGIN_DECLS
typedef struct GeoclueMap GeoclueMap;
typedef struct GeoclueMapClass GeoclueMapClass;
GType geoclue_map_get_type (void);
struct GeoclueMap
{
GObject parent;
};
struct GeoclueMapClass
{
GObjectClass parent;
DBusGConnection *connection;
/* Signals Map*/
void (*get_map_finished) (GeoclueMap*, gint, GArray* , gchar* );
};
#define TYPE_GEOCLUE_MAP (geoclue_map_get_type ())
#define GEOCLUE_MAP(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), TYPE_GEOCLUE_MAP, GeoclueMap))
#define GEOCLUE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), TYPE_GEOCLUE_MAP, GeoclueMapClass))
#define IS_GEOCLUE_MAP(object) (G_TYPE_CHECK_INSTANCE_TYPE ((object), TYPE_GEOCLUE_MAP))
#define IS_GEOCLUE_MAP_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), TYPE_GEOCLUE_MAP))
#define GEOCLUE_MAP_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), TYPE_GEOCLUE_MAP, GeoclueMapClass))
gboolean geoclue_map_version (GeoclueMap *obj, gint* OUT_major, gint* OUT_minor, gint* OUT_micro, GError **error);
gboolean geoclue_map_service_provider(GeoclueMap *obj, char** name, GError **error);
gboolean geoclue_map_max_zoom(GeoclueMap *obj, int* max_zoom, GError **error);
gboolean geoclue_map_min_zoom(GeoclueMap *obj, int* min_zoom, GError **error);
gboolean geoclue_map_max_height(GeoclueMap *obj, int* max_height, GError **error);
gboolean geoclue_map_min_height(GeoclueMap *obj, int* min_height, GError **error);
gboolean geoclue_map_max_width(GeoclueMap *obj, int* max_width, GError **error);
gboolean geoclue_map_min_width(GeoclueMap *obj, int* min_width, GError **error);
gboolean geoclue_map_get_map (GeoclueMap *obj, const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_width, const gint IN_height, const gint IN_zoom, int* return_code, GError **error);
gboolean geoclue_map_latlong_to_offset(GeoclueMap *obj, const gdouble IN_latitude, const gdouble IN_longitude, const gint IN_zoom, const gdouble IN_center_latitude, const gdouble IN_center_longitude, int* OUT_x_offset, int* OUT_y_offset, GError **error);
gboolean geoclue_map_offset_to_latlong(GeoclueMap *obj, const int IN_x_offset,const int IN_y_offset, const gint IN_zoom, const gdouble IN_center_latitude, const gdouble IN_center_longitude, gdouble* OUT_latitude, gdouble* OUT_longitude, GError **error );
gboolean geoclue_map_find_zoom_level (GeoclueMap *obj, const gdouble IN_latitude_top_left, const gdouble IN_longitude_top_left, const gdouble IN_latitude_bottom_right, const gdouble IN_longitude_bottom_right, const gint IN_width, const gint IN_height, gint* OUT_zoom, GError** error);
G_END_DECLS
#endif
/* Geomap - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006-2007 by Garmin Ltd. or its subsidiaries
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the
* Free Software Foundation, Inc., 59 Temple Place - Suite 330,
* Boston, MA 02111-1307, USA.
*/
#include <geoclue_map_master.h>
#include <geoclue_position_master.h>
int main( int argc,
char *argv[] )
{
g_type_init ();
GMainLoop* loop = g_main_loop_new(NULL,TRUE);
GeoclueMap* map_obj = NULL;
map_obj = GEOCLUE_MAP(g_type_create_instance (geoclue_map_get_type()));
GeocluePosition* position_obj = NULL;
position_obj = GEOCLUE_POSITION(g_type_create_instance (geoclue_position_get_type()));
g_main_loop_run(loop);
g_object_unref(map_obj);
g_object_unref(position_obj);
g_main_loop_unref(loop);
return 0;
}
/* Geomap - A DBus api and wrapper for getting geography pictures
* Copyright (C) 2006-2007 by Garmin Ltd. or its subsidiaries
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License version 2 as published by the Free Software Foundation;
*
* This library 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
* Lesser General Public License for more details.