aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.c
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2011-03-28 00:14:58 +0200
committerJon Lund Steffensen <jonlst@gmail.com>2011-03-28 00:14:58 +0200
commit28d553ddbb1c1404a650987c8970958e0d52858c (patch)
tree00cf92b099149818bb5e9db2ef297145d4e3af4e /src/redshift.c
parentw32gdi: Obtain a new DC handle on every adjustment. This fixes a bug (diff)
parentAdd Makefile bits for geoclue provider to properly link against geoclue (diff)
downloadredshift-ng-28d553ddbb1c1404a650987c8970958e0d52858c.tar.gz
redshift-ng-28d553ddbb1c1404a650987c8970958e0d52858c.tar.bz2
redshift-ng-28d553ddbb1c1404a650987c8970958e0d52858c.tar.xz
Merge Geoclue location provider by Mathieu Trudel-Lapierre with some tweaks.
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 af5520c..ac191fc 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",