Files
NetworkManager/shared/nm-test-libnm-utils.h
Lubomir Rintel 5801f89f4d all: goodbye libnm-glib
This removes libnm-glib, libnm-glib-vpn, and libnm-util for good.
The it has been replaced with libnm since NetworkManager 1.0, disabled
by default since 1.12 and no up-to-date distributions ship it for years
now.

Removing the libraries allows us to:

* Remove the horrible hacks that were in place to deal with accidental use
  of both the new and old library in a single process.
* Relief the translators of maintenance burden of similar yet different
  strings.
* Get rid of known bad code without chances of ever getting fixed
  (libnm-glib/nm-object.c and libnm-glib/nm-object-cache.c)
* Generally lower the footprint of the releases and our workspace

If there are some really really legacy users; they can just build
libnm-glib and friends from the NetworkManager-1.16 distribution. The
D-Bus API is stable and old libnm-glib will keep working forever.

https://github.com/NetworkManager/NetworkManager/pull/308
2019-04-16 15:52:27 +02:00

85 lines
3.3 KiB
C

/* -*- 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.
*
* Copyright 2014 - 2015 Red Hat, Inc.
*/
#include "NetworkManager.h"
#include "nm-utils/nm-test-utils.h"
typedef struct {
GDBusConnection *bus;
GDBusProxy *proxy;
GPid pid;
int keepalive_fd;
} NMTstcServiceInfo;
NMTstcServiceInfo *nmtstc_service_init (void);
void nmtstc_service_cleanup (NMTstcServiceInfo *info);
NMTstcServiceInfo *nmtstc_service_available (NMTstcServiceInfo *info);
static inline void _nmtstc_auto_service_cleanup (NMTstcServiceInfo **info)
{
nmtstc_service_cleanup (g_steal_pointer (info));
}
#define nmtstc_auto_service_cleanup nm_auto(_nmtstc_auto_service_cleanup)
#define NMTSTC_SERVICE_INFO_SETUP(sinfo) \
NM_PRAGMA_WARNING_DISABLE ("-Wunused-variable") \
nmtstc_auto_service_cleanup NMTstcServiceInfo *sinfo = ({ \
NMTstcServiceInfo *_sinfo; \
\
_sinfo = nmtstc_service_init (); \
if (!nmtstc_service_available (_sinfo)) \
return; \
_sinfo; \
}); \
NM_PRAGMA_WARNING_REENABLE
NMDevice *nmtstc_service_add_device (NMTstcServiceInfo *info,
NMClient *client,
const char *method,
const char *ifname);
NMDevice * nmtstc_service_add_wired_device (NMTstcServiceInfo *sinfo,
NMClient *client,
const char *ifname,
const char *hwaddr,
const char **subchannels);
void nmtstc_service_add_connection (NMTstcServiceInfo *sinfo,
NMConnection *connection,
gboolean verify_connection,
char **out_path);
void nmtstc_service_add_connection_variant (NMTstcServiceInfo *sinfo,
GVariant *connection,
gboolean verify_connection,
char **out_path);
void nmtstc_service_update_connection (NMTstcServiceInfo *sinfo,
const char *path,
NMConnection *connection,
gboolean verify_connection);
void nmtstc_service_update_connection_variant (NMTstcServiceInfo *sinfo,
const char *path,
GVariant *connection,
gboolean verify_connection);