summaryrefslogtreecommitdiff
path: root/public-api
diff options
context:
space:
mode:
authorCosimo Cecchi <cosimoc@gnome.org>2016-01-27 22:37:45 +0100
committerZeeshan Ali (Khattak) <zeeshanak@gnome.org>2016-01-28 16:36:50 +0100
commit384e3e009a84c3131db11a94bcea647591b2b832 (patch)
treee99f939652321de346f09878d47ae5f5d2867fd8 /public-api
parent8c7921cbef8b5509667129c4acbc6e08f411ae73 (diff)
downloadgeoclue-384e3e009a84c3131db11a94bcea647591b2b832.tar.gz
Move public-api directory to toplevel
We're about to make the src directory optional; move this at the toplevel so that libgeoclue can include it directly. https://bugs.freedesktop.org/show_bug.cgi?id=93889
Diffstat (limited to 'public-api')
-rw-r--r--public-api/Makefile.am43
-rw-r--r--public-api/gclue-enums.h52
2 files changed, 95 insertions, 0 deletions
diff --git a/public-api/Makefile.am b/public-api/Makefile.am
new file mode 100644
index 0000000..2bbcc1c
--- /dev/null
+++ b/public-api/Makefile.am
@@ -0,0 +1,43 @@
+include $(top_srcdir)/Makefile.decl
+
+BUILT_SOURCES = \
+ gclue-enum-types.h \
+ gclue-enum-types.c \
+ $(NULL)
+
+geoclue_includedir = $(includedir)/libgeoclue-$(GEOCLUE_API_VERSION)
+geoclue_include_HEADERS = gclue-enums.h \
+ gclue-enum-types.h \
+ $(NULL)
+
+AM_CPPFLAGS = $(GEOCLUE_CFLAGS) \
+ $(WARN_CFLAGS) \
+ -DLOCALEDIR="\"$(datadir)/locale\"" \
+ -DG_LOG_DOMAIN=\""Geoclue"\" \
+ -DABS_TOP_SRCDIR=\""$(abs_top_srcdir)"\" \
+ -DSYSCONFDIR=\""$(sysconfdir)"\"
+
+noinst_LTLIBRARIES = libgeoclue-public-api.la
+libgeoclue_public_api_la_SOURCES = $(BUILT_SOURCES)
+
+CLEANFILES = $(BUILT_SOURCES)
+EXTRA_DIST = gclue-enums.h
+
+# Enum types
+GEOCLUE_ENUMS = \
+ $(srcdir)/gclue-enums.h
+
+gclue-enum-types.h: Makefile.am $(GEOCLUE_ENUMS) $(top_srcdir)/build-aux/gclue-enums-template.h
+ $(AM_V_GEN) $(GLIB_MKENUMS) \
+ --fhead "#include \"gclue-enums.h\"\n#ifndef __GCLUE_ENUM_TYPES_H__\n#define __GCLUE_ENUM_TYPES_H__\n" \
+ --template $(top_srcdir)/build-aux/gclue-enums-template.h \
+ --ftail "#endif /* __GCLUE_ENUM_TYPES_H__ */\n" \
+ $(GEOCLUE_ENUMS) > $@
+
+gclue-enum-types.c: Makefile.am $(top_srcdir)/build-aux/gclue-enums-template.c gclue-enum-types.h
+ $(AM_V_GEN) $(GLIB_MKENUMS) \
+ --fhead "#include \"gclue-enum-types.h\"" \
+ --template $(top_srcdir)/build-aux/gclue-enums-template.c \
+ $(GEOCLUE_ENUMS) > $@
+
+-include $(top_srcdir)/git.mk
diff --git a/public-api/gclue-enums.h b/public-api/gclue-enums.h
new file mode 100644
index 0000000..e16759f
--- /dev/null
+++ b/public-api/gclue-enums.h
@@ -0,0 +1,52 @@
+/* vim: set et ts=8 sw=8: */
+/* gclue-enum.h
+ *
+ * Copyright (C) 2013 Red Hat, Inc.
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * 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/>.
+ *
+ * Author: Zeeshan Ali (Khattak) <zeeshanak@gnome.org>
+ */
+
+#ifndef GCLUE_ENUM_H
+#define GCLUE_ENUM_H
+
+#include <glib.h>
+
+G_BEGIN_DECLS
+
+/**
+ * GClueAccuracyLevel:
+ * @GCLUE_ACCURACY_LEVEL_NONE: Accuracy level unknown or unset.
+ * @GCLUE_ACCURACY_LEVEL_COUNTRY: Country-level accuracy.
+ * @GCLUE_ACCURACY_LEVEL_CITY: City-level accuracy.
+ * @GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD: neighborhood-level accuracy.
+ * @GCLUE_ACCURACY_LEVEL_STREET: Street-level accuracy.
+ * @GCLUE_ACCURACY_LEVEL_EXACT: Exact accuracy. Typically requires GPS receiver.
+ *
+ * Used to specify level of accuracy requested by, or allowed for a client.
+ **/
+typedef enum {/*< underscore_name=gclue_accuracy_level>*/
+ GCLUE_ACCURACY_LEVEL_NONE = 0,
+ GCLUE_ACCURACY_LEVEL_COUNTRY = 1,
+ GCLUE_ACCURACY_LEVEL_CITY = 4,
+ GCLUE_ACCURACY_LEVEL_NEIGHBORHOOD = 5,
+ GCLUE_ACCURACY_LEVEL_STREET = 6,
+ GCLUE_ACCURACY_LEVEL_EXACT = 8,
+} GClueAccuracyLevel;
+
+G_END_DECLS
+
+#endif /* GCLUE_ENUM_H */