From 153dec0e21530d52b8ee82f6ec588620ec0857d2 Mon Sep 17 00:00:00 2001 From: Jon Lund Steffensen Date: Wed, 16 Aug 2017 21:20:06 -0700 Subject: Change location providers to allow updates Change location provider implementations so it is possible for location providers to dynamically update the location. This commit adds the interfaces and infrastructure in redshift.c but none of the location provides are changed to become dynamic. --- src/redshift.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/redshift.h') diff --git a/src/redshift.h b/src/redshift.h index bac8e34..c659502 100644 --- a/src/redshift.h +++ b/src/redshift.h @@ -89,7 +89,9 @@ typedef void location_provider_free_func(void *state); typedef void location_provider_print_help_func(FILE *f); typedef int location_provider_set_option_func(void *state, const char *key, const char *value); -typedef int location_provider_get_location_func(void *state, location_t *loc); +typedef int location_provider_get_fd_func(void *state); +typedef int location_provider_handle_func( + void *state, location_t *location, int *available); typedef struct { char *name; @@ -106,8 +108,9 @@ typedef struct { /* Set an option key, value-pair. */ location_provider_set_option_func *set_option; - /* Get current location. */ - location_provider_get_location_func *get_location; + /* Listen and handle location updates. */ + location_provider_get_fd_func *get_fd; + location_provider_handle_func *handle; } location_provider_t; -- cgit v1.2.3-70-g09d2