1 | /* SPDX-License-Identifier: LGPL-2.1-or-later */ |
2 | /* |
3 | * Copyright (C) 2016 Atul Anand <atulhjp@gmail.com>. |
4 | */ |
5 | |
6 | #ifndef __NM_SETTING_PROXY_H__ |
7 | #define __NM_SETTING_PROXY_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 | /** |
18 | * NMSettingProxyMethod: |
19 | * @NM_SETTING_PROXY_METHOD_NONE: No Proxy for the Connection |
20 | * @NM_SETTING_PROXY_METHOD_AUTO: DHCP obtained Proxy/ Manual override |
21 | * |
22 | * The Proxy method. |
23 | * |
24 | * Since: 1.6 |
25 | */ |
26 | typedef enum { |
27 | NM_SETTING_PROXY_METHOD_NONE = 0, |
28 | NM_SETTING_PROXY_METHOD_AUTO = 1, |
29 | } NMSettingProxyMethod; |
30 | |
31 | #define NM_TYPE_SETTING_PROXY (nm_setting_proxy_get_type()) |
32 | #define NM_SETTING_PROXY(obj) \ |
33 | (G_TYPE_CHECK_INSTANCE_CAST((obj), NM_TYPE_SETTING_PROXY, NMSettingProxy)) |
34 | #define NM_SETTING_PROXY_CLASS(klass) \ |
35 | (G_TYPE_CHECK_CLASS_CAST((klass), NM_TYPE_SETTING_PROXY, NMSettingProxyClass)) |
36 | #define NM_IS_SETTING_PROXY(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), NM_TYPE_SETTING_PROXY)) |
37 | #define NM_IS_SETTING_PROXY_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), NM_TYPE_SETTING_PROXY)) |
38 | #define NM_SETTING_PROXY_GET_CLASS(obj) \ |
39 | (G_TYPE_INSTANCE_GET_CLASS((obj), NM_TYPE_SETTING_PROXY, NMSettingProxyClass)) |
40 | |
41 | #define NM_SETTING_PROXY_SETTING_NAME "proxy" |
42 | |
43 | #define NM_SETTING_PROXY_METHOD "method" |
44 | #define NM_SETTING_PROXY_BROWSER_ONLY "browser-only" |
45 | #define NM_SETTING_PROXY_PAC_URL "pac-url" |
46 | #define NM_SETTING_PROXY_PAC_SCRIPT "pac-script" |
47 | |
48 | typedef struct _NMSettingProxyClass NMSettingProxyClass; |
49 | |
50 | NM_AVAILABLE_IN_1_6 |
51 | GType nm_setting_proxy_get_type(void); |
52 | |
53 | NM_AVAILABLE_IN_1_6 |
54 | NMSetting *nm_setting_proxy_new(void); |
55 | |
56 | NM_AVAILABLE_IN_1_6 |
57 | NMSettingProxyMethod nm_setting_proxy_get_method(NMSettingProxy *setting); |
58 | NM_AVAILABLE_IN_1_6 |
59 | gboolean nm_setting_proxy_get_browser_only(NMSettingProxy *setting); |
60 | NM_AVAILABLE_IN_1_6 |
61 | const char *nm_setting_proxy_get_pac_url(NMSettingProxy *setting); |
62 | NM_AVAILABLE_IN_1_6 |
63 | const char *nm_setting_proxy_get_pac_script(NMSettingProxy *setting); |
64 | |
65 | G_END_DECLS |
66 | |
67 | #endif /* __NM_SETTING_PROXY_H__ */ |
68 | |