aboutsummaryrefslogtreecommitdiffstats
path: root/src/redshift.c
diff options
context:
space:
mode:
authorJon Lund Steffensen <jonlst@gmail.com>2014-12-06 15:32:50 -0500
committerJon Lund Steffensen <jonlst@gmail.com>2014-12-15 20:36:35 -0500
commit8839dcd530cbc8f5c7ae45a61d86bed05d2a6e8a (patch)
tree3a3e69b2711bfbde5c557192bf10ea544a4617a7 /src/redshift.c
parentAdd Quartz (OSX) gamma adjustment method (diff)
downloadredshift-ng-8839dcd530cbc8f5c7ae45a61d86bed05d2a6e8a.tar.gz
redshift-ng-8839dcd530cbc8f5c7ae45a61d86bed05d2a6e8a.tar.bz2
redshift-ng-8839dcd530cbc8f5c7ae45a61d86bed05d2a6e8a.tar.xz
Add CoreLocation (OSX) location provider
Similarly to the Geoclue provider, the CoreLocation provider only requests the location on startup.
Diffstat (limited to 'src/redshift.c')
-rw-r--r--src/redshift.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/redshift.c b/src/redshift.c
index 8ff40f0..818db4e 100644
--- a/src/redshift.c
+++ b/src/redshift.c
@@ -84,6 +84,10 @@
# include "location-geoclue2.h"
#endif
+#ifdef ENABLE_CORELOCATION
+# include "location-corelocation.h"
+#endif
+
/* Union of state data for gamma adjustment methods */
typedef union {
@@ -220,6 +224,20 @@ static const location_provider_t location_providers[] = {
location_geoclue2_get_location
},
#endif
+#ifdef ENABLE_CORELOCATION
+ {
+ "corelocation",
+ (location_provider_init_func *)location_corelocation_init,
+ (location_provider_start_func *)location_corelocation_start,
+ (location_provider_free_func *)location_corelocation_free,
+ (location_provider_print_help_func *)
+ location_corelocation_print_help,
+ (location_provider_set_option_func *)
+ location_corelocation_set_option,
+ (location_provider_get_location_func *)
+ location_corelocation_get_location
+ },
+#endif
{
"manual",
(location_provider_init_func *)location_manual_init,