aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.c
diff options
context:
space:
mode:
authorMathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>2011-02-09 23:31:17 -0500
committerMathieu Trudel-Lapierre <mathieu-tl@ubuntu.com>2011-02-09 23:31:17 -0500
commit3bf1f85267cad99c5a98b8c9c6d524edfdbc834e (patch)
treea0fb78c94181c15b9d5399ebd4a862aed847a3a5 /src/redshift.c
parentUpdate PO files. (diff)
downloadredshift-ng-3bf1f85267cad99c5a98b8c9c6d524edfdbc834e.tar.gz
redshift-ng-3bf1f85267cad99c5a98b8c9c6d524edfdbc834e.tar.bz2
redshift-ng-3bf1f85267cad99c5a98b8c9c6d524edfdbc834e.tar.xz
Add first pass of Geoclue location provider.
Diffstat (limited to 'src/redshift.c')
-rw-r--r--src/redshift.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/redshift.c b/src/redshift.c
index f5a7762..c063835 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -76,6 +76,10 @@
# include "location-gnome-clock.h"
#endif
+#ifdef ENABLE_GEOCLUE
+# include "location-geoclue.h"
+#endif
+
/* Union of state data for gamma adjustment methods */
typedef union {
@@ -139,11 +143,28 @@ typedef union {
#ifdef ENABLE_GNOME_CLOCK
location_gnome_clock_state_t gnome_clock;
#endif
+#ifdef ENABLE_GEOCLUE
+ location_geoclue_state_t geoclue;
+#endif
} location_state_t;
/* Location provider method structs */
static const location_provider_t location_providers[] = {
+#ifdef ENABLE_GEOCLUE
+ {
+ "geoclue",
+ (location_provider_init_func *)location_geoclue_init,
+ (location_provider_start_func *)location_geoclue_start,
+ (location_provider_free_func *)location_geoclue_free,
+ (location_provider_print_help_func *)
+ location_geoclue_print_help,
+ (location_provider_set_option_func *)
+ location_geoclue_set_option,
+ (location_provider_get_location_func *)
+ location_geoclue_get_location
+ },
+#endif
#ifdef ENABLE_GNOME_CLOCK
{
"gnome-clock",