Commit 99337e36 authored by Jussi Kukkonen's avatar Jussi Kukkonen

Stub for a GeoclueIPosProvider Interface

A Work-in-progress definition of the position
provider interface
parent 4695cbac
#include "geoclue_iposprovider.h"
static void
geoclue_iposprovider_base_init (gpointer g_class)
{
static gboolean initialized = FALSE;
if (!initialized) {
/* create interface signals here. */
initialized = TRUE;
}
}
GType
geoclue_iposprovider_get_type (void)
{
static GType type = 0;
if (type == 0) {
static const GTypeInfo info = {
sizeof (GeoclueIPosproviderInterface),
geoclue_iposprovider_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_iposprovider_do_action (GeoclueIPosprovider *self)
{
GEOCLUE_IPOSPROVIDER_GET_INTERFACE (self)->do_action (self);
}
#ifndef GEOCLUE_IPOSPROVIDER_H
#define GEOCLUE_IPOSPROVIDER_H
#include <glib-object.h>
#define GEOCLUE_TYPE_IPOSPROVIDER (geoclue_iposprovider_get_type ())
#define GEOCLUE_IPOSPROVIDER(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GEOCLUE_TYPE_IPOSPROVIDER, GeoclueIPosprovider))
#define GEOCLUE_IS_IPOSPROVIDER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GEOCLUE_TYPE_IPOSPROVIDER))
#define GEOCLUE_IPOSPROVIDER_GET_INTERFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GEOCLUE_TYPE_IPOSPROVIDER, GeoclueIPosproviderInterface))
typedef struct _GeoclueIPosprovider GeoclueIPosprovider; /* dummy object */
typedef struct _GeoclueIPosproviderInterface GeoclueIPosproviderInterface;
struct _GeoclueIPosproviderInterface {
GTypeInterface parent;
void (*do_action) (GeoclueIPosprovider *self);
};
GType geoclue_iposprovider_get_type (void);
/* Interface API */
void geoclue_iposprovider_do_action (GeoclueIPosprovider *self);
#endif /*GEOCLUE_IPOSPROVIDER_H*/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment