Commit 18e89fe0 authored by Iain Holmes's avatar Iain Holmes

Implement the new interfaces

parent cd12f506
...@@ -23,6 +23,7 @@ AC_SUBST(GEOCLUE_LIBS) ...@@ -23,6 +23,7 @@ AC_SUBST(GEOCLUE_LIBS)
AC_SUBST(GEOCLUE_CFLAGS) AC_SUBST(GEOCLUE_CFLAGS)
AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool) AC_PATH_PROG(DBUS_BINDING_TOOL, dbus-binding-tool)
AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal)
CFLAGS="$CFLAGS -g -Wall -Werror -Wno-format" CFLAGS="$CFLAGS -g -Wall -Werror -Wno-format"
......
lib_LTLIBRARIES = libgeoclue-backend.la lib_LTLIBRARIES = libgeoclue-backend.la
BUILT_SOURCES = \ BUILT_SOURCES = \
gc-iface-geoclue-glue.h geoclue-marshal.c \
geoclue-marshal.h \
gc-iface-address-glue.h \
gc-iface-geoclue-glue.h \
gc-iface-geocode-glue.h \
gc-iface-position-glue.h \
gc-iface-reverse-geocode-glue.h \
gc-iface-velocity-glue.h
libgeoclue_backend_la_SOURCES = \ libgeoclue_backend_la_SOURCES = \
$(BUILT_SOURCES) \ $(BUILT_SOURCES) \
gc-iface-geoclue.c gc-iface-address.c \
gc-iface-geoclue.c \
gc-iface-position.c \
gc-iface-velocity.c
libgeoclue_backend_la_CFLAGS = \ libgeoclue_backend_la_CFLAGS = \
-I$(top_srcdir) \ -I$(top_srcdir) \
-I$(top_builddir) \ -I$(top_builddir) \
$(GEOCLUE_CFLAGS) $(GEOCLUE_CFLAGS)
EXTRA_DIST = \ EXTRA_DIST = \
geoclue-marshal.list \
$(BUILT_SOURCES) $(BUILT_SOURCES)
CLEANFILES = $(BUILT_SOURCES) \ CLEANFILES = $(BUILT_SOURCES) \
stamp-gc-iface-geoclue-glue.h stamp-gc-iface-address-glue.h \
stamp-gc-iface-geoclue-glue.h \
stamp-gc-iface-geocode-glue.h \
stamp-gc-iface-position-glue.h \
stamp-gc-iface-reverse-geocode-glue.h \
stamp-gc-iface-velocity-glue.h
geoclue-marshal.h: geoclue-marshal.list $(GLIB_GENMARSHAL)
$(GLIB_GENMARSHAL) $< --header --prefix=geoclue_marshal > $@
geoclue-marshal.c: geoclue-marshal.list geoclue-marshal.h $(GLIB_GENMARSHAL)
echo "#include \"geoclue-marshal.h\"" > $@ \
&& $(GLIB_GENMARSHAL) --prefix=geoclue_marshal $(srcdir)/geoclue-marshal.list --body >> $@
%-glue.h: stamp-%-glue.h %-glue.h: stamp-%-glue.h
@true @true
stamp-gc-iface-address-glue.h: ../interfaces/gc-iface-address.xml
$(DBUS_BINDING_TOOL) --prefix=gc_iface_address --mode=glib-server $< > xgen-$(@F) \
&& (cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%)) \
&& rm -f xgen-$(@F) \
&& echo timestamp > $(@F)
stamp-gc-iface-geoclue-glue.h: ../interfaces/gc-iface-geoclue.xml stamp-gc-iface-geoclue-glue.h: ../interfaces/gc-iface-geoclue.xml
$(DBUS_BINDING_TOOL) --prefix=gc_iface_geoclue --mode=glib-server $< > xgen-$(@F) \ $(DBUS_BINDING_TOOL) --prefix=gc_iface_geoclue --mode=glib-server $< > xgen-$(@F) \
&& (cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%)) \ && (cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%)) \
&& rm -f xgen-$(@F) \ && rm -f xgen-$(@F) \
&& echo timestamp > $(@F) && echo timestamp > $(@F)
stamp-gc-iface-geocode-glue.h: ../interfaces/gc-iface-geocode.xml
$(DBUS_BINDING_TOOL) --prefix=gc_iface_geocode --mode=glib-server $< > xgen-$(@F) \
&& (cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%)) \
&& rm -f xgen-$(@F) \
&& echo timestamp > $(@F)
stamp-gc-iface-position-glue.h: ../interfaces/gc-iface-position.xml
$(DBUS_BINDING_TOOL) --prefix=gc_iface_position --mode=glib-server $< > xgen-$(@F) \
&& (cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%)) \
&& rm -f xgen-$(@F) \
&& echo timestamp > $(@F)
stamp-gc-iface-reverse-geocode-glue.h: ../interfaces/gc-iface-reverse-geocode.xml
$(DBUS_BINDING_TOOL) --prefix=gc_iface_reverse_geocode --mode=glib-server $< > xgen-$(@F) \
&& (cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%)) \
&& rm -f xgen-$(@F) \
&& echo timestamp > $(@F)
stamp-gc-iface-velocity-glue.h: ../interfaces/gc-iface-velocity.xml
$(DBUS_BINDING_TOOL) --prefix=gc_iface_velocity --mode=glib-server $< > xgen-$(@F) \
&& (cmp -s xgen-$(@F) $(@F:stamp-%=%) || cp xgen-$(@F) $(@F:stamp-%=%)) \
&& rm -f xgen-$(@F) \
&& echo timestamp > $(@F)
/*
* Geoclue
* gc-iface-address.c - GInterface for org.freedesktop.Address
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <geoclue/geoclue-marshal.h>
#include <geoclue/gc-iface-address.h>
enum {
ADDRESS_CHANGED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = {0};
static gboolean
gc_iface_address_get_address (GcIfaceAddress *gc,
int *timestamp,
GHashTable **address,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
#include "gc-iface-address-glue.h"
static void
gc_iface_address_base_init (gpointer klass)
{
static gboolean initialized = FALSE;
if (initialized) {
return;
}
initialized = TRUE;
signals[ADDRESS_CHANGED] = g_signal_new ("status-changed",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST, 0,
NULL, NULL,
geoclue_marshal_VOID__INT_POINTER_INT_DOUBLE_DOUBLE,
G_TYPE_NONE, 5,
G_TYPE_INT, G_TYPE_POINTER,
G_TYPE_INT,
G_TYPE_DOUBLE, G_TYPE_DOUBLE);
dbus_g_object_type_install_info (gc_iface_address_get_type (),
&dbus_glib_gc_iface_address_object_info);
}
GType
gc_iface_address_get_type (void)
{
static GType type = 0;
if (!type) {
const GTypeInfo info = {
sizeof (GcIfaceAddressClass),
gc_iface_address_base_init,
NULL,
};
type = g_type_register_static (G_TYPE_INTERFACE,
"GcIfaceAddress", &info, 0);
}
return type;
}
static gboolean
gc_iface_address_get_address (GcIfaceAddress *gc,
int *timestamp,
GHashTable **address,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error)
{
return GC_IFACE_ADDRESS_GET_CLASS (gc)->get_address
(gc, timestamp, address,
(GeoclueAccuracy *) accuracy_level,
horizontal_accuracy, vertical_accuracy, error);
}
/*
* Geoclue
* gc-iface-address.h - GInterface for org.freedesktop.Address
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#ifndef _GC_IFACE_ADDRESS_H
#define _GC_IFACE_ADDRESS_H
#include <geoclue/geoclue-types.h>
G_BEGIN_DECLS
#define GC_TYPE_IFACE_ADDRESS (gc_iface_address_get_type ())
#define GC_IFACE_ADDRESS(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GC_TYPE_IFACE_ADDRESS, GcIfaceAddress))
#define GC_IFACE_ADDRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GC_TYPE_IFACE_ADDRESS, GcIfaceAddressClass))
#define GC_IS_IFACE_ADDRESS(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GC_TYPE_IFACE_ADDRESS))
#define GC_IS_IFACE_ADDRESS_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GC_TYPE_IFACE_ADDRESS))
#define GC_IFACE_ADDRESS_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GC_TYPE_IFACE_ADDRESS, GcIfaceAddressClass))
typedef struct _GcIfaceAddress GcIfaceAddress; /* Dummy typedef */
typedef struct _GcIfaceAddressClass GcIfaceAddressClass;
struct _GcIfaceAddressClass {
GTypeInterface base_iface;
/* signals */
void (* address_changed) (GcIfaceAddress *gc,
int timestamp,
GHashTable *address,
GeoclueAccuracy accuracy_level,
double horizontal_accuracy,
double vertical_accuracy);
/* vtable */
gboolean (*get_address) (GcIfaceAddress *gc,
int *timestamp,
GHashTable **address,
GeoclueAccuracy *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
};
GType gc_iface_address_get_type (void);
G_END_DECLS
#endif
/* /*
* Geoclue * Geoclue
* gc-iface-geoclue.c - GInterface for org.freedesktop.Geoclue * gc-iface-geoclue.h - GInterface for org.freedesktop.Geoclue
* *
* Author: Iain Holmes <iain@openedhand.com> * Author: Iain Holmes <iain@openedhand.com>
*/ */
......
/*
* Geoclue
* gc-iface-geocode.c - GInterface for org.freedesktop.Geocode
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <geoclue/geoclue-marshal.h>
#include <geoclue/gc-iface-geocode.h>
static gboolean
gc_iface_geocode_address_to_position (GcIfaceGeocode *gc,
GHashTable *address,
int *fields,
double *latitude,
double *longitude,
double *altitude,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
#include "gc-iface-geocode-glue.h"
static void
gc_iface_geocode_base_init (gpointer klass)
{
static gboolean initialized = FALSE;
if (initialized) {
return;
}
initialized = TRUE;
dbus_g_object_type_install_info (gc_iface_geocode_get_type (),
&dbus_glib_gc_iface_geocode_object_info);
}
GType
gc_iface_geocode_get_type (void)
{
static GType type = 0;
if (!type) {
const GTypeInfo info = {
sizeof (GcIfaceGeocodeClass),
gc_iface_geocode_base_init,
NULL,
};
type = g_type_register_static (G_TYPE_INTERFACE,
"GcIfaceGeocode", &info, 0);
}
return type;
}
static gboolean
gc_iface_geocode_address_to_position (GcIfaceGeocode *gc,
GHashTable *address,
int *fields,
double *latitude,
double *longitude,
double *altitude,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error)
{
return GC_IFACE_ADDRESS_GET_CLASS (gc)->position_to_address
(gc, address, (GeocluePositionFields *) fields,
latitude, longitude, altitude,
(GeoclueAccuracy *) accuracy_level,
horizontal_accuracy, vertical_accuracy, error);
}
/*
* Geoclue
* gc-iface-geocode.h - GInterface for org.freedesktop.Geocode
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#ifndef _GC_IFACE_GEOCODE_H
#define _GC_IFACE_GEOCODE_H
#include <geoclue/geoclue-types.h>
G_BEGIN_DECLS
#define GC_TYPE_IFACE_GEOCODE (gc_iface_geocode_get_type ())
#define GC_IFACE_GEOCODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GC_TYPE_IFACE_GEOCODE, GcIfaceGeocode))
#define GC_IFACE_GEOCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GC_TYPE_IFACE_GEOCODE, GcIfaceGeocodeClass))
#define GC_IS_IFACE_GEOCODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GC_TYPE_IFACE_GEOCODE))
#define GC_IS_IFACE_GEOCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GC_TYPE_IFACE_GEOCODE))
#define GC_IFACE_GEOCODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GC_TYPE_IFACE_GEOCODE, GcIfaceGeocodeClass))
typedef struct _GcIfaceGeocode GcIfaceGeocode; /* Dummy typedef */
typedef struct _GcIfaceGeocodeClass GcIfaceGeocodeClass;
struct _GcIfaceGeocodeClass {
GTypeInterface base_iface;
/* vtable */
gboolean (*address_to_position) (GcIfaceGeocode *gc,
GHashTable *address,
GeocodePositionFields *fields,
double *latitude,
double *longitude,
double *altitude
GeoclueAccuracy *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
};
GType gc_iface_geocode_get_type (void);
G_END_DECLS
#endif
/*
* Geoclue
* gc-iface-position.c - GInterface for org.freedesktop.Geoclue.Position
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <geoclue/gc-iface-position.h>
#include <geoclue/geoclue-marshal.h>
enum {
POSITION_CHANGED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = {0};
static gboolean
gc_iface_position_get_position (GcIfacePosition *position,
int *fields,
int *timestamp,
double *latitude,
double *longitude,
double *altitude,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
#include "gc-iface-position-glue.h"
static void
gc_iface_position_base_init (gpointer klass)
{
static gboolean initialized = FALSE;
if (initialized) {
return;
}
initialized = TRUE;
signals[POSITION_CHANGED] = g_signal_new ("position-changed",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST, 0,
NULL, NULL,
geoclue_marshal_VOID__INT_INT_DOUBLE_DOUBLE_DOUBLE_INT_DOUBLE_DOUBLE,
G_TYPE_NONE, 8,
G_TYPE_INT,
G_TYPE_INT,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE,
G_TYPE_INT,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE);
dbus_g_object_type_install_info (gc_iface_position_get_type (),
&dbus_glib_gc_iface_position_object_info);
}
GType
gc_iface_position_get_type (void)
{
static GType type = 0;
if (!type) {
const GTypeInfo info = {
sizeof (GcIfacePositionClass),
gc_iface_position_base_init,
NULL,
};
type = g_type_register_static (G_TYPE_INTERFACE,
"GcIfacePosition", &info, 0);
}
return type;
}
static gboolean
gc_iface_position_get_position (GcIfacePosition *gc,
int *fields,
int *timestamp,
double *latitude,
double *longitude,
double *altitude,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error)
{
return GC_IFACE_POSITION_GET_CLASS (gc)->get_position
(gc, (GeocluePositionFields *) fields, timestamp,
latitude, longitude, altitude,
(GeoclueAccuracy *) accuracy_level,
horizontal_accuracy, vertical_accuracy,
error);
}
/*
* Geoclue
* gc-iface-position.h - GInterface for org.freedesktop.Geoclue.Position
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#ifndef _GC_IFACE_POSITION_H
#define _GC_IFACE_POSITION_H
#include <geoclue/geoclue-types.h>
G_BEGIN_DECLS
#define GC_TYPE_IFACE_POSITION (gc_iface_position_get_type ())
#define GC_IFACE_POSITION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GC_TYPE_IFACE_POSITION, GcIfacePosition))
#define GC_IFACE_POSITION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GC_TYPE_IFACE_POSITION, GcIfacePositionClass))
#define GC_IS_IFACE_POSITION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GC_TYPE_IFACE_POSITION))
#define GC_IS_IFACE_POSITION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GC_TYPE_IFACE_POSITION))
#define GC_IFACE_POSITION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GC_TYPE_IFACE_POSITION, GcIfacePositionClass))
typedef enum {
GEOCLUE_POSITION_FIELDS_NONE = 0,
GEOCLUE_POSITION_FIELDS_LATITUDE = 1 << 0,
GEOCLUE_POSITION_FIELDS_LONGITUDE = 1 << 1,
GEOCLUE_POSITION_FIELDS_ALTITUDE = 1 << 2
} GeocluePositionFields;
typedef struct _GcIfacePosition GcIfacePosition; /* Dummy typedef */
typedef struct _GcIfacePositionClass GcIfacePositionClass;
struct _GcIfacePositionClass {
GTypeInterface base_iface;
/* signals */
void (* position_changed) (GcIfacePosition *gc,
GeocluePositionFields fields,
int timestamp,
double latitude,
double longitude,
double altitude);
/* vtable */
gboolean (* get_position) (GcIfacePosition *gc,
GeocluePositionFields *fields,
int *timestamp,
double *latitude,
double *longitude,
double *altitude,
GeoclueAccuracy *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
};
GType gc_iface_position_get_type (void);
G_END_DECLS
#endif
/*
* Geoclue
* gc-iface-reverse-geocode.c - GInterface for org.freedesktop.ReverseGeocode
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <geoclue/geoclue-marshal.h>
#include <geoclue/gc-iface-reverse-geocode.h>
static gboolean
gc_iface_reverse_geocode_position_to_address (GcIfaceReverseGeocode *gc,
double latitude,
double longitude,
GHashTable **address,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
#include "gc-iface-reverse-geocode-glue.h"
static void
gc_iface_reverse_geocode_base_init (gpointer klass)
{
static gboolean initialized = FALSE;
if (initialized) {
return;
}
initialized = TRUE;
dbus_g_object_type_install_info (gc_iface_reverse_geocode_get_type (),
&dbus_glib_gc_iface_reverse_geocode_object_info);
}
GType
gc_iface_reverse_geocode_get_type (void)
{
static GType type = 0;
if (!type) {
const GTypeInfo info = {
sizeof (GcIfaceReverseGeocodeClass),
gc_iface_reverse_geocode_base_init,
NULL,
};
type = g_type_register_static (G_TYPE_INTERFACE,
"GcIfaceReverseGeocode", &info, 0);
}
return type;
}
static gboolean
gc_iface_reverse_geocode_position_to_address (GcIfaceReverseGeocode *gc,
double latitude,
double longitude,
GHashTable **address,
int *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error)
{
return GC_IFACE_ADDRESS_GET_CLASS (gc)->position_to_address
(gc, latitude, longitude, address,
(GeoclueAccuracy *) accuracy_level,
horizontal_accuracy, vertical_accuracy, error);
}
/*
* Geoclue
* gc-iface-reverse_geocode.h - GInterface for org.freedesktop.Reverse_Geocode
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#ifndef _GC_IFACE_REVERSE_GEOCODE_H
#define _GC_IFACE_REVERSE_GEOCODE_H
#include <geoclue/geoclue-types.h>
G_BEGIN_DECLS
#define GC_TYPE_IFACE_REVERSE_GEOCODE (gc_iface_reverse_geocode_get_type ())
#define GC_IFACE_REVERSE_GEOCODE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GC_TYPE_IFACE_REVERSE_GEOCODE, GcIfaceReverseGeocode))
#define GC_IFACE_REVERSE_GEOCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GC_TYPE_IFACE_REVERSE_GEOCODE, GcIfaceReverseGeocodeClass))
#define GC_IS_IFACE_REVERSE_GEOCODE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GC_TYPE_IFACE_REVERSE_GEOCODE))
#define GC_IS_IFACE_REVERSE_GEOCODE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GC_TYPE_IFACE_REVERSE_GEOCODE))
#define GC_IFACE_REVERSE_GEOCODE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), GC_TYPE_IFACE_REVERSE_GEOCODE, GcIfaceReverseGeocodeClass))
typedef struct _GcIfaceReverseGeocode GcIfaceReverseGeocode; /* Dummy typedef */
typedef struct _GcIfaceReverseGeocodeClass GcIfaceReverseGeocodeClass;
struct _GcIfaceReverseGeocodeClass {
GTypeInterface base_iface;
/* vtable */
gboolean (*position_to_address) (GcIfaceReverseGeocode *gc,
double latitude,
double longitude,
GHashTable **address,
GeoclueAccuracy *accuracy_level,
double *horizontal_accuracy,
double *vertical_accuracy,
GError **error);
};
GType gc_iface_reverse_geocode_get_type (void);
G_END_DECLS
#endif
/*
* Geoclue
* gc-iface-velocity.c - GInterface for org.freedesktop.Geoclue.Velocity
*
* Author: Iain Holmes <iain@openedhand.com>
*/
#include <glib.h>
#include <dbus/dbus-glib.h>
#include <geoclue/gc-iface-velocity.h>
#include <geoclue/geoclue-marshal.h>
enum {
VELOCITY_CHANGED,
LAST_SIGNAL
};
static guint signals[LAST_SIGNAL] = {0};
static gboolean
gc_iface_velocity_get_velocity (GcIfaceVelocity *velocity,
int *fields,
int *timestamp,
double *latitude,
double *longitude,
double *altitude,
GError **error);
#include "gc-iface-velocity-glue.h"
static void
gc_iface_velocity_base_init (gpointer klass)
{
static gboolean initialized = FALSE;
if (initialized) {
return;
}
initialized = TRUE;
signals[VELOCITY_CHANGED] = g_signal_new ("velocity-changed",
G_OBJECT_CLASS_TYPE (klass),
G_SIGNAL_RUN_LAST, 0,
NULL, NULL,
geoclue_marshal_VOID__INT_INT_DOUBLE_DOUBLE_DOUBLE,
G_TYPE_NONE, 8,
G_TYPE_INT,
G_TYPE_INT,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE,
G_TYPE_DOUBLE);
dbus_g_object_type_install_info (gc_iface_velocity_get_type (),
&dbus_glib_gc_iface_velocity_object_info);
}
GType
gc_iface_velocity_get_type (void)
{
static GType type = 0;
if (!type) {
const GTypeInfo info = {
sizeof (GcIfaceVelocityClass),
gc_iface_velocity_base_init,
NULL,
};
type = g_type_register_static (G_TYPE_INTERFACE,
"GcIfaceVelocity", &info, 0);
}
return type;
}
static gboolean
gc_iface_velocity_get_velocity (GcIfaceVelocity *gc,
int *fields,
int *timestamp,
double *speed,
double *direction,
double *climb,
GError **error)
{
return GC_IFACE_VELOCITY_GET_CLASS (gc)->get_velocity