From 8839dcd530cbc8f5c7ae45a61d86bed05d2a6e8a Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Sat, 6 Dec 2014 15:32:50 -0500 Subject: Add CoreLocation (OSX) location provider Similarly to the Geoclue provider, the CoreLocation provider only requests the location on startup. --- src/redshift.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'src/redshift.c') 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 { @@ -219,6 +223,20 @@ static const location_provider_t location_providers[] = { (location_provider_get_location_func *) 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", -- cgit v1.2.3-70-g09d2