|
Packit Service |
87a54e |
/* SPDX-License-Identifier: LGPL-2.1-or-later */
|
|
Packit |
5756e2 |
/*
|
|
Packit |
5756e2 |
* Copyright (C) 2007 - 2011 Red Hat, Inc.
|
|
Packit |
5756e2 |
* Copyright (C) 2007 - 2008 Novell, Inc.
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#ifndef __NM_SETTING_H__
|
|
Packit |
5756e2 |
#define __NM_SETTING_H__
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
#if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION)
|
|
Packit Service |
a1bd4f |
#error "Only <NetworkManager.h> can be included directly."
|
|
Packit |
5756e2 |
#endif
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#include "nm-core-types.h"
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
G_BEGIN_DECLS
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
#define NM_TYPE_SETTING (nm_setting_get_type())
|
|
Packit Service |
a1bd4f |
#define NM_SETTING(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING, NMSetting))
|
|
Packit Service |
a1bd4f |
#define NM_SETTING_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING, NMSettingClass))
|
|
Packit Service |
a1bd4f |
#define NM_IS_SETTING(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING))
|
|
Packit Service |
a1bd4f |
#define NM_IS_SETTING_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING))
|
|
Packit Service |
a1bd4f |
#define NM_SETTING_GET_CLASS(obj) \
|
|
Packit Service |
a1bd4f |
(G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING, NMSettingClass))
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/* The property of the #NMSetting is required for the setting to be valid */
|
|
Packit Service |
a1bd4f |
#define NM_SETTING_PARAM_REQUIRED (1 << (1 + G_PARAM_USER_SHIFT))
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/* The property of the #NMSetting is a secret */
|
|
Packit Service |
a1bd4f |
#define NM_SETTING_PARAM_SECRET (1 << (2 + G_PARAM_USER_SHIFT))
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/* The property of the #NMSetting should be ignored during comparisons that
|
|
Packit |
5756e2 |
* use the %NM_SETTING_COMPARE_FLAG_FUZZY flag.
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
#define NM_SETTING_PARAM_FUZZY_IGNORE (1 << (3 + G_PARAM_USER_SHIFT))
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/* Note: all non-glib GParamFlags bits are reserved by NetworkManager */
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#define NM_SETTING_NAME "name"
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* NMSettingSecretFlags:
|
|
Packit |
5756e2 |
* @NM_SETTING_SECRET_FLAG_NONE: the system is responsible for providing and
|
|
Packit |
5756e2 |
* storing this secret (default)
|
|
Packit |
5756e2 |
* @NM_SETTING_SECRET_FLAG_AGENT_OWNED: a user secret agent is responsible
|
|
Packit |
5756e2 |
* for providing and storing this secret; when it is required agents will be
|
|
Packit |
5756e2 |
* asked to retrieve it
|
|
Packit |
5756e2 |
* @NM_SETTING_SECRET_FLAG_NOT_SAVED: this secret should not be saved, but
|
|
Packit |
5756e2 |
* should be requested from the user each time it is needed
|
|
Packit |
5756e2 |
* @NM_SETTING_SECRET_FLAG_NOT_REQUIRED: in situations where it cannot be
|
|
Packit |
5756e2 |
* automatically determined that the secret is required (some VPNs and PPP
|
|
Packit |
5756e2 |
* providers don't require all secrets) this flag indicates that the specific
|
|
Packit |
5756e2 |
* secret is not required
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* These flags indicate specific behavior related to handling of a secret. Each
|
|
Packit |
5756e2 |
* secret has a corresponding set of these flags which indicate how the secret
|
|
Packit |
5756e2 |
* is to be stored and/or requested when it is needed.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
typedef enum { /*< flags >*/
|
|
Packit Service |
a1bd4f |
NM_SETTING_SECRET_FLAG_NONE = 0x00000000,
|
|
Packit Service |
a1bd4f |
NM_SETTING_SECRET_FLAG_AGENT_OWNED = 0x00000001,
|
|
Packit Service |
a1bd4f |
NM_SETTING_SECRET_FLAG_NOT_SAVED = 0x00000002,
|
|
Packit Service |
a1bd4f |
NM_SETTING_SECRET_FLAG_NOT_REQUIRED = 0x00000004
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
/* NOTE: if adding flags, update nm-core-internal.h as well */
|
|
Packit |
5756e2 |
} NMSettingSecretFlags;
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* NMSettingCompareFlags:
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_EXACT: match all properties exactly
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_FUZZY: match only important attributes, like SSID,
|
|
Packit |
5756e2 |
* type, security settings, etc. Does not match, for example, connection ID
|
|
Packit |
5756e2 |
* or UUID.
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_IGNORE_ID: ignore the connection's ID
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS: ignore all secrets
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS: ignore secrets for which
|
|
Packit |
5756e2 |
* the secret's flags indicate the secret is owned by a user secret agent
|
|
Packit |
5756e2 |
* (ie, the secret's flag includes @NM_SETTING_SECRET_FLAG_AGENT_OWNED)
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS: ignore secrets for which
|
|
Packit |
5756e2 |
* the secret's flags indicate the secret should not be saved to persistent
|
|
Packit |
5756e2 |
* storage (ie, the secret's flag includes @NM_SETTING_SECRET_FLAG_NOT_SAVED)
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT: if this flag is set,
|
|
Packit |
5756e2 |
* nm_setting_diff() and nm_connection_diff() will also include properties that
|
|
Packit |
5756e2 |
* are set to their default value. See also @NM_SETTING_COMPARE_FLAG_DIFF_RESULT_NO_DEFAULT.
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_DIFF_RESULT_NO_DEFAULT: if this flag is set,
|
|
Packit |
5756e2 |
* nm_setting_diff() and nm_connection_diff() will not include properties that
|
|
Packit |
5756e2 |
* are set to their default value. This is the opposite of
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT. If both flags are set together,
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT wins. If both flags are unset,
|
|
Packit |
5756e2 |
* this means to exclude default properties if there is a setting to compare,
|
|
Packit |
5756e2 |
* but include all properties, if the setting 'b' is missing. This is the legacy
|
|
Packit |
5756e2 |
* behaviour of libnm-util, where nm_setting_diff() behaved differently depending
|
|
Packit |
5756e2 |
* on whether the setting 'b' was available. If @NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT
|
|
Packit |
5756e2 |
* is set, nm_setting_diff() will also set the flags @NM_SETTING_DIFF_RESULT_IN_A_DEFAULT
|
|
Packit |
5756e2 |
* and @NM_SETTING_DIFF_RESULT_IN_B_DEFAULT, if the values are default values.
|
|
Packit |
5756e2 |
* @NM_SETTING_COMPARE_FLAG_IGNORE_TIMESTAMP: ignore the connection's timestamp
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* These flags modify the comparison behavior when comparing two settings or
|
|
Packit |
5756e2 |
* two connections.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
typedef enum {
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_EXACT = 0x00000000,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_FUZZY = 0x00000001,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_IGNORE_ID = 0x00000002,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_IGNORE_SECRETS = 0x00000004,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_IGNORE_AGENT_OWNED_SECRETS = 0x00000008,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_IGNORE_NOT_SAVED_SECRETS = 0x00000010,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT = 0x00000020,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_DIFF_RESULT_NO_DEFAULT = 0x00000040,
|
|
Packit Service |
a1bd4f |
NM_SETTING_COMPARE_FLAG_IGNORE_TIMESTAMP = 0x00000080,
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* Higher flags like 0x80000000 and 0x40000000 are used internally as private flags */
|
|
Packit |
5756e2 |
} NMSettingCompareFlags;
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* NMSettingMacRandomization:
|
|
Packit |
5756e2 |
* @NM_SETTING_MAC_RANDOMIZATION_DEFAULT: the default value, which unless
|
|
Packit |
5756e2 |
* overridden by user-controlled defaults configuration, is "never".
|
|
Packit |
5756e2 |
* @NM_SETTING_MAC_RANDOMIZATION_NEVER: the device's MAC address is always used.
|
|
Packit |
5756e2 |
* @NM_SETTING_MAC_RANDOMIZATION_ALWAYS: a random MAC address is used.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Controls if and how the MAC address of a device is randomzied.
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
typedef enum {
|
|
Packit Service |
a1bd4f |
NM_SETTING_MAC_RANDOMIZATION_DEFAULT = 0,
|
|
Packit Service |
a1bd4f |
NM_SETTING_MAC_RANDOMIZATION_NEVER,
|
|
Packit Service |
a1bd4f |
NM_SETTING_MAC_RANDOMIZATION_ALWAYS,
|
|
Packit |
5756e2 |
} NMSettingMacRandomization;
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* NMSetting:
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* The NMSetting struct contains only private data.
|
|
Packit |
5756e2 |
* It should only be accessed through the functions described below.
|
|
Packit |
5756e2 |
*/
|
|
Packit |
5756e2 |
struct _NMSetting {
|
|
Packit Service |
a1bd4f |
GObject parent;
|
|
Packit |
5756e2 |
};
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* NMSettingClearSecretsWithFlagsFn:
|
|
Packit |
5756e2 |
* @setting: The setting for which secrets are being iterated
|
|
Packit |
5756e2 |
* @secret: The secret's name
|
|
Packit |
5756e2 |
* @flags: The secret's flags, eg %NM_SETTING_SECRET_FLAG_AGENT_OWNED
|
|
Packit |
5756e2 |
* @user_data: User data passed to nm_connection_clear_secrets_with_flags()
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* Returns: %TRUE to clear the secret, %FALSE to not clear the secret
|
|
Packit |
5756e2 |
*/
|
|
Packit Service |
a1bd4f |
typedef gboolean (*NMSettingClearSecretsWithFlagsFn)(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char * secret,
|
|
Packit Service |
a1bd4f |
NMSettingSecretFlags flags,
|
|
Packit Service |
a1bd4f |
gpointer user_data);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
struct _NMMetaSettingInfo;
|
|
Packit |
5756e2 |
struct _NMSettInfoSetting;
|
|
Packit |
5756e2 |
struct _NMSettInfoProperty;
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* NMSettingValueIterFn:
|
|
Packit |
5756e2 |
* @setting: The setting for which properties are being iterated, given to
|
|
Packit |
5756e2 |
* nm_setting_enumerate_values()
|
|
Packit |
5756e2 |
* @key: The value/property name
|
|
Packit |
5756e2 |
* @value: The property's value
|
|
Packit |
5756e2 |
* @flags: The property's flags, like %NM_SETTING_PARAM_SECRET
|
|
Packit |
5756e2 |
* @user_data: User data passed to nm_setting_enumerate_values()
|
|
Packit |
5756e2 |
*/
|
|
Packit Service |
a1bd4f |
typedef void (*NMSettingValueIterFn)(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char * key,
|
|
Packit Service |
a1bd4f |
const GValue *value,
|
|
Packit Service |
a1bd4f |
GParamFlags flags,
|
|
Packit Service |
a1bd4f |
gpointer user_data);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*< private >*/
|
|
Packit Service |
a1bd4f |
typedef gboolean (*_NMConnectionForEachSecretFunc)(NMSettingSecretFlags flags, gpointer user_data);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
typedef struct {
|
|
Packit Service |
a1bd4f |
GObjectClass parent;
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* Virtual functions */
|
|
Packit Service |
a1bd4f |
int (*verify)(NMSetting *setting, NMConnection *connection, GError **error);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
gboolean (*verify_secrets)(NMSetting *setting, NMConnection *connection, GError **error);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
GPtrArray *(*need_secrets)(NMSetting *setting);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
int (*update_one_secret)(NMSetting *setting, const char *key, GVariant *value, GError **error);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
gboolean (*get_secret_flags)(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char * secret_name,
|
|
Packit Service |
a1bd4f |
NMSettingSecretFlags *out_flags,
|
|
Packit Service |
a1bd4f |
GError ** error);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
gboolean (*set_secret_flags)(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char * secret_name,
|
|
Packit Service |
a1bd4f |
NMSettingSecretFlags flags,
|
|
Packit Service |
a1bd4f |
GError ** error);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
gboolean (*clear_secrets)(const struct _NMSettInfoSetting *sett_info,
|
|
Packit Service |
a1bd4f |
guint property_idx,
|
|
Packit Service |
a1bd4f |
NMSetting * setting,
|
|
Packit Service |
a1bd4f |
NMSettingClearSecretsWithFlagsFn func,
|
|
Packit Service |
a1bd4f |
gpointer user_data);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/* compare_property() returns a ternary, where DEFAULT means that the property should not
|
|
Packit Service |
a1bd4f |
* be compared due to the compare @flags. A TRUE/FALSE result means that the property is
|
|
Packit Service |
a1bd4f |
* equal/not-equal.
|
|
Packit Service |
a1bd4f |
*
|
|
Packit Service |
a1bd4f |
* @other may be %NULL, in which case the function only determines whether
|
|
Packit Service |
a1bd4f |
* the setting should be compared (TRUE) or not (DEFAULT). */
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
NMTernary (*compare_property)(const struct _NMSettInfoSetting *sett_info,
|
|
Packit Service |
a1bd4f |
guint property_idx,
|
|
Packit Service |
a1bd4f |
NMConnection * con_a,
|
|
Packit Service |
a1bd4f |
NMSetting * set_a,
|
|
Packit Service |
a1bd4f |
NMConnection * con_b,
|
|
Packit Service |
a1bd4f |
NMSetting * set_b,
|
|
Packit Service |
a1bd4f |
NMSettingCompareFlags flags);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
void (*duplicate_copy_properties)(const struct _NMSettInfoSetting *sett_info,
|
|
Packit Service |
a1bd4f |
NMSetting * src,
|
|
Packit Service |
a1bd4f |
NMSetting * dst);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
void (*enumerate_values)(const struct _NMSettInfoProperty *property_info,
|
|
Packit Service |
a1bd4f |
NMSetting * setting,
|
|
Packit Service |
a1bd4f |
NMSettingValueIterFn func,
|
|
Packit Service |
a1bd4f |
gpointer user_data);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
gboolean (*aggregate)(NMSetting *setting, int type_i, gpointer arg);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
void (*for_each_secret)(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char * secret_name,
|
|
Packit Service |
a1bd4f |
GVariant * val,
|
|
Packit Service |
a1bd4f |
gboolean remove_non_secrets,
|
|
Packit Service |
a1bd4f |
_NMConnectionForEachSecretFunc callback,
|
|
Packit Service |
a1bd4f |
gpointer callback_data,
|
|
Packit Service |
a1bd4f |
GVariantBuilder * setting_builder);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
gboolean (*init_from_dbus)(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
GHashTable * keys,
|
|
Packit Service |
a1bd4f |
GVariant * setting_dict,
|
|
Packit Service |
a1bd4f |
GVariant * connection_dict,
|
|
Packit Service |
a1bd4f |
guint /* NMSettingParseFlags */ parse_flags,
|
|
Packit Service |
a1bd4f |
GError ** error);
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
gpointer padding[1];
|
|
Packit Service |
a1bd4f |
|
|
Packit Service |
a1bd4f |
/*< private >*/
|
|
Packit Service |
a1bd4f |
const struct _NMMetaSettingInfo *setting_info;
|
|
Packit |
5756e2 |
} NMSettingClass;
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
GType nm_setting_get_type(void);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
GType nm_setting_lookup_type(const char *name);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
NMSetting *nm_setting_duplicate(NMSetting *setting);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
const char *nm_setting_get_name(NMSetting *setting);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
gboolean nm_setting_verify(NMSetting *setting, NMConnection *connection, GError **error);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_2
|
|
Packit Service |
a1bd4f |
gboolean nm_setting_verify_secrets(NMSetting *setting, NMConnection *connection, GError **error);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
gboolean nm_setting_compare(NMSetting *a, NMSetting *b, NMSettingCompareFlags flags);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/**
|
|
Packit |
5756e2 |
* NMSettingDiffResult:
|
|
Packit |
5756e2 |
* @NM_SETTING_DIFF_RESULT_UNKNOWN: unknown result
|
|
Packit |
5756e2 |
* @NM_SETTING_DIFF_RESULT_IN_A: the property is present in setting A
|
|
Packit |
5756e2 |
* @NM_SETTING_DIFF_RESULT_IN_B: the property is present in setting B
|
|
Packit |
5756e2 |
* @NM_SETTING_DIFF_RESULT_IN_A_DEFAULT: the property is present in
|
|
Packit |
5756e2 |
* setting A but is set to the default value. This flag is only set,
|
|
Packit |
5756e2 |
* if you specify @NM_SETTING_COMPARE_FLAG_DIFF_RESULT_WITH_DEFAULT.
|
|
Packit |
5756e2 |
* @NM_SETTING_DIFF_RESULT_IN_B_DEFAULT: analog to @NM_SETTING_DIFF_RESULT_IN_A_DEFAULT.
|
|
Packit |
5756e2 |
*
|
|
Packit |
5756e2 |
* These values indicate the result of a setting difference operation.
|
|
Packit |
5756e2 |
**/
|
|
Packit |
5756e2 |
typedef enum {
|
|
Packit Service |
a1bd4f |
NM_SETTING_DIFF_RESULT_UNKNOWN = 0x00000000,
|
|
Packit Service |
a1bd4f |
NM_SETTING_DIFF_RESULT_IN_A = 0x00000001,
|
|
Packit Service |
a1bd4f |
NM_SETTING_DIFF_RESULT_IN_B = 0x00000002,
|
|
Packit Service |
a1bd4f |
NM_SETTING_DIFF_RESULT_IN_A_DEFAULT = 0x00000004,
|
|
Packit Service |
a1bd4f |
NM_SETTING_DIFF_RESULT_IN_B_DEFAULT = 0x00000008,
|
|
Packit |
5756e2 |
} NMSettingDiffResult;
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
gboolean nm_setting_diff(NMSetting * a,
|
|
Packit Service |
a1bd4f |
NMSetting * b,
|
|
Packit Service |
a1bd4f |
NMSettingCompareFlags flags,
|
|
Packit Service |
a1bd4f |
gboolean invert_results,
|
|
Packit Service |
a1bd4f |
GHashTable ** results);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
void nm_setting_enumerate_values(NMSetting *setting, NMSettingValueIterFn func, gpointer user_data);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
char *nm_setting_to_string(NMSetting *setting);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
gboolean nm_setting_get_secret_flags(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char * secret_name,
|
|
Packit Service |
a1bd4f |
NMSettingSecretFlags *out_flags,
|
|
Packit Service |
a1bd4f |
GError ** error);
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
gboolean nm_setting_set_secret_flags(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char * secret_name,
|
|
Packit Service |
a1bd4f |
NMSettingSecretFlags flags,
|
|
Packit Service |
a1bd4f |
GError ** error);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
GVariant *nm_setting_option_get(NMSetting *setting, const char *opt_name);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
gboolean
|
|
Packit Service |
a1bd4f |
nm_setting_option_get_boolean(NMSetting *setting, const char *opt_name, gboolean *out_value);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
gboolean nm_setting_option_get_uint32(NMSetting *setting, const char *opt_name, guint32 *out_value);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
void nm_setting_option_set(NMSetting *setting, const char *opt_name, GVariant *variant);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
void nm_setting_option_set_uint32(NMSetting *setting, const char *opt_name, guint32 value);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
void nm_setting_option_set_boolean(NMSetting *setting, const char *opt_name, gboolean value);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
const char *const *nm_setting_option_get_all_names(NMSetting *setting, guint *out_len);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
NM_AVAILABLE_IN_1_26
|
|
Packit Service |
a1bd4f |
void nm_setting_option_clear_by_name(NMSetting *setting, NMUtilsPredicateStr predicate);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit Service |
a1bd4f |
const GVariantType *nm_setting_get_dbus_property_type(NMSetting * setting,
|
|
Packit Service |
a1bd4f |
const char *property_name);
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
/*****************************************************************************/
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
G_END_DECLS
|
|
Packit |
5756e2 |
|
|
Packit |
5756e2 |
#endif /* __NM_SETTING_H__ */
|