device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-util / nm-setting-adsl.h
1 /* -*- mode: c; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
2
3 /*
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Lesser General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12  * Lesser General Public License for more details.
13  *
14  * You should have received a copy of the GNU Lesser General Public
15  * License along with this library; if not, write to the
16  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
17  * Boston, MA 02110-1301 USA.
18  *
19  * Copyright 2007 - 2008 Red Hat, Inc.
20  */
21
22 #ifndef NM_SETTING_ADSL_H
23 #define NM_SETTING_ADSL_H
24
25 #include <nm-setting.h>
26
27 G_BEGIN_DECLS
28
29 #define NM_TYPE_SETTING_ADSL            (nm_setting_adsl_get_type ())
30 #define NM_SETTING_ADSL(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_ADSL, NMSettingAdsl))
31 #define NM_SETTING_ADSL_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_ADSL, NMSettingAdslClass))
32 #define NM_IS_SETTING_ADSL(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_ADSL))
33 #define NM_IS_SETTING_ADSL_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_ADSL))
34 #define NM_SETTING_ADSL_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_ADSL, NMSettingAdslClass))
35
36 #define NM_SETTING_ADSL_SETTING_NAME "adsl"
37
38 /**
39  * NMSettingAdslError:
40  * @NM_SETTING_ADSL_ERROR_UNKNOWN: unknown or unclassified error
41  * @NM_SETTING_ADSL_ERROR_INVALID_PROPERTY: the property was invalid
42  * @NM_SETTING_ADSL_ERROR_MISSING_PROPERTY: the property was missing and is
43  * required
44  */
45 typedef enum {
46         NM_SETTING_ADSL_ERROR_UNKNOWN = 0,              /*< nick=UnknownError >*/
47         NM_SETTING_ADSL_ERROR_INVALID_PROPERTY,         /*< nick=InvalidProperty >*/
48         NM_SETTING_ADSL_ERROR_MISSING_PROPERTY          /*< nick=MissingProperty >*/
49 } NMSettingAdslError;
50
51 #define NM_SETTING_ADSL_ERROR nm_setting_adsl_error_quark ()
52 GQuark nm_setting_adsl_error_quark (void);
53
54 #define NM_SETTING_ADSL_USERNAME            "username"
55 #define NM_SETTING_ADSL_PASSWORD            "password"
56 #define NM_SETTING_ADSL_PASSWORD_FLAGS      "password-flags"
57 #define NM_SETTING_ADSL_PROTOCOL            "protocol"
58 #define NM_SETTING_ADSL_ENCAPSULATION       "encapsulation"
59 #define NM_SETTING_ADSL_VPI                 "vpi"
60 #define NM_SETTING_ADSL_VCI                 "vci"
61
62 #define NM_SETTING_ADSL_PROTOCOL_PPPOA      "pppoa"
63 #define NM_SETTING_ADSL_PROTOCOL_PPPOE      "pppoe"
64 #define NM_SETTING_ADSL_PROTOCOL_IPOATM     "ipoatm"
65
66 #define NM_SETTING_ADSL_ENCAPSULATION_VCMUX "vcmux"
67 #define NM_SETTING_ADSL_ENCAPSULATION_LLC   "llc"
68
69 typedef struct {
70         NMSetting parent;
71 } NMSettingAdsl;
72
73 typedef struct {
74         NMSettingClass parent;
75
76         /* Padding for future expansion */
77         void (*_reserved1) (void);
78         void (*_reserved2) (void);
79         void (*_reserved3) (void);
80         void (*_reserved4) (void);
81 } NMSettingAdslClass;
82
83 GType nm_setting_adsl_get_type (void);
84
85 NMSetting  *nm_setting_adsl_new               (void);
86 const char *nm_setting_adsl_get_username      (NMSettingAdsl *setting);
87 const char *nm_setting_adsl_get_password      (NMSettingAdsl *setting);
88 const char *nm_setting_adsl_get_protocol      (NMSettingAdsl *setting);
89 const char *nm_setting_adsl_get_encapsulation (NMSettingAdsl *setting);
90 guint32     nm_setting_adsl_get_vpi           (NMSettingAdsl *setting);
91 guint32     nm_setting_adsl_get_vci           (NMSettingAdsl *setting);
92 NMSettingSecretFlags nm_setting_adsl_get_password_flags (NMSettingAdsl *setting);
93
94 G_END_DECLS
95
96 #endif /* NM_SETTING_ADSL_H */