Debian Codegraph @

libgeoclue/gclue-simple.h

raw symbols SCIP
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) <[email protected]>
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 G_DEFINE_AUTOPTR_CLEANUP_FUNC (GClueSimple, g_object_unref)
60
61 GType gclue_simple_get_type (void) G_GNUC_CONST;
62
63 void gclue_simple_new (const char *desktop_id,
64 GClueAccuracyLevel accuracy_level,
65 GCancellable *cancellable,
66 GAsyncReadyCallback callback,
67 gpointer user_data);
68 GClueSimple * gclue_simple_new_finish (GAsyncResult *result,
69 GError **error);
70 GClueSimple * gclue_simple_new_sync (const char *desktop_id,
71 GClueAccuracyLevel accuracy_level,
72 GCancellable *cancellable,
73 GError **error);
74 void gclue_simple_new_with_thresholds
75 (const char *desktop_id,
76 GClueAccuracyLevel accuracy_level,
77 guint time_threshold,
78 guint distance_threshold,
79 GCancellable *cancellable,
80 GAsyncReadyCallback callback,
81 gpointer user_data);
82 GClueSimple * gclue_simple_new_with_thresholds_finish (GAsyncResult *result,
83 GError **error);
84 GClueSimple * gclue_simple_new_with_thresholds_sync
85 (const char *desktop_id,
86 GClueAccuracyLevel accuracy_level,
87 guint time_threshold,
88 guint distance_threshold,
89 GCancellable *cancellable,
90 GError **error);
91 GClueClient * gclue_simple_get_client (GClueSimple *simple);
92 GClueLocation * gclue_simple_get_location (GClueSimple *simple);
93
94 G_END_DECLS
95
96 #endif /* GCLUE_SIMPLE_H */