1 /* vim: set et ts=8 sw=8: */ 2 /* 3 * Geoclue convenience library. 4 * 5 * Copyright 2015 Red Hat, Inc. 6 * 7 * This library is free software; you can redistribute it and/or 8 * modify it under the terms of the GNU Lesser General Public 9 * License as published by the Free Software Foundation; either 10 * version 2.1 of the License, or (at your option) any later version. 11 * 12 * This library is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 15 * Lesser General Public License for more details. 16 * 17 * You should have received a copy of the GNU Lesser General Public 18 * License along with this library; if not, write to the Free Software 19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 20 * 21 * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org> 22 */ 23 24 #ifndef GCLUE_SIMPLE_H 25 #define GCLUE_SIMPLE_H 26 27 #include <glib-object.h> 28 #include <gio/gio.h> 29 #include "gclue-client.h" 30 #include "gclue-location.h" 31 #include "gclue-enum-types.h" 32 33 G_BEGIN_DECLS 34 35 #define GCLUE_TYPE_SIMPLE (gclue_simple_get_type()) 36 #define GCLUE_SIMPLE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GCLUE_TYPE_SIMPLE, GClueSimple)) 37 #define GCLUE_SIMPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GCLUE_TYPE_SIMPLE, GClueSimpleClass)) 38 #define GCLUE_IS_SIMPLE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GCLUE_TYPE_SIMPLE)) 39 #define GCLUE_IS_SIMPLE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GCLUE_TYPE_SIMPLE)) 40 #define GCLUE_SIMPLE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GCLUE_TYPE_SIMPLE, GClueSimpleClass)) 41 42 typedef struct _GClueSimple GClueSimple; 43 typedef struct _GClueSimpleClass GClueSimpleClass; 44 typedef struct _GClueSimplePrivate GClueSimplePrivate; 45 46 struct _GClueSimple 47 { 48 GObject parent; 49 50 /*< private >*/ 51 GClueSimplePrivate *priv; 52 }; 53 54 struct _GClueSimpleClass 55 { 56 GObjectClass parent_class; 57 }; 58 59 GType gclue_simple_get_type (void) G_GNUC_CONST; 60 61 void gclue_simple_new (const char *desktop_id, 62 GClueAccuracyLevel accuracy_level, 63 GCancellable *cancellable, 64 GAsyncReadyCallback callback, 65 gpointer user_data); 66 GClueSimple * gclue_simple_new_finish (GAsyncResult *result, 67 GError **error); 68 GClueSimple * gclue_simple_new_sync (const char *desktop_id, 69 GClueAccuracyLevel accuracy_level, 70 GCancellable *cancellable, 71 GError **error); 72 GClueClient * gclue_simple_get_client (GClueSimple *simple); 73 GClueLocation * gclue_simple_get_location (GClueSimple *simple); 74 75 G_END_DECLS 76 77 #endif /* GCLUE_SIMPLE_H */ 78