mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 03:00:37 +01:00
libnm-util: add nm-util-private.h header with nm_util_get_private()
This commit is contained in:
parent
f27c01453a
commit
6f61b3b934
4 changed files with 98 additions and 0 deletions
|
|
@ -56,6 +56,7 @@ libnm_util_include_HEADERS = \
|
|||
libnm_util_la_private_headers = \
|
||||
crypto.h \
|
||||
nm-param-spec-specialized.h \
|
||||
nm-util-private.h \
|
||||
nm-utils-private.h \
|
||||
nm-setting-private.h
|
||||
|
||||
|
|
@ -90,6 +91,7 @@ libnm_util_la_csources = \
|
|||
nm-setting-wireless.c \
|
||||
nm-setting-wireless-security.c \
|
||||
nm-setting-vpn.c \
|
||||
nm-util-private.c \
|
||||
nm-utils-enum-types.c \
|
||||
nm-utils.c \
|
||||
nm-value-transforms.c
|
||||
|
|
|
|||
|
|
@ -600,6 +600,7 @@ global:
|
|||
nm_setting_wireless_security_remove_proto;
|
||||
nm_setting_wireless_security_remove_proto_by_value;
|
||||
nm_setting_wireless_security_set_wep_key;
|
||||
nm_util_get_private;
|
||||
nm_utils_ap_mode_security_valid;
|
||||
nm_utils_bin2hexstr;
|
||||
nm_utils_check_virtual_device_compatibility;
|
||||
|
|
|
|||
42
libnm-util/nm-util-private.c
Normal file
42
libnm-util/nm-util-private.c
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* (C) Copyright 2014 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#include "nm-util-private.h"
|
||||
|
||||
static const NMUtilPrivateData data = {
|
||||
};
|
||||
|
||||
/**
|
||||
* nm_util_get_private:
|
||||
*
|
||||
* Entry point for NetworkManager-internal API. Although this symbol is exported,
|
||||
* it is only useful if you have access to "nm-util-private.h", which is only
|
||||
* available inside the NetworkManager tree.
|
||||
*
|
||||
* Return value: Who knows? It's a mystery.
|
||||
*
|
||||
* Since: 0.9.10
|
||||
*/
|
||||
const NMUtilPrivateData *
|
||||
nm_util_get_private (void)
|
||||
{
|
||||
return &data;
|
||||
}
|
||||
53
libnm-util/nm-util-private.h
Normal file
53
libnm-util/nm-util-private.h
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
|
||||
/*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation; either
|
||||
* version 2 of the License, or (at your option) any later version.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the
|
||||
* Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301 USA.
|
||||
*
|
||||
* (C) Copyright 2014 Red Hat, Inc.
|
||||
*/
|
||||
|
||||
#ifndef __NM_UTIL_PRIVATE_H__
|
||||
#define __NM_UTIL_PRIVATE_H__
|
||||
|
||||
#include <glib.h>
|
||||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
typedef struct NMUtilPrivateData {
|
||||
} NMUtilPrivateData;
|
||||
|
||||
const NMUtilPrivateData *nm_util_get_private (void);
|
||||
|
||||
|
||||
/**
|
||||
* NM_UTIL_PRIVATE_CALL:
|
||||
* @call: a call to a private libnm-util function
|
||||
*
|
||||
* Used to call private libnm-util functions. Eg, if there was a
|
||||
* private function called nm_foo_get_bar(), you could call it like:
|
||||
*
|
||||
* bar = NM_UTIL_PRIVATE_CALL (nm_foo_get_bar (foo, x, y, z));
|
||||
*
|
||||
* This macro only exists inside the NetworkManager source tree and
|
||||
* is not part of the public API.
|
||||
*
|
||||
* Since: 0.9.10
|
||||
*/
|
||||
#define NM_UTIL_PRIVATE_CALL(call) (nm_util_get_private ()->call)
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Reference in a new issue