libnm-core: expose internal _nm_connection_verify() function

This commit is contained in:
Thomas Haller 2017-02-28 19:34:59 +01:00
parent 72bfe62a9a
commit 8b1b6f3d1a
3 changed files with 19 additions and 21 deletions

View file

@ -73,10 +73,6 @@ enum {
static guint signals[LAST_SIGNAL] = { 0 };
static NMSettingVerifyResult _nm_connection_verify (NMConnection *connection, GError **error);
/*****************************************************************************/
static void
@ -1029,7 +1025,7 @@ nm_connection_verify (NMConnection *connection, GError **error)
return result == NM_SETTING_VERIFY_SUCCESS || result == NM_SETTING_VERIFY_NORMALIZABLE;
}
static NMSettingVerifyResult
NMSettingVerifyResult
_nm_connection_verify (NMConnection *connection, GError **error)
{
NMConnectionPrivate *priv;

View file

@ -118,6 +118,24 @@ gboolean _nm_connection_replace_settings (NMConnection *connection,
NMSettingParseFlags parse_flags,
GError **error);
/**
* NMSettingVerifyResult:
* @NM_SETTING_VERIFY_SUCCESS: the setting verifies successfully
* @NM_SETTING_VERIFY_ERROR: the setting has a serious misconfiguration
* @NM_SETTING_VERIFY_NORMALIZABLE: the setting is valid but has properties
* that should be normalized
* @NM_SETTING_VERIFY_NORMALIZABLE_ERROR: the setting is invalid but the
* errors can be fixed by nm_connection_normalize().
*/
typedef enum {
NM_SETTING_VERIFY_SUCCESS = TRUE,
NM_SETTING_VERIFY_ERROR = FALSE,
NM_SETTING_VERIFY_NORMALIZABLE = 2,
NM_SETTING_VERIFY_NORMALIZABLE_ERROR = 3,
} NMSettingVerifyResult;
NMSettingVerifyResult _nm_connection_verify (NMConnection *connection, GError **error);
NMConnection *_nm_simple_connection_new_from_dbus (GVariant *dict,
NMSettingParseFlags parse_flags,
GError **error);

View file

@ -27,22 +27,6 @@
#include "nm-core-internal.h"
/**
* NMSettingVerifyResult:
* @NM_SETTING_VERIFY_SUCCESS: the setting verifies successfully
* @NM_SETTING_VERIFY_ERROR: the setting has a serious misconfiguration
* @NM_SETTING_VERIFY_NORMALIZABLE: the setting is valid but has properties
* that should be normalized
* @NM_SETTING_VERIFY_NORMALIZABLE_ERROR: the setting is invalid but the
* errors can be fixed by nm_connection_normalize().
*/
typedef enum {
NM_SETTING_VERIFY_SUCCESS = TRUE,
NM_SETTING_VERIFY_ERROR = FALSE,
NM_SETTING_VERIFY_NORMALIZABLE = 2,
NM_SETTING_VERIFY_NORMALIZABLE_ERROR = 3,
} NMSettingVerifyResult;
void _nm_register_setting (const char *name,
const GType type,
const guint32 priority);