libnm_glib.h 2.03 KB
Newer Older
1 2 3
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
/*
 * libnm_glib -- Access network status & information from glib applications
4
 *
5 6 7 8
 * 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.
9
 *
10
 * This library is distributed in the hope that it will be useful,
11
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Lesser General Public License for more details.
14
 *
15 16 17 18
 * 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.
19
 *
20 21
 * Copyright (C) 2005 - 2008 Red Hat, Inc.
 * Copyright (C) 2005 - 2008 Novell, Inc.
22 23 24 25 26
 */

#ifndef _LIB_NM_H_
#define _LIB_NM_H_

27 28
#ifndef NM_DISABLE_DEPRECATED

29 30
#include <glib.h>

31
G_BEGIN_DECLS
32

33
typedef enum libnm_glib_state
34 35 36 37 38 39
{
	LIBNM_NO_DBUS = 0,
	LIBNM_NO_NETWORKMANAGER,
	LIBNM_NO_NETWORK_CONNECTION,
	LIBNM_ACTIVE_NETWORK_CONNECTION,
	LIBNM_INVALID_CONTEXT
40
} libnm_glib_state G_GNUC_DEPRECATED;
41

42
typedef struct libnm_glib_ctx libnm_glib_ctx G_GNUC_DEPRECATED;
43

44

45
typedef void (*libnm_glib_callback_func) (libnm_glib_ctx *libnm_ctx, gpointer user_data) G_GNUC_DEPRECATED;
46 47


48 49
G_GNUC_DEPRECATED libnm_glib_ctx *  libnm_glib_init                (void);
G_GNUC_DEPRECATED void              libnm_glib_shutdown            (libnm_glib_ctx *ctx);
50

51
G_GNUC_DEPRECATED libnm_glib_state  libnm_glib_get_network_state   (const libnm_glib_ctx *ctx);
52

53 54
G_GNUC_DEPRECATED guint             libnm_glib_register_callback   (libnm_glib_ctx *ctx, libnm_glib_callback_func func, gpointer user_data, GMainContext *g_main_ctx);
G_GNUC_DEPRECATED void              libnm_glib_unregister_callback (libnm_glib_ctx *ctx, guint id);
55

56 57 58
G_END_DECLS

#endif /* NM_DISABLE_DEPRECATED */
59

60
#endif /* _LIB_NM_H_ */