diff options
-rw-r--r-- | libnm-util/Makefile.am | 2 | ||||
-rw-r--r-- | libnm-util/libnm-util.ver | 1 | ||||
-rw-r--r-- | libnm-util/nm-util-private.c | 42 | ||||
-rw-r--r-- | libnm-util/nm-util-private.h | 53 |
4 files changed, 98 insertions, 0 deletions
diff --git a/libnm-util/Makefile.am b/libnm-util/Makefile.am index 0e99da28d7..84f4aa303d 100644 --- a/libnm-util/Makefile.am +++ b/libnm-util/Makefile.am @@ -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 diff --git a/libnm-util/libnm-util.ver b/libnm-util/libnm-util.ver index ca9b393b07..ab7c2846ca 100644 --- a/libnm-util/libnm-util.ver +++ b/libnm-util/libnm-util.ver @@ -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; diff --git a/libnm-util/nm-util-private.c b/libnm-util/nm-util-private.c new file mode 100644 index 0000000000..2b67080f69 --- /dev/null +++ b/libnm-util/nm-util-private.c @@ -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; +} diff --git a/libnm-util/nm-util-private.h b/libnm-util/nm-util-private.h new file mode 100644 index 0000000000..819faa9eba --- /dev/null +++ b/libnm-util/nm-util-private.h @@ -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 |