1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2020 Red Hat, Inc. |
4 | */ |
5 | |
6 | #ifndef NM_SETTING_HOSTNAME_H |
7 | #define NM_SETTING_HOSTNAME_H |
8 | |
9 | #if !defined(__NETWORKMANAGER_H_INSIDE__) && !defined(NETWORKMANAGER_COMPILATION) |
10 | #error "Only <NetworkManager.h> can be included directly." |
11 | #endif |
12 | |
13 | #include "nm-setting.h" |
14 | |
15 | G_BEGIN_DECLS |
16 | |
17 | #define NM_TYPE_SETTING_HOSTNAME (nm_setting_hostname_get_type()) |
18 | #define NM_SETTING_HOSTNAME(obj) \ |
19 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_HOSTNAME, NMSettingHostname)) |
20 | #define NM_SETTING_HOSTNAME_CLASS(klass) \ |
21 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_HOSTNAME, NMSettingHostnameClass)) |
22 | #define NM_IS_SETTING_HOSTNAME(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_HOSTNAME)) |
23 | #define NM_IS_SETTING_HOSTNAME_CLASS(klass) \ |
24 | (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_HOSTNAME)) |
25 | #define NM_SETTING_HOSTNAME_GET_CLASS(obj) \ |
26 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_HOSTNAME, NMSettingHostnameClass)) |
27 | |
28 | #define NM_SETTING_HOSTNAME_SETTING_NAME "hostname" |
29 | |
30 | #define NM_SETTING_HOSTNAME_PRIORITY "priority" |
31 | #define NM_SETTING_HOSTNAME_FROM_DHCP "from-dhcp" |
32 | #define NM_SETTING_HOSTNAME_FROM_DNS_LOOKUP "from-dns-lookup" |
33 | #define NM_SETTING_HOSTNAME_ONLY_FROM_DEFAULT "only-from-default" |
34 | |
35 | typedef struct _NMSettingHostnameClass NMSettingHostnameClass; |
36 | |
37 | NM_AVAILABLE_IN_1_30 |
38 | GType nm_setting_hostname_get_type(void); |
39 | NM_AVAILABLE_IN_1_30 |
40 | NMSetting *nm_setting_hostname_new(void); |
41 | |
42 | NM_AVAILABLE_IN_1_30 |
43 | int nm_setting_hostname_get_priority(NMSettingHostname *setting); |
44 | NM_AVAILABLE_IN_1_30 |
45 | NMTernary nm_setting_hostname_get_from_dhcp(NMSettingHostname *setting); |
46 | NM_AVAILABLE_IN_1_30 |
47 | NMTernary nm_setting_hostname_get_from_dns_lookup(NMSettingHostname *setting); |
48 | NM_AVAILABLE_IN_1_30 |
49 | NMTernary nm_setting_hostname_get_only_from_default(NMSettingHostname *setting); |
50 | |
51 | G_END_DECLS |
52 | |
53 | #endif /* NM_SETTING_HOSTNAME_H */ |
54 | |