Commit 724f1302 authored by Zeeshan Ali's avatar Zeeshan Ali

Add GClueAccuracyLevel enum type

We leave some holes in the enum numbers in case we want to add more
level in between later.
parent 308422c4
......@@ -181,6 +181,9 @@ AC_PATH_PROG([REALPATH],[realpath])
AC_PATH_PROG([SETCAP],[setcap])
GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0`
AC_SUBST(GLIB_MKENUMS)
AC_CONFIG_FILES([
Makefile
src/Makefile
......
......@@ -28,6 +28,8 @@ geoclue-interface.h: Makefile.am $(interface_DATA)
BUILT_SOURCES = \
$(dbus_built_sources) \
gclue-enum-types.h \
gclue-enum-types.c \
$(NULL)
geoclue_SOURCES = \
......@@ -49,6 +51,7 @@ geoclue_SOURCES = \
gclue-service-client.c \
gclue-service-location.h \
gclue-service-location.c \
gclue-enums.h \
geocode-location.c \
geocode-location.h \
$(NULL)
......@@ -75,4 +78,21 @@ update-from-geocode-glib:
FILES="$(GEOCODEGLIBFILES)" DIR="$(GEOCODEGLIBDIR)" $(srcdir)/update-from-geocode-glib.sh && changed=true ; \
git commit -m "location: Update from geocode-glib" $(GEOCODEGLIBFILES)
# 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
/* vim: set et ts=8 sw=8: */
/* gclue-enum.h
*
* Copyright (C) 2013 Red Hat, Inc.
*
* Geoclue is free software; you can redistribute it and/or modify it under
* the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 2 of the License, or (at your option)
* any later version.
*
* Geoclue 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 General Public License for more
* details.
*
* You should have received a copy of the GNU General Public License along
* with Geoclue; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
* 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_COUNTRY: Country-level accuracy.
* @GCLUE_ACCURACY_LEVEL_CITY: City-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_COUNTRY = 1,
GCLUE_ACCURACY_LEVEL_CITY = 4,
GCLUE_ACCURACY_LEVEL_STREET = 6,
GCLUE_ACCURACY_LEVEL_EXACT = 8,
} GClueAccuracyLevel;
G_END_DECLS
#endif /* GCLUE_ENUM_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