mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-22 10:08:09 +02:00
* gnome/applet/applet-dbus-devices.c, gnome/applet/applet-dbus.h, gnome/applet/applet.c, gnome/applet/applet.h: Add 'Enable Networking' option to give users ability to globally disconnect and put NM to sleep. This is useful as a 'lockdown mode' for flying, security, and clean disconnect. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1308 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
51 lines
1.6 KiB
C
51 lines
1.6 KiB
C
/* NetworkManager Wireless Applet -- Display wireless access points and allow user control
|
|
*
|
|
* Dan Williams <dcbw@redhat.com>
|
|
*
|
|
* 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
|
*
|
|
* (C) Copyright 2004 Red Hat, Inc.
|
|
*/
|
|
|
|
#ifndef APPLET_DBUS_H
|
|
#define APPLET_DBUS_H
|
|
|
|
#include <dbus/dbus.h>
|
|
#include <dbus/dbus-glib.h>
|
|
#include "NetworkManager.h"
|
|
#include "applet.h"
|
|
|
|
/* Return codes for functions that use dbus */
|
|
enum
|
|
{
|
|
RETURN_SUCCESS = 1,
|
|
RETURN_FAILURE = 0,
|
|
RETURN_NO_NM = -1
|
|
};
|
|
|
|
static inline gboolean message_is_error (DBusMessage *msg)
|
|
{
|
|
g_return_val_if_fail (msg != NULL, FALSE);
|
|
|
|
return (dbus_message_get_type (msg) == DBUS_MESSAGE_TYPE_ERROR);
|
|
}
|
|
|
|
void nmwa_dbus_init_helper (NMWirelessApplet *applet);
|
|
void nmwa_dbus_enable_wireless (NMWirelessApplet *applet, gboolean enabled);
|
|
void nmwa_dbus_enable_networking (NMWirelessApplet *applet, gboolean enabled);
|
|
void nmwa_free_gui_data_model (NMWirelessApplet *applet);
|
|
void nmwa_free_dbus_data_model (NMWirelessApplet *applet);
|
|
|
|
#endif
|