| 1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
| 2 | /* |
| 3 | * Copyright (C) 2007 - 2008 Novell, Inc. |
| 4 | * Copyright (C) 2007 - 2014 Red Hat, Inc. |
| 5 | */ |
| 6 | |
| 7 | #ifndef __NM_CLIENT_H__ |
| 8 | #define __NM_CLIENT_H__ |
| 9 | |
| 10 | #if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) |
| 11 | #error "Only <NetworkManager.h> can be included directly." |
| 12 | #endif |
| 13 | |
| 14 | #include "nm-types.h" |
| 15 | |
| 16 | G_BEGIN_DECLS |
| 17 | |
| 18 | /** |
| 19 | * NMClientInstanceFlags: |
| 20 | * @NM_CLIENT_INSTANCE_FLAGS_NONE: special value to indicate no flags. |
| 21 | * @NM_CLIENT_INSTANCE_FLAGS_NO_AUTO_FETCH_PERMISSIONS: by default, NMClient |
| 22 | * will fetch the permissions via "GetPermissions" and refetch them when |
| 23 | * "CheckPermissions" signal gets received. By setting this flag, this behavior |
| 24 | * can be disabled. You can toggle this flag to enable and disable automatic |
| 25 | * fetching of the permissions. Watch also nm_client_get_permissions_state() |
| 26 | * to know whether the permissions are up to date. |
| 27 | * |
| 28 | * Since: 1.24 |
| 29 | */ |
| 30 | typedef enum { /*< flags >*/ |
| 31 | NM_CLIENT_INSTANCE_FLAGS_NONE = 0, |
| 32 | NM_CLIENT_INSTANCE_FLAGS_NO_AUTO_FETCH_PERMISSIONS = 1, |
| 33 | } NMClientInstanceFlags; |
| 34 | |
| 35 | #define NM_TYPE_CLIENT (nm_client_get_type()) |
| 36 | #define NM_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_CLIENT, NMClient)) |
| 37 | #define NM_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_CLIENT, NMClientClass)) |
| 38 | #define NM_IS_CLIENT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_CLIENT)) |
| 39 | #define NM_IS_CLIENT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_CLIENT)) |
| 40 | #define NM_CLIENT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_CLIENT, NMClientClass)) |
| 41 | |
| 42 | #define NM_CLIENT_VERSION "version" |
| 43 | #define NM_CLIENT_STATE "state" |
| 44 | #define NM_CLIENT_STARTUP "startup" |
| 45 | #define NM_CLIENT_NM_RUNNING "nm-running" |
| 46 | #define NM_CLIENT_DBUS_CONNECTION "dbus-connection" |
| 47 | #define NM_CLIENT_DBUS_NAME_OWNER "dbus-name-owner" |
| 48 | #define NM_CLIENT_INSTANCE_FLAGS "instance-flags" |
| 49 | |
| 50 | _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY |
| 51 | #define NM_CLIENT_NETWORKING_ENABLED "networking-enabled" |
| 52 | |
| 53 | _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY |
| 54 | #define NM_CLIENT_WIRELESS_ENABLED "wireless-enabled" |
| 55 | _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY |
| 56 | #define NM_CLIENT_WWAN_ENABLED "wwan-enabled" |
| 57 | _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY |
| 58 | #define NM_CLIENT_WIMAX_ENABLED "wimax-enabled" |
| 59 | |
| 60 | #define NM_CLIENT_WIRELESS_HARDWARE_ENABLED "wireless-hardware-enabled" |
| 61 | #define NM_CLIENT_WWAN_HARDWARE_ENABLED "wwan-hardware-enabled" |
| 62 | #define NM_CLIENT_WIMAX_HARDWARE_ENABLED "wimax-hardware-enabled" |
| 63 | |
| 64 | #define NM_CLIENT_ACTIVE_CONNECTIONS "active-connections" |
| 65 | #define NM_CLIENT_CONNECTIVITY "connectivity" |
| 66 | #define NM_CLIENT_CONNECTIVITY_CHECK_URI "connectivity-check-uri" |
| 67 | #define NM_CLIENT_CONNECTIVITY_CHECK_AVAILABLE "connectivity-check-available" |
| 68 | |
| 69 | _NM_DEPRECATED_SYNC_WRITABLE_PROPERTY |
| 70 | #define NM_CLIENT_CONNECTIVITY_CHECK_ENABLED "connectivity-check-enabled" |
| 71 | |
| 72 | #define NM_CLIENT_PRIMARY_CONNECTION "primary-connection" |
| 73 | #define NM_CLIENT_ACTIVATING_CONNECTION "activating-connection" |
| 74 | #define NM_CLIENT_DEVICES "devices" |
| 75 | #define NM_CLIENT_ALL_DEVICES "all-devices" |
| 76 | #define NM_CLIENT_CONNECTIONS "connections" |
| 77 | #define NM_CLIENT_HOSTNAME "hostname" |
| 78 | #define NM_CLIENT_CAN_MODIFY "can-modify" |
| 79 | #define NM_CLIENT_METERED "metered" |
| 80 | #define NM_CLIENT_DNS_MODE "dns-mode" |
| 81 | #define NM_CLIENT_DNS_RC_MANAGER "dns-rc-manager" |
| 82 | #define NM_CLIENT_DNS_CONFIGURATION "dns-configuration" |
| 83 | #define NM_CLIENT_CHECKPOINTS "checkpoints" |
| 84 | #define NM_CLIENT_CAPABILITIES "capabilities" |
| 85 | #define NM_CLIENT_PERMISSIONS_STATE "permissions-state" |
| 86 | |
| 87 | #define NM_CLIENT_DEVICE_ADDED "device-added" |
| 88 | #define NM_CLIENT_DEVICE_REMOVED "device-removed" |
| 89 | #define NM_CLIENT_ANY_DEVICE_ADDED "any-device-added" |
| 90 | #define NM_CLIENT_ANY_DEVICE_REMOVED "any-device-removed" |
| 91 | #define NM_CLIENT_PERMISSION_CHANGED "permission-changed" |
| 92 | #define NM_CLIENT_CONNECTION_ADDED "connection-added" |
| 93 | #define NM_CLIENT_CONNECTION_REMOVED "connection-removed" |
| 94 | #define NM_CLIENT_ACTIVE_CONNECTION_ADDED "active-connection-added" |
| 95 | #define NM_CLIENT_ACTIVE_CONNECTION_REMOVED "active-connection-removed" |
| 96 | |
| 97 | /** |
| 98 | * NMClientError: |
| 99 | * @NM_CLIENT_ERROR_FAILED: unknown or unclassified error |
| 100 | * @NM_CLIENT_ERROR_MANAGER_NOT_RUNNING: an operation that requires NetworkManager |
| 101 | * failed because NetworkManager is not running |
| 102 | * @NM_CLIENT_ERROR_OBJECT_CREATION_FAILED: NetworkManager claimed that an |
| 103 | * operation succeeded, but the object that was allegedly created (eg, |
| 104 | * #NMRemoteConnection, #NMActiveConnection) was apparently destroyed before |
| 105 | * #NMClient could create a representation of it. |
| 106 | * |
| 107 | * Describes errors that may result from operations involving a #NMClient. |
| 108 | * |
| 109 | * D-Bus operations may also return errors from other domains, including |
| 110 | * #NMManagerError, #NMSettingsError, #NMAgentManagerError, and #NMConnectionError. |
| 111 | **/ |
| 112 | typedef enum { |
| 113 | NM_CLIENT_ERROR_FAILED = 0, |
| 114 | NM_CLIENT_ERROR_MANAGER_NOT_RUNNING, |
| 115 | NM_CLIENT_ERROR_OBJECT_CREATION_FAILED, |
| 116 | } NMClientError; |
| 117 | |
| 118 | #define NM_CLIENT_ERROR nm_client_error_quark() |
| 119 | GQuark nm_client_error_quark(void); |
| 120 | |
| 121 | /* DNS stuff */ |
| 122 | |
| 123 | typedef struct NMDnsEntry NMDnsEntry; |
| 124 | |
| 125 | NM_AVAILABLE_IN_1_6 |
| 126 | GType nm_dns_entry_get_type(void); |
| 127 | NM_AVAILABLE_IN_1_6 |
| 128 | void nm_dns_entry_unref(NMDnsEntry *entry); |
| 129 | NM_AVAILABLE_IN_1_6 |
| 130 | const char *nm_dns_entry_get_interface(NMDnsEntry *entry); |
| 131 | NM_AVAILABLE_IN_1_6 |
| 132 | const char *const *nm_dns_entry_get_nameservers(NMDnsEntry *entry); |
| 133 | NM_AVAILABLE_IN_1_6 |
| 134 | const char *const *nm_dns_entry_get_domains(NMDnsEntry *entry); |
| 135 | NM_AVAILABLE_IN_1_6 |
| 136 | int nm_dns_entry_get_priority(NMDnsEntry *entry); |
| 137 | NM_AVAILABLE_IN_1_6 |
| 138 | gboolean nm_dns_entry_get_vpn(NMDnsEntry *entry); |
| 139 | |
| 140 | /** |
| 141 | * NMClient: |
| 142 | * |
| 143 | * NMClient contains a cache of the objects of NetworkManager's D-Bus API. |
| 144 | * It uses #GMainContext and #GDBusConnection for that and registers to |
| 145 | * D-Bus signals. That means, when iterating the associated #GMainContext, |
| 146 | * D-Bus signals gets processed and the #NMClient instance updates and |
| 147 | * emits #GObject signals. |
| 148 | */ |
| 149 | typedef struct _NMClientClass NMClientClass; |
| 150 | |
| 151 | GType nm_client_get_type(void); |
| 152 | |
| 153 | NMClient *nm_client_new(GCancellable *cancellable, GError **error); |
| 154 | |
| 155 | void |
| 156 | nm_client_new_async(GCancellable *cancellable, GAsyncReadyCallback callback, gpointer user_data); |
| 157 | NMClient *nm_client_new_finish(GAsyncResult *result, GError **error); |
| 158 | |
| 159 | NM_AVAILABLE_IN_1_24 |
| 160 | NMClientInstanceFlags nm_client_get_instance_flags(NMClient *self); |
| 161 | |
| 162 | NM_AVAILABLE_IN_1_22 |
| 163 | GDBusConnection *nm_client_get_dbus_connection(NMClient *client); |
| 164 | |
| 165 | NM_AVAILABLE_IN_1_22 |
| 166 | GMainContext *nm_client_get_main_context(NMClient *self); |
| 167 | |
| 168 | NM_AVAILABLE_IN_1_22 |
| 169 | GObject *nm_client_get_context_busy_watcher(NMClient *self); |
| 170 | |
| 171 | NM_AVAILABLE_IN_1_22 |
| 172 | const char *nm_client_get_dbus_name_owner(NMClient *client); |
| 173 | |
| 174 | const char *nm_client_get_version(NMClient *client); |
| 175 | NMState nm_client_get_state(NMClient *client); |
| 176 | gboolean nm_client_get_startup(NMClient *client); |
| 177 | gboolean nm_client_get_nm_running(NMClient *client); |
| 178 | |
| 179 | NMObject *nm_client_get_object_by_path(NMClient *client, const char *dbus_path); |
| 180 | |
| 181 | NM_AVAILABLE_IN_1_22 |
| 182 | NMMetered nm_client_get_metered(NMClient *client); |
| 183 | |
| 184 | gboolean nm_client_networking_get_enabled(NMClient *client); |
| 185 | |
| 186 | NM_AVAILABLE_IN_1_24 |
| 187 | const guint32 *nm_client_get_capabilities(NMClient *client, gsize *length); |
| 188 | |
| 189 | _NM_DEPRECATED_SYNC_METHOD |
| 190 | gboolean nm_client_networking_set_enabled(NMClient *client, gboolean enabled, GError **error); |
| 191 | |
| 192 | gboolean nm_client_wireless_get_enabled(NMClient *client); |
| 193 | |
| 194 | _NM_DEPRECATED_SYNC_METHOD |
| 195 | void nm_client_wireless_set_enabled(NMClient *client, gboolean enabled); |
| 196 | |
| 197 | gboolean nm_client_wireless_hardware_get_enabled(NMClient *client); |
| 198 | |
| 199 | gboolean nm_client_wwan_get_enabled(NMClient *client); |
| 200 | |
| 201 | _NM_DEPRECATED_SYNC_METHOD |
| 202 | void nm_client_wwan_set_enabled(NMClient *client, gboolean enabled); |
| 203 | |
| 204 | gboolean nm_client_wwan_hardware_get_enabled(NMClient *client); |
| 205 | |
| 206 | NM_DEPRECATED_IN_1_22 |
| 207 | gboolean nm_client_wimax_get_enabled(NMClient *client); |
| 208 | |
| 209 | NM_DEPRECATED_IN_1_22 |
| 210 | _NM_DEPRECATED_SYNC_METHOD |
| 211 | void nm_client_wimax_set_enabled(NMClient *client, gboolean enabled); |
| 212 | |
| 213 | NM_DEPRECATED_IN_1_22 |
| 214 | gboolean nm_client_wimax_hardware_get_enabled(NMClient *client); |
| 215 | |
| 216 | NM_AVAILABLE_IN_1_10 |
| 217 | gboolean nm_client_connectivity_check_get_available(NMClient *client); |
| 218 | |
| 219 | NM_AVAILABLE_IN_1_10 |
| 220 | gboolean nm_client_connectivity_check_get_enabled(NMClient *client); |
| 221 | |
| 222 | NM_AVAILABLE_IN_1_10 |
| 223 | _NM_DEPRECATED_SYNC_METHOD |
| 224 | void nm_client_connectivity_check_set_enabled(NMClient *client, gboolean enabled); |
| 225 | |
| 226 | NM_AVAILABLE_IN_1_20 |
| 227 | const char *nm_client_connectivity_check_get_uri(NMClient *client); |
| 228 | |
| 229 | _NM_DEPRECATED_SYNC_METHOD |
| 230 | gboolean nm_client_get_logging(NMClient *client, char **level, char **domains, GError **error); |
| 231 | |
| 232 | _NM_DEPRECATED_SYNC_METHOD |
| 233 | gboolean |
| 234 | nm_client_set_logging(NMClient *client, const char *level, const char *domains, GError **error); |
| 235 | |
| 236 | NMClientPermissionResult nm_client_get_permission_result(NMClient *client, |
| 237 | NMClientPermission permission); |
| 238 | |
| 239 | NM_AVAILABLE_IN_1_24 |
| 240 | NMTernary nm_client_get_permissions_state(NMClient *self); |
| 241 | |
| 242 | NMConnectivityState nm_client_get_connectivity(NMClient *client); |
| 243 | |
| 244 | _NM_DEPRECATED_SYNC_METHOD |
| 245 | NM_DEPRECATED_IN_1_22 |
| 246 | NMConnectivityState |
| 247 | nm_client_check_connectivity(NMClient *client, GCancellable *cancellable, GError **error); |
| 248 | |
| 249 | void nm_client_check_connectivity_async(NMClient *client, |
| 250 | GCancellable *cancellable, |
| 251 | GAsyncReadyCallback callback, |
| 252 | gpointer user_data); |
| 253 | NMConnectivityState |
| 254 | nm_client_check_connectivity_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 255 | |
| 256 | _NM_DEPRECATED_SYNC_METHOD |
| 257 | gboolean nm_client_save_hostname(NMClient *client, |
| 258 | const char *hostname, |
| 259 | GCancellable *cancellable, |
| 260 | GError **error); |
| 261 | |
| 262 | void nm_client_save_hostname_async(NMClient *client, |
| 263 | const char *hostname, |
| 264 | GCancellable *cancellable, |
| 265 | GAsyncReadyCallback callback, |
| 266 | gpointer user_data); |
| 267 | gboolean nm_client_save_hostname_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 268 | |
| 269 | /* Devices */ |
| 270 | |
| 271 | const GPtrArray *nm_client_get_devices(NMClient *client); |
| 272 | NM_AVAILABLE_IN_1_2 |
| 273 | const GPtrArray *nm_client_get_all_devices(NMClient *client); |
| 274 | NMDevice *nm_client_get_device_by_path(NMClient *client, const char *object_path); |
| 275 | NMDevice *nm_client_get_device_by_iface(NMClient *client, const char *iface); |
| 276 | |
| 277 | /* Active Connections */ |
| 278 | |
| 279 | const GPtrArray *nm_client_get_active_connections(NMClient *client); |
| 280 | |
| 281 | NMActiveConnection *nm_client_get_primary_connection(NMClient *client); |
| 282 | NMActiveConnection *nm_client_get_activating_connection(NMClient *client); |
| 283 | |
| 284 | void nm_client_activate_connection_async(NMClient *client, |
| 285 | NMConnection *connection, |
| 286 | NMDevice *device, |
| 287 | const char *specific_object, |
| 288 | GCancellable *cancellable, |
| 289 | GAsyncReadyCallback callback, |
| 290 | gpointer user_data); |
| 291 | NMActiveConnection * |
| 292 | nm_client_activate_connection_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 293 | |
| 294 | void nm_client_add_and_activate_connection_async(NMClient *client, |
| 295 | NMConnection *partial, |
| 296 | NMDevice *device, |
| 297 | const char *specific_object, |
| 298 | GCancellable *cancellable, |
| 299 | GAsyncReadyCallback callback, |
| 300 | gpointer user_data); |
| 301 | NMActiveConnection *nm_client_add_and_activate_connection_finish(NMClient *client, |
| 302 | GAsyncResult *result, |
| 303 | GError **error); |
| 304 | |
| 305 | NM_AVAILABLE_IN_1_16 |
| 306 | void nm_client_add_and_activate_connection2(NMClient *client, |
| 307 | NMConnection *partial, |
| 308 | NMDevice *device, |
| 309 | const char *specific_object, |
| 310 | GVariant *options, |
| 311 | GCancellable *cancellable, |
| 312 | GAsyncReadyCallback callback, |
| 313 | gpointer user_data); |
| 314 | NM_AVAILABLE_IN_1_16 |
| 315 | NMActiveConnection *nm_client_add_and_activate_connection2_finish(NMClient *client, |
| 316 | GAsyncResult *result, |
| 317 | GVariant **out_result, |
| 318 | GError **error); |
| 319 | |
| 320 | _NM_DEPRECATED_SYNC_METHOD |
| 321 | gboolean nm_client_deactivate_connection(NMClient *client, |
| 322 | NMActiveConnection *active, |
| 323 | GCancellable *cancellable, |
| 324 | GError **error); |
| 325 | |
| 326 | void nm_client_deactivate_connection_async(NMClient *client, |
| 327 | NMActiveConnection *active, |
| 328 | GCancellable *cancellable, |
| 329 | GAsyncReadyCallback callback, |
| 330 | gpointer user_data); |
| 331 | gboolean |
| 332 | nm_client_deactivate_connection_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 333 | |
| 334 | /* Connections */ |
| 335 | |
| 336 | const GPtrArray *nm_client_get_connections(NMClient *client); |
| 337 | |
| 338 | NMRemoteConnection *nm_client_get_connection_by_id(NMClient *client, const char *id); |
| 339 | NMRemoteConnection *nm_client_get_connection_by_path(NMClient *client, const char *path); |
| 340 | NMRemoteConnection *nm_client_get_connection_by_uuid(NMClient *client, const char *uuid); |
| 341 | |
| 342 | void nm_client_add_connection_async(NMClient *client, |
| 343 | NMConnection *connection, |
| 344 | gboolean save_to_disk, |
| 345 | GCancellable *cancellable, |
| 346 | GAsyncReadyCallback callback, |
| 347 | gpointer user_data); |
| 348 | NMRemoteConnection * |
| 349 | nm_client_add_connection_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 350 | |
| 351 | NM_AVAILABLE_IN_1_20 |
| 352 | void nm_client_add_connection2(NMClient *client, |
| 353 | GVariant *settings, |
| 354 | NMSettingsAddConnection2Flags flags, |
| 355 | GVariant *args, |
| 356 | gboolean ignore_out_result, |
| 357 | GCancellable *cancellable, |
| 358 | GAsyncReadyCallback callback, |
| 359 | gpointer user_data); |
| 360 | |
| 361 | NM_AVAILABLE_IN_1_20 |
| 362 | NMRemoteConnection *nm_client_add_connection2_finish(NMClient *client, |
| 363 | GAsyncResult *result, |
| 364 | GVariant **out_result, |
| 365 | GError **error); |
| 366 | |
| 367 | _NM_DEPRECATED_SYNC_METHOD |
| 368 | gboolean nm_client_load_connections(NMClient *client, |
| 369 | char **filenames, |
| 370 | char ***failures, |
| 371 | GCancellable *cancellable, |
| 372 | GError **error); |
| 373 | |
| 374 | void nm_client_load_connections_async(NMClient *client, |
| 375 | char **filenames, |
| 376 | GCancellable *cancellable, |
| 377 | GAsyncReadyCallback callback, |
| 378 | gpointer user_data); |
| 379 | gboolean nm_client_load_connections_finish(NMClient *client, |
| 380 | char ***failures, |
| 381 | GAsyncResult *result, |
| 382 | GError **error); |
| 383 | |
| 384 | _NM_DEPRECATED_SYNC_METHOD |
| 385 | gboolean nm_client_reload_connections(NMClient *client, GCancellable *cancellable, GError **error); |
| 386 | |
| 387 | void nm_client_reload_connections_async(NMClient *client, |
| 388 | GCancellable *cancellable, |
| 389 | GAsyncReadyCallback callback, |
| 390 | gpointer user_data); |
| 391 | gboolean |
| 392 | nm_client_reload_connections_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 393 | |
| 394 | NM_AVAILABLE_IN_1_6 |
| 395 | const char *nm_client_get_dns_mode(NMClient *client); |
| 396 | NM_AVAILABLE_IN_1_6 |
| 397 | const char *nm_client_get_dns_rc_manager(NMClient *client); |
| 398 | NM_AVAILABLE_IN_1_6 |
| 399 | const GPtrArray *nm_client_get_dns_configuration(NMClient *client); |
| 400 | |
| 401 | NM_AVAILABLE_IN_1_12 |
| 402 | const GPtrArray *nm_client_get_checkpoints(NMClient *client); |
| 403 | |
| 404 | NM_AVAILABLE_IN_1_12 |
| 405 | void nm_client_checkpoint_create(NMClient *client, |
| 406 | const GPtrArray *devices, |
| 407 | guint32 rollback_timeout, |
| 408 | NMCheckpointCreateFlags flags, |
| 409 | GCancellable *cancellable, |
| 410 | GAsyncReadyCallback callback, |
| 411 | gpointer user_data); |
| 412 | NM_AVAILABLE_IN_1_12 |
| 413 | NMCheckpoint * |
| 414 | nm_client_checkpoint_create_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 415 | |
| 416 | NM_AVAILABLE_IN_1_12 |
| 417 | void nm_client_checkpoint_destroy(NMClient *client, |
| 418 | const char *checkpoint_path, |
| 419 | GCancellable *cancellable, |
| 420 | GAsyncReadyCallback callback, |
| 421 | gpointer user_data); |
| 422 | NM_AVAILABLE_IN_1_12 |
| 423 | gboolean |
| 424 | nm_client_checkpoint_destroy_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 425 | |
| 426 | NM_AVAILABLE_IN_1_12 |
| 427 | void nm_client_checkpoint_rollback(NMClient *client, |
| 428 | const char *checkpoint_path, |
| 429 | GCancellable *cancellable, |
| 430 | GAsyncReadyCallback callback, |
| 431 | gpointer user_data); |
| 432 | NM_AVAILABLE_IN_1_12 |
| 433 | GHashTable * |
| 434 | nm_client_checkpoint_rollback_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 435 | |
| 436 | NM_AVAILABLE_IN_1_12 |
| 437 | void nm_client_checkpoint_adjust_rollback_timeout(NMClient *client, |
| 438 | const char *checkpoint_path, |
| 439 | guint32 add_timeout, |
| 440 | GCancellable *cancellable, |
| 441 | GAsyncReadyCallback callback, |
| 442 | gpointer user_data); |
| 443 | |
| 444 | NM_AVAILABLE_IN_1_12 |
| 445 | gboolean nm_client_checkpoint_adjust_rollback_timeout_finish(NMClient *client, |
| 446 | GAsyncResult *result, |
| 447 | GError **error); |
| 448 | |
| 449 | NM_AVAILABLE_IN_1_22 |
| 450 | void nm_client_reload(NMClient *client, |
| 451 | NMManagerReloadFlags flags, |
| 452 | GCancellable *cancellable, |
| 453 | GAsyncReadyCallback callback, |
| 454 | gpointer user_data); |
| 455 | NM_AVAILABLE_IN_1_22 |
| 456 | gboolean nm_client_reload_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 457 | |
| 458 | /*****************************************************************************/ |
| 459 | |
| 460 | NM_AVAILABLE_IN_1_24 |
| 461 | void nm_client_dbus_call(NMClient *client, |
| 462 | const char *object_path, |
| 463 | const char *interface_name, |
| 464 | const char *method_name, |
| 465 | GVariant *parameters, |
| 466 | const GVariantType *reply_type, |
| 467 | int timeout_msec, |
| 468 | GCancellable *cancellable, |
| 469 | GAsyncReadyCallback callback, |
| 470 | gpointer user_data); |
| 471 | |
| 472 | NM_AVAILABLE_IN_1_24 |
| 473 | GVariant *nm_client_dbus_call_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 474 | |
| 475 | NM_AVAILABLE_IN_1_24 |
| 476 | void nm_client_dbus_set_property(NMClient *client, |
| 477 | const char *object_path, |
| 478 | const char *interface_name, |
| 479 | const char *property_name, |
| 480 | GVariant *value, |
| 481 | int timeout_msec, |
| 482 | GCancellable *cancellable, |
| 483 | GAsyncReadyCallback callback, |
| 484 | gpointer user_data); |
| 485 | |
| 486 | NM_AVAILABLE_IN_1_24 |
| 487 | gboolean nm_client_dbus_set_property_finish(NMClient *client, GAsyncResult *result, GError **error); |
| 488 | |
| 489 | /*****************************************************************************/ |
| 490 | |
| 491 | NM_AVAILABLE_IN_1_30 |
| 492 | void nm_utils_print(int output_mode, const char *msg); |
| 493 | |
| 494 | G_END_DECLS |
| 495 | |
| 496 | #endif /* __NM_CLIENT_H__ */ |
| 497 | |