mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-09 03:38:09 +02:00
clients: make meta data subtypes of NMObjBaseInst
Yes, this wastes 4 times an unused GType instance in the class structure.
This commit is contained in:
parent
b8bc80bcdb
commit
343c967e66
2 changed files with 18 additions and 4 deletions
|
|
@ -129,7 +129,10 @@ typedef enum {
|
||||||
} G_STMT_END
|
} G_STMT_END
|
||||||
|
|
||||||
struct _NmcMetaGenericInfo {
|
struct _NmcMetaGenericInfo {
|
||||||
const NMMetaType *meta_type;
|
union {
|
||||||
|
NMObjBaseInst parent;
|
||||||
|
const NMMetaType *meta_type;
|
||||||
|
};
|
||||||
NmcGenericInfoType info_type;
|
NmcGenericInfoType info_type;
|
||||||
const char *name;
|
const char *name;
|
||||||
const char *name_header;
|
const char *name_header;
|
||||||
|
|
|
||||||
|
|
@ -20,6 +20,7 @@
|
||||||
#ifndef __NM_META_SETTING_DESC_H__
|
#ifndef __NM_META_SETTING_DESC_H__
|
||||||
#define __NM_META_SETTING_DESC_H__
|
#define __NM_META_SETTING_DESC_H__
|
||||||
|
|
||||||
|
#include "nm-utils/nm-obj.h"
|
||||||
#include "nm-meta-setting.h"
|
#include "nm-meta-setting.h"
|
||||||
|
|
||||||
struct _NMDevice;
|
struct _NMDevice;
|
||||||
|
|
@ -284,7 +285,10 @@ enum {
|
||||||
#define nm_meta_property_info_vpn_service_type (nm_meta_setting_infos_editor[NM_META_SETTING_TYPE_VPN].properties[_NM_META_PROPERTY_TYPE_VPN_SERVICE_TYPE])
|
#define nm_meta_property_info_vpn_service_type (nm_meta_setting_infos_editor[NM_META_SETTING_TYPE_VPN].properties[_NM_META_PROPERTY_TYPE_VPN_SERVICE_TYPE])
|
||||||
|
|
||||||
struct _NMMetaPropertyInfo {
|
struct _NMMetaPropertyInfo {
|
||||||
const NMMetaType *meta_type;
|
union {
|
||||||
|
NMObjBaseInst parent;
|
||||||
|
const NMMetaType *meta_type;
|
||||||
|
};
|
||||||
|
|
||||||
const NMMetaSettingInfoEditor *setting_info;
|
const NMMetaSettingInfoEditor *setting_info;
|
||||||
|
|
||||||
|
|
@ -316,7 +320,10 @@ typedef struct _NMMetaSettingValidPartItem {
|
||||||
} NMMetaSettingValidPartItem;
|
} NMMetaSettingValidPartItem;
|
||||||
|
|
||||||
struct _NMMetaSettingInfoEditor {
|
struct _NMMetaSettingInfoEditor {
|
||||||
const NMMetaType *meta_type;
|
union {
|
||||||
|
NMObjBaseInst parent;
|
||||||
|
const NMMetaType *meta_type;
|
||||||
|
};
|
||||||
const NMMetaSettingInfo *general;
|
const NMMetaSettingInfo *general;
|
||||||
const char *alias;
|
const char *alias;
|
||||||
const char *pretty_name;
|
const char *pretty_name;
|
||||||
|
|
@ -341,6 +348,7 @@ struct _NMMetaSettingInfoEditor {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMMetaType {
|
struct _NMMetaType {
|
||||||
|
NMObjBaseClass parent;
|
||||||
const char *type_name;
|
const char *type_name;
|
||||||
const char *(*get_name) (const NMMetaAbstractInfo *abstract_info,
|
const char *(*get_name) (const NMMetaAbstractInfo *abstract_info,
|
||||||
gboolean for_header);
|
gboolean for_header);
|
||||||
|
|
@ -364,7 +372,10 @@ struct _NMMetaType {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _NMMetaAbstractInfo {
|
struct _NMMetaAbstractInfo {
|
||||||
const NMMetaType *meta_type;
|
union {
|
||||||
|
NMObjBaseInst parent;
|
||||||
|
const NMMetaType *meta_type;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
extern const NMMetaType nm_meta_type_setting_info_editor;
|
extern const NMMetaType nm_meta_type_setting_info_editor;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue