diff --git a/src/libnm-client-impl/libnm.ver b/src/libnm-client-impl/libnm.ver index 8207ee13b6..5c7890f01b 100644 --- a/src/libnm-client-impl/libnm.ver +++ b/src/libnm-client-impl/libnm.ver @@ -1851,4 +1851,5 @@ global: nm_client_wait_shutdown_finish; nm_setting_ip_config_get_dhcp_iaid; nm_setting_ovs_interface_get_ofport_request; + nm_utils_ensure_gtypes; } libnm_1_40_0; diff --git a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.c b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.c index eeadb19c32..2d4f4406cb 100644 --- a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.c +++ b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.c @@ -2,18 +2,23 @@ #include "libnm-core-impl/nm-default-libnm-core.h" +#include "libnm-glib-aux/nm-str-buf.h" #include "libnm-core-intern/nm-meta-setting-base.h" #include "libnm-core-intern/nm-core-internal.h" #define INDENT 4 -static char * -_xml_escape_attribute(const char *value) +static const char * +_xml_escape_attr(NMStrBuf *sbuf, const char *value) { gs_free char *s = NULL; + nm_str_buf_reset(sbuf); s = g_markup_escape_text(value, -1); - return g_strdup_printf("\"%s\"", s); + nm_str_buf_append_c(sbuf, '"'); + nm_str_buf_append(sbuf, s); + nm_str_buf_append_c(sbuf, '"'); + return nm_str_buf_get_str(sbuf); } static const char * @@ -28,16 +33,54 @@ _indent_level(guint num_spaces) int main(int argc, char *argv[]) { + nm_auto_str_buf NMStrBuf sbuf1 = NM_STR_BUF_INIT(NM_UTILS_GET_NEXT_REALLOC_SIZE_1000, FALSE); const NMSettInfoSetting *sett_info_settings = nmtst_sett_info_settings(); NMMetaSettingType meta_type; + g_print("\n"); g_print("\n"); for (meta_type = 0; meta_type < _NM_META_SETTING_TYPE_NUM; meta_type++) { - const NMSettInfoSetting *sis = &sett_info_settings[meta_type]; - const NMMetaSettingInfo *msi = &nm_meta_setting_infos[meta_type]; - nm_auto_unref_gtypeclass NMSettingClass *klass = NULL; - gs_free char *tmp_s1 = NULL; - gs_free char *tmp_s2 = NULL; + const NMSettInfoSetting *sis = &sett_info_settings[meta_type]; + const NMMetaSettingInfo *msi = &nm_meta_setting_infos[meta_type]; + nm_auto_unref_gtypeclass NMSettingClass *klass = NULL; guint prop_idx; GType gtype; @@ -45,29 +88,43 @@ main(int argc, char *argv[]) klass = g_type_class_ref(gtype); g_print("%ssetting_name))); - g_print(" >\n"); + g_print(" name=%s", _xml_escape_attr(&sbuf1, msi->setting_name)); + g_print("\n%sgtype=%s", + _indent_level(INDENT + 9), + _xml_escape_attr(&sbuf1, g_type_name(gtype))); + g_print("\n%s>\n", _indent_level(INDENT + 9)); for (prop_idx = 0; prop_idx < sis->property_infos_len; prop_idx++) { - const NMSettInfoProperty *sip = &sis->property_infos[prop_idx]; - gs_free char *tmp2 = NULL; - gs_free char *tmp3 = NULL; + const NMSettInfoProperty *sip = &sis->property_infos[prop_idx]; g_print("%sname))); + g_print(" name=%s", _xml_escape_attr(&sbuf1, sip->name)); if (sip->is_deprecated) g_print("\n%sis-deprecated=\"1\"", _indent_level(2 * INDENT + 10)); + if (sip->param_spec && NM_FLAGS_HAS(sip->param_spec->flags, NM_SETTING_PARAM_SECRET)) { + g_print("\n%sis-secret=\"1\"", _indent_level(2 * INDENT + 10)); + } + if (sip->param_spec + && G_PARAM_SPEC_VALUE_TYPE(sip->param_spec) == NM_TYPE_SETTING_SECRET_FLAGS) { + g_print("\n%sis-secret-flags=\"1\"", _indent_level(2 * INDENT + 10)); + } if (sip->property_type->dbus_type) { - g_print( - "\n%sdbus-type=%s", - _indent_level(2 * INDENT + 10), - (tmp3 = _xml_escape_attribute((const char *) sip->property_type->dbus_type))); + g_print("\n%sdbus-type=%s", + _indent_level(2 * INDENT + 10), + _xml_escape_attr(&sbuf1, (const char *) sip->property_type->dbus_type)); } if (sip->dbus_deprecated) { nm_assert(sip->property_type->dbus_type); g_print("\n%sdbus-deprecated=\"1\"", _indent_level(2 * INDENT + 10)); } - g_print(" />\n"); + if (sip->param_spec) { + nm_assert(nm_streq(sip->name, sip->param_spec->name)); + g_print("\n%sgprop-type=%s", + _indent_level(2 * INDENT + 10), + _xml_escape_attr(&sbuf1, + g_type_name(G_PARAM_SPEC_VALUE_TYPE(sip->param_spec)))); + } + g_print("\n%s/>\n", _indent_level(2 * INDENT + 10)); } g_print("%s\n", _indent_level(INDENT)); diff --git a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in index dfda03ac07..3fce88347d 100644 --- a/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in +++ b/src/libnm-core-impl/gen-metadata-nm-settings-libnm-core.xml.in @@ -1,1135 +1,2306 @@ + - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="GBytes" + /> - + + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="s" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-deprecated="1" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-deprecated="1" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="as" + gprop-type="GStrv" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="u" + gprop-type="NMWepKeyType" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + is-secret="1" + dbus-type="ay" + gprop-type="GBytes" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> - + + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="s" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-deprecated="1" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="a{ss}" + gprop-type="GHashTable" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-deprecated="1" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="a{ss}" + gprop-type="GHashTable" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-deprecated="1" + /> + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="aa{sv}" + gprop-type="GPtrArray" + /> - + + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="aa{sv}" + gprop-type="GPtrArray" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="i" + gprop-type="gint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="NMSettingConnectionAutoconnectSlaves" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="NMMetered" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="u" + gprop-type="NMSettingDcbFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="u" + gprop-type="NMSettingDcbFlags" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="u" + gprop-type="NMSettingDcbFlags" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="au" + gprop-type="GArray" + /> + dbus-type="au" + gprop-type="GArray" + /> + dbus-type="u" + gprop-type="NMSettingDcbFlags" + /> + dbus-type="au" + gprop-type="GArray" + /> + dbus-type="u" + gprop-type="NMSettingDcbFlags" + /> + dbus-type="au" + gprop-type="GArray" + /> + dbus-type="au" + gprop-type="GArray" + /> + dbus-type="au" + gprop-type="GArray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-deprecated="1" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-deprecated="1" + /> + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="i" + gprop-type="gint" + /> - + + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="aa{sv}" + /> + dbus-deprecated="1" + /> + dbus-deprecated="1" + gprop-type="GPtrArray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-deprecated="1" + gprop-type="GStrv" + /> + dbus-type="as" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="aa{sv}" + /> + dbus-type="x" + gprop-type="gint64" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-deprecated="1" + gprop-type="GPtrArray" + /> + dbus-type="aa{sv}" + /> - + + dbus-type="i" + gprop-type="gint" + /> + dbus-type="aa{sv}" + /> + dbus-deprecated="1" + gprop-type="GPtrArray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-deprecated="1" + gprop-type="GStrv" + /> + dbus-type="as" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="NMSettingIP6ConfigPrivacy" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="aa{sv}" + /> + dbus-type="x" + gprop-type="gint64" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-deprecated="1" + gprop-type="GPtrArray" + /> + dbus-type="aa{sv}" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="b" + gprop-type="gboolean" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> - + + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="as" + gprop-type="GStrv" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="a{ss}" + gprop-type="GHashTable" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="y" + gprop-type="NMSettingSerialParity" + /> + dbus-type="t" + gprop-type="guint64" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="aa{sv}" + gprop-type="GPtrArray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="aa{sv}" + gprop-type="GPtrArray" + /> + dbus-type="aa{sv}" + gprop-type="GPtrArray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-deprecated="1" + /> + dbus-type="aa{sv}" + gprop-type="GPtrArray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="as" + gprop-type="GStrv" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="aa{sv}" + gprop-type="GPtrArray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="b" + gprop-type="gboolean" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> - + + dbus-type="a{ss}" + gprop-type="GHashTable" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="as" + gprop-type="GStrv" + /> + dbus-type="u" + gprop-type="NMVlanFlags" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="as" + gprop-type="GStrv" + /> + dbus-deprecated="1" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="a{ss}" + gprop-type="GHashTable" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + is-secret="1" + dbus-type="a{ss}" + gprop-type="GHashTable" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="ay" + gprop-type="GBytes" + /> + dbus-type="u" + gprop-type="guint" + /> - + + dbus-type="ay" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> - + + dbus-type="u" + gprop-type="guint" + /> + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="i" + gprop-type="NMTernary" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="b" + gprop-type="gboolean" + /> + dbus-type="aa{sv}" + /> + is-secret="1" + dbus-type="s" + gprop-type="gchararray" + /> + is-secret-flags="1" + dbus-type="u" + gprop-type="NMSettingSecretFlags" + /> - + + dbus-type="i" + gprop-type="gint" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="s" + gprop-type="gchararray" + /> + dbus-type="i" + gprop-type="gint" + /> + dbus-type="u" + gprop-type="guint" + /> + dbus-type="u" + gprop-type="guint" + /> diff --git a/src/libnm-core-impl/nm-utils.c b/src/libnm-core-impl/nm-utils.c index 6550dc38d3..7d7565a91e 100644 --- a/src/libnm-core-impl/nm-utils.c +++ b/src/libnm-core-impl/nm-utils.c @@ -5633,3 +5633,24 @@ _nm_utils_validate_dhcp_hostname_flags(NMDhcpHostnameFlags flags, int addr_famil return TRUE; } + +/*****************************************************************************/ + +/** + * nm_utils_ensure_gtypes: + * + * This ensures that all NMSetting GTypes are created. For example, + * after this call, g_type_from_name("NMSettingConnection") will work. + * + * This cannot fail and does nothing if the type already exists. + * + * Since: 1.42 + */ +void +nm_utils_ensure_gtypes(void) +{ + NMMetaSettingType meta_type; + + for (meta_type = 0; meta_type < _NM_META_SETTING_TYPE_NUM; meta_type++) + nm_meta_setting_infos[meta_type].get_setting_gtype(); +} diff --git a/src/libnm-core-public/nm-utils.h b/src/libnm-core-public/nm-utils.h index 5faed75a36..3897915567 100644 --- a/src/libnm-core-public/nm-utils.h +++ b/src/libnm-core-public/nm-utils.h @@ -250,6 +250,9 @@ NM_AVAILABLE_IN_1_16 gboolean nm_utils_base64secret_decode(const char *base64_key, gsize required_key_len, guint8 *out_key); +NM_AVAILABLE_IN_1_42 +void nm_utils_ensure_gtypes(void); + G_END_DECLS #endif /* __NM_UTILS_H__ */