mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-02-05 00:40:32 +01:00
core: add header for NM object types
Helps prevent #include loops when two objects need each other's headers, like NMActiveConnection and NMDevice.
This commit is contained in:
parent
cfb391952d
commit
7a3c53e8ff
3 changed files with 30 additions and 2 deletions
|
|
@ -114,6 +114,7 @@ libtest_wifi_ap_utils_la_LIBADD = \
|
|||
sbin_PROGRAMS = NetworkManager
|
||||
|
||||
NetworkManager_SOURCES = \
|
||||
nm-types.h \
|
||||
nm-call-store.c \
|
||||
nm-call-store.h \
|
||||
nm-device.c \
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@
|
|||
#include <netinet/in.h>
|
||||
|
||||
#include "NetworkManager.h"
|
||||
#include "nm-types.h"
|
||||
#include "nm-activation-request.h"
|
||||
#include "nm-ip4-config.h"
|
||||
#include "nm-ip6-config.h"
|
||||
|
|
@ -84,9 +85,9 @@ typedef enum {
|
|||
NM_DEVICE_ERROR_NOT_ACTIVE, /*< nick=NotActive >*/
|
||||
} NMDeviceError;
|
||||
|
||||
typedef struct {
|
||||
struct _NMDevice {
|
||||
GObject parent;
|
||||
} NMDevice;
|
||||
};
|
||||
|
||||
typedef struct {
|
||||
GObjectClass parent;
|
||||
|
|
|
|||
26
src/nm-types.h
Normal file
26
src/nm-types.h
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
|
||||
/* NetworkManager -- Network link manager
|
||||
*
|
||||
* 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.
|
||||
*/
|
||||
|
||||
#ifndef NM_TYPES_H
|
||||
#define NM_TYPES_H
|
||||
|
||||
typedef struct _NMDevice NMDevice;
|
||||
|
||||
#endif /* NM_TYPES_H */
|
||||
Loading…
Add table
Reference in a new issue