platform: add "nmp-plobj.[hc]"

Our naming in libnm-platform is bad.

We have NMPlatform, which is a cache of objects. Consequently we have
platform methods like nm_platform_get_link().

We also have various other types that share the NMPlatform prefix, like
NMPlatformIP4Address. For those we have nm_platform_ip4_address_to_string().

"methods" of a type should have the same prefix as the type,
and we should not have types that share the same prefix.

Also, "NMPlatformIP4Address" is a long name, and inconsistent with the
strongly related NMPObjectIP4Address.

Add new files to move and rename parts of the platform API.
This commit is contained in:
Thomas Haller 2022-09-20 12:38:03 +02:00
parent 231671fd02
commit aea053db38
No known key found for this signature in database
GPG Key ID: 29C2366E4DFC5728
4 changed files with 21 additions and 0 deletions

View File

@ -614,6 +614,8 @@ src_libnm_platform_libnm_platform_la_SOURCES = \
src/libnm-platform/nmp-netns.h \
src/libnm-platform/nmp-object.c \
src/libnm-platform/nmp-object.h \
src/libnm-platform/nmp-plobj.c \
src/libnm-platform/nmp-plobj.h \
src/libnm-platform/wifi/nm-wifi-utils-nl80211.c \
src/libnm-platform/wifi/nm-wifi-utils-nl80211.h \
src/libnm-platform/wifi/nm-wifi-utils-private.h \

View File

@ -10,6 +10,7 @@ libnm_platform = static_library(
'nmp-global-tracker.c',
'nmp-netns.c',
'nmp-object.c',
'nmp-plobj.c',
'wifi/nm-wifi-utils-nl80211.c',
'wifi/nm-wifi-utils.c',
'wpan/nm-wpan-utils.c',

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 - 2018 Red Hat, Inc.
*/
#include "libnm-glib-aux/nm-default-glib-i18n-lib.h"
#include "nmp-plobj.h"

View File

@ -0,0 +1,9 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
* Copyright (C) 2015 - 2018 Red Hat, Inc.
*/
#ifndef __NMP_PLOBJ_H__
#define __NMP_PLOBJ_H__
#endif /* __NMP_PLOBJ_H__ */