Commit f53218ed authored by Thomas Haller's avatar Thomas Haller

cli: add property type for enum and showcase for ipv6.addr-gen-mode

parent 6ca30a61
This diff is collapsed.
......@@ -29,6 +29,16 @@ typedef enum {
NM_META_ACCESSOR_GET_TYPE_PARSABLE,
} NMMetaAccessorGetType;
typedef enum {
NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PRETTY_NUMERIC = (1LL << 0),
NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PRETTY_NUMERIC_HEX = (1LL << 1),
NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PRETTY_TEXT = (1LL << 2),
NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PRETTY_TEXT_L10N = (1LL << 3),
NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PARSABLE_NUMERIC = (1LL << 4),
NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PARSABLE_NUMERIC_HEX = (1LL << 5),
NM_META_PROPERTY_TYP_FLAG_ENUM_GET_PARSABLE_TEXT = (1LL << 6),
} NMMetaPropertyTypFlags;
typedef enum {
NM_META_PROPERTY_TYPE_MAC_MODE_DEFAULT,
NM_META_PROPERTY_TYPE_MAC_MODE_CLONED,
......@@ -86,6 +96,7 @@ struct _NMMetaPropertyTypData {
} mac;
} subtype;
const char *const*values_static;
NMMetaPropertyTypFlags typ_flags;
};
struct _NMMetaPropertyInfo {
......
......@@ -55,6 +55,14 @@ _nm_auto_unset_gvalue_impl (GValue *v)
}
#define nm_auto_unset_gvalue nm_auto(_nm_auto_unset_gvalue_impl)
static inline void
_nm_auto_unref_gtypeclass (GTypeClass **v)
{
if (v && *v)
g_type_class_unref (*v);
}
#define nm_auto_unref_gtypeclass nm_auto(_nm_auto_unref_gtypeclass)
static inline void
_nm_auto_free_gstring_impl (GString **str)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment