GCC Code Coverage Report


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 100.0% 2 / 0 / 2
Functions: 100.0% 1 / 0 / 1
Branches: 22.7% 5 / 0 / 22

shumate/shumate-data-source-request.h
Line Branch Exec Source
1 /*
2 * Copyright (C) 2023 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 #pragma once
19
20 #if !defined (__SHUMATE_SHUMATE_H_INSIDE__) && !defined (SHUMATE_COMPILATION)
21 #error "Only <shumate/shumate.h> can be included directly."
22 #endif
23
24 #include <glib-object.h>
25 #include <shumate/shumate-version.h>
26
27 G_BEGIN_DECLS
28
29 SHUMATE_AVAILABLE_MACRO_IN_1_1
30 #define SHUMATE_TYPE_DATA_SOURCE_REQUEST (shumate_data_source_request_get_type())
31
5/22
None:
✗ Branch 10 → 11 not taken.
✗ Branch 10 → 12 not taken.
✗ Branch 23 → 24 not taken.
✗ Branch 23 → 25 not taken.
✗ Branch 25 → 26 not taken.
✗ Branch 25 → 27 not taken.
✓ Branch 32 → 33 taken 2 times.
✗ Branch 32 → 34 not taken.
✗ Branch 34 → 35 not taken.
✗ Branch 34 → 36 not taken.
✗ Branch 38 → 39 not taken.
✗ Branch 38 → 40 not taken.
✗ Branch 40 → 41 not taken.
✗ Branch 40 → 42 not taken.
✓ Branch 42 → 43 taken 2 times.
✗ Branch 42 → 44 not taken.
SHUMATE_IS_DATA_SOURCE_REQUEST:
✓ Branch 3 → 4 taken 40 times.
✗ Branch 3 → 7 not taken.
✓ Branch 4 → 5 taken 40 times.
✗ Branch 4 → 6 not taken.
✗ Branch 5 → 6 not taken.
✓ Branch 5 → 7 taken 40 times.
44 G_DECLARE_DERIVABLE_TYPE (ShumateDataSourceRequest, shumate_data_source_request, SHUMATE, DATA_SOURCE_REQUEST, GObject)
32
33
34 struct _ShumateDataSourceRequestClass
35 {
36 GObjectClass parent_class;
37
38 /*< private >*/
39 gpointer padding[16];
40 };
41
42 SHUMATE_AVAILABLE_IN_1_1
43 ShumateDataSourceRequest *shumate_data_source_request_new (int x,
44 int y,
45 int zoom_level);
46 SHUMATE_AVAILABLE_IN_1_1
47 int shumate_data_source_request_get_x (ShumateDataSourceRequest *self);
48 SHUMATE_AVAILABLE_IN_1_1
49 int shumate_data_source_request_get_y (ShumateDataSourceRequest *self);
50 SHUMATE_AVAILABLE_IN_1_1
51 int shumate_data_source_request_get_zoom_level (ShumateDataSourceRequest *self);
52 SHUMATE_AVAILABLE_IN_1_1
53 GBytes *shumate_data_source_request_get_data (ShumateDataSourceRequest *self);
54 SHUMATE_AVAILABLE_IN_1_1
55 void shumate_data_source_request_emit_data (ShumateDataSourceRequest *self,
56 GBytes *data,
57 gboolean complete);
58 SHUMATE_AVAILABLE_IN_1_1
59 GError *shumate_data_source_request_get_error (ShumateDataSourceRequest *self);
60 SHUMATE_AVAILABLE_IN_1_1
61 void shumate_data_source_request_emit_error (ShumateDataSourceRequest *self,
62 const GError *error);
63 SHUMATE_AVAILABLE_IN_1_1
64 gboolean shumate_data_source_request_is_completed (ShumateDataSourceRequest *self);
65 SHUMATE_AVAILABLE_IN_1_1
66 void shumate_data_source_request_complete (ShumateDataSourceRequest *self);
67
68 G_END_DECLS
69