1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2007 - 2008 Novell, Inc. |
4 | * Copyright (C) 2007 - 2012 Red Hat, Inc. |
5 | */ |
6 | |
7 | #ifndef __NM_OBJECT_H__ |
8 | #define __NM_OBJECT_H__ |
9 | |
10 | #if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) |
11 | #error "Only <NetworkManager.h> can be included directly." |
12 | #endif |
13 | |
14 | #include "nm-types.h" |
15 | |
16 | G_BEGIN_DECLS |
17 | |
18 | #define NM_TYPE_OBJECT (nm_object_get_type()) |
19 | #define NM_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_OBJECT, NMObject)) |
20 | #define NM_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_OBJECT, NMObjectClass)) |
21 | #define NM_IS_OBJECT(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_OBJECT)) |
22 | #define NM_IS_OBJECT_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_OBJECT)) |
23 | #define NM_OBJECT_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_OBJECT, NMObjectClass)) |
24 | |
25 | #define NM_OBJECT_PATH "path" |
26 | #define NM_OBJECT_CLIENT "client" |
27 | |
28 | /** |
29 | * NMObject: |
30 | */ |
31 | typedef struct _NMObjectClass NMObjectClass; |
32 | |
33 | GType nm_object_get_type(void); |
34 | |
35 | const char *nm_object_get_path(NMObject *object); |
36 | |
37 | NM_AVAILABLE_IN_1_24 |
38 | NMClient *nm_object_get_client(NMObject *object); |
39 | |
40 | G_END_DECLS |
41 | |
42 | #endif /* __NM_OBJECT_H__ */ |
43 | |