shumate/shumate-data-source.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /* | ||
| 2 | * Copyright (C) 2021 James Westman <james@jwestman.net> | ||
| 3 | * | ||
| 4 | * This library is free software; you can redistribute it and/or | ||
| 5 | * modify it under the terms of the GNU Lesser General Public | ||
| 6 | * License as published by the Free Software Foundation; either | ||
| 7 | * version 2.1 of the License, or (at your option) any later version. | ||
| 8 | * | ||
| 9 | * This library is distributed in the hope that it will be useful, | ||
| 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
| 12 | * Lesser General Public License for more details. | ||
| 13 | * | ||
| 14 | * You should have received a copy of the GNU Lesser General Public | ||
| 15 | * License along with this library; if not, see <https://www.gnu.org/licenses/>. | ||
| 16 | */ | ||
| 17 | |||
| 18 | |||
| 19 | #pragma once | ||
| 20 | |||
| 21 | #include <gio/gio.h> | ||
| 22 | #include <shumate/shumate-data-source-request.h> | ||
| 23 | #include <shumate/shumate-version.h> | ||
| 24 | |||
| 25 | G_BEGIN_DECLS | ||
| 26 | |||
| 27 | #define SHUMATE_TYPE_DATA_SOURCE (shumate_data_source_get_type()) | ||
| 28 | |||
| 29 |
3/8✓ Branch 3 → 4 taken 60 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 60 times.
✗ Branch 4 → 6 not taken.
✓ Branch 5 → 6 taken 60 times.
✗ Branch 5 → 7 not taken.
✗ Branch 6 → 7 not taken.
✗ Branch 6 → 8 not taken.
|
78 | G_DECLARE_DERIVABLE_TYPE (ShumateDataSource, shumate_data_source, SHUMATE, DATA_SOURCE, GObject) |
| 30 | |||
| 31 | struct _ShumateDataSourceClass | ||
| 32 | { | ||
| 33 | GObjectClass parent_class; | ||
| 34 | |||
| 35 | void (*get_tile_data_async) (ShumateDataSource *self, | ||
| 36 | int x, | ||
| 37 | int y, | ||
| 38 | int zoom_level, | ||
| 39 | GCancellable *cancellable, | ||
| 40 | GAsyncReadyCallback callback, | ||
| 41 | gpointer user_data); | ||
| 42 | GBytes *(*get_tile_data_finish) (ShumateDataSource *self, | ||
| 43 | GAsyncResult *result, | ||
| 44 | GError **error); | ||
| 45 | |||
| 46 | ShumateDataSourceRequest *(*start_request) (ShumateDataSource *self, | ||
| 47 | int x, | ||
| 48 | int y, | ||
| 49 | int zoom_level, | ||
| 50 | GCancellable *cancellable); | ||
| 51 | |||
| 52 | /*< private >*/ | ||
| 53 | gpointer padding[15]; | ||
| 54 | }; | ||
| 55 | |||
| 56 | |||
| 57 | void shumate_data_source_get_tile_data_async (ShumateDataSource *self, | ||
| 58 | int x, | ||
| 59 | int y, | ||
| 60 | int zoom_level, | ||
| 61 | GCancellable *cancellable, | ||
| 62 | GAsyncReadyCallback callback, | ||
| 63 | gpointer user_data); | ||
| 64 | GBytes *shumate_data_source_get_tile_data_finish (ShumateDataSource *self, | ||
| 65 | GAsyncResult *result, | ||
| 66 | GError **error); | ||
| 67 | SHUMATE_AVAILABLE_IN_1_1 | ||
| 68 | ShumateDataSourceRequest *shumate_data_source_start_request (ShumateDataSource *self, | ||
| 69 | int x, | ||
| 70 | int y, | ||
| 71 | int zoom_level, | ||
| 72 | GCancellable *cancellable); | ||
| 73 | SHUMATE_AVAILABLE_IN_1_1 | ||
| 74 | guint shumate_data_source_get_min_zoom_level (ShumateDataSource *self); | ||
| 75 | SHUMATE_AVAILABLE_IN_1_1 | ||
| 76 | void shumate_data_source_set_min_zoom_level (ShumateDataSource *self, | ||
| 77 | guint zoom_level); | ||
| 78 | SHUMATE_AVAILABLE_IN_1_1 | ||
| 79 | guint shumate_data_source_get_max_zoom_level (ShumateDataSource *self); | ||
| 80 | SHUMATE_AVAILABLE_IN_1_1 | ||
| 81 | void shumate_data_source_set_max_zoom_level (ShumateDataSource *self, | ||
| 82 | guint zoom_level); | ||
| 83 | |||
| 84 | G_END_DECLS | ||
| 85 |