|
14 | 14 | You should have received a copy of the GNU General Public License
|
15 | 15 | along with Redshift. If not, see <http://www.gnu.org/licenses/>.
|
16 | 16 |
|
17 |
| - Copyright (c) 2014 Jon Lund Steffense <[email protected]> |
| 17 | + Copyright (c) 2014-2017 Jon Lund Steffense <[email protected]> |
18 | 18 | */
|
19 | 19 |
|
20 | 20 | #ifndef REDSHIFT_LOCATION_CORELOCATION_H
|
|
24 | 24 |
|
25 | 25 | #include "redshift.h"
|
26 | 26 |
|
| 27 | +typedef struct location_corelocation_private location_corelocation_private_t; |
27 | 28 |
|
28 |
| -int location_corelocation_init(void *state); |
29 |
| -int location_corelocation_start(void *state); |
30 |
| -void location_corelocation_free(void *state); |
| 29 | +typedef struct { |
| 30 | + location_corelocation_private_t *private; |
| 31 | + int pipe_fd_read; |
| 32 | + int pipe_fd_write; |
| 33 | + int available; |
| 34 | + int error; |
| 35 | + float latitude; |
| 36 | + float longitude; |
| 37 | +} location_corelocation_state_t; |
31 | 38 |
|
32 |
| -void location_corelocation_print_help(FILE *f); |
33 |
| -int location_corelocation_set_option(void *state, |
34 |
| - const char *key, const char *value); |
35 | 39 |
|
36 |
| -int location_corelocation_get_location(void *state, |
37 |
| - location_t *location); |
| 40 | +int location_corelocation_init(location_corelocation_state_t *state); |
| 41 | +int location_corelocation_start(location_corelocation_state_t *state); |
| 42 | +void location_corelocation_free(location_corelocation_state_t *state); |
| 43 | + |
| 44 | +void location_corelocation_print_help(FILE *f); |
| 45 | +int location_corelocation_set_option( |
| 46 | + location_corelocation_state_t *state, |
| 47 | + const char *key, const char *value); |
| 48 | + |
| 49 | +int location_corelocation_get_fd( |
| 50 | + location_corelocation_state_t *state); |
| 51 | +int location_corelocation_handle( |
| 52 | + location_corelocation_state_t *state, |
| 53 | + location_t *location, int *available); |
38 | 54 |
|
39 | 55 |
|
40 | 56 | #endif /* ! REDSHIFT_LOCATION_CORELOCATION_H */
|
0 commit comments