
A number of classes in core had their own error domains that aren't really necessary. In the case of NMDcbError, NMDhcpManagerError, NMDnsManagerError, NMDnsmasqManagerError, NMPppManagerError, and NMSessionMonitorError, most of the codes they defined weren't even being used, and at any rate, the errors were always returned into contexts where they would just have their message extracted and then get thrown away without anyone ever looking at the domain or code. So all uses of those domains can just be replaced with NM_MANAGER_ERROR_FAILED without any loss of information. NMAuthManagerError only had 1 error code, and it just indicated "something went wrong", so it can be replaced with NM_MANAGER_ERROR_FAILED without loss of information. (nm-auth-manager.c has also been fixed to return NM_MANAGER_ERROR_FAILED when the CheckAuthorization D-Bus call fails, rather than returning whatever error domain/code the D-Bus call returned.) NMVpnManagerError used 2 of its 4 error codes, and they could actually end up getting returned across D-Bus in some cases. But there are NMManagerError codes that are semantically similar enough to make the NMVpnManagerError ones unnecessary.
31 lines
1.2 KiB
C
31 lines
1.2 KiB
C
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
|
/* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program 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 General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License along
|
|
* with this program; if not, write to the Free Software Foundation, Inc.,
|
|
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
*
|
|
* Copyright (C) 2012 Red Hat, Inc.
|
|
* Author: Dan Williams <dcbw@redhat.com>
|
|
*/
|
|
|
|
#ifndef __NETWORKMANAGER_SESSION_UTILS_H__
|
|
#define __NETWORKMANAGER_SESSION_UTILS_H__
|
|
|
|
#include <glib.h>
|
|
#include <glib-object.h>
|
|
|
|
gboolean nm_session_uid_to_user (uid_t uid, const char **out_user, GError **error);
|
|
|
|
gboolean nm_session_user_to_uid (const char *user, uid_t *out_uid, GError **error);
|
|
|
|
#endif /* NM_SESSION_UTILS_H */
|