Github User Fetcher 1.0.0
C Application with Server and GUI
Loading...
Searching...
No Matches
gnetworkmonitor.h
Go to the documentation of this file.
1/* GIO - GLib Input, Output and Streaming Library
2 *
3 * Copyright 2011 Red Hat, Inc.
4 *
5 * SPDX-License-Identifier: LGPL-2.1-or-later
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General
18 * Public License along with this library; if not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef __G_NETWORK_MONITOR_H__
22#define __G_NETWORK_MONITOR_H__
23
24#if !defined (__GIO_GIO_H_INSIDE__) && !defined (GIO_COMPILATION)
25#error "Only <gio/gio.h> can be included directly."
26#endif
27
28#include <gio/giotypes.h>
29
31
32/**
33 * G_NETWORK_MONITOR_EXTENSION_POINT_NAME:
34 *
35 * Extension point for network status monitoring functionality.
36 * See [Extending GIO][extending-gio].
37 *
38 * Since: 2.30
39 */
40#define G_NETWORK_MONITOR_EXTENSION_POINT_NAME "gio-network-monitor"
41
42#define G_TYPE_NETWORK_MONITOR (g_network_monitor_get_type ())
43#define G_NETWORK_MONITOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), G_TYPE_NETWORK_MONITOR, GNetworkMonitor))
44#define G_IS_NETWORK_MONITOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), G_TYPE_NETWORK_MONITOR))
45#define G_NETWORK_MONITOR_GET_INTERFACE(o) (G_TYPE_INSTANCE_GET_INTERFACE ((o), G_TYPE_NETWORK_MONITOR, GNetworkMonitorInterface))
46
48
51
53 gboolean network_available);
54
56 GSocketConnectable *connectable,
57 GCancellable *cancellable,
58 GError **error);
60 GSocketConnectable *connectable,
61 GCancellable *cancellable,
62 GAsyncReadyCallback callback,
63 gpointer user_data);
65 GAsyncResult *result,
66 GError **error);
67};
68
73
76
79
82
85 GSocketConnectable *connectable,
86 GCancellable *cancellable,
87 GError **error);
90 GSocketConnectable *connectable,
91 GCancellable *cancellable,
92 GAsyncReadyCallback callback,
93 gpointer user_data);
96 GAsyncResult *result,
97 GError **error);
98
100
101#endif /* __G_NETWORK_MONITOR_H__ */
#define GIO_AVAILABLE_IN_2_32
#define GIO_AVAILABLE_IN_2_46
#define GIO_AVAILABLE_IN_2_44
GNetworkConnectivity
Definition gioenums.h:2092
struct _GSocketConnectable GSocketConnectable
Definition giotypes.h:143
struct _GNetworkMonitor GNetworkMonitor
Definition giotypes.h:121
struct _GAsyncResult GAsyncResult
Definition giotypes.h:36
void(* GAsyncReadyCallback)(GObject *source_object, GAsyncResult *res, gpointer data)
Definition giotypes.h:190
#define G_END_DECLS
Definition gmacros.h:910
#define G_BEGIN_DECLS
Definition gmacros.h:909
#define G_GNUC_CONST
Definition gmacros.h:637
GIO_AVAILABLE_IN_2_32 void g_network_monitor_can_reach_async(GNetworkMonitor *monitor, GSocketConnectable *connectable, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
GIO_AVAILABLE_IN_2_32 GNetworkMonitor * g_network_monitor_get_default(void)
GIO_AVAILABLE_IN_2_46 gboolean g_network_monitor_get_network_metered(GNetworkMonitor *monitor)
GIO_AVAILABLE_IN_2_32 GType g_network_monitor_get_type(void) G_GNUC_CONST
GIO_AVAILABLE_IN_2_32 gboolean g_network_monitor_can_reach(GNetworkMonitor *monitor, GSocketConnectable *connectable, GCancellable *cancellable, GError **error)
GIO_AVAILABLE_IN_2_32 gboolean g_network_monitor_get_network_available(GNetworkMonitor *monitor)
GIO_AVAILABLE_IN_2_32 gboolean g_network_monitor_can_reach_finish(GNetworkMonitor *monitor, GAsyncResult *result, GError **error)
GIO_AVAILABLE_IN_2_44 GNetworkConnectivity g_network_monitor_get_connectivity(GNetworkMonitor *monitor)
gsize GType
Definition gtype.h:427
gint gboolean
Definition gtypes.h:56
void * gpointer
Definition gtypes.h:109
static void error(LoadState *S, const char *why)
void(* can_reach_async)(GNetworkMonitor *monitor, GSocketConnectable *connectable, GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data)
gboolean(* can_reach)(GNetworkMonitor *monitor, GSocketConnectable *connectable, GCancellable *cancellable, GError **error)
void(* network_changed)(GNetworkMonitor *monitor, gboolean network_available)
gboolean(* can_reach_finish)(GNetworkMonitor *monitor, GAsyncResult *result, GError **error)