device: renew dhcp leases on awake for software devices
[NetworkManager.git] / libnm-util / nm-setting-bluetooth.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 - 2009 Red Hat, Inc.
20  * Copyright 2007 - 2008 Novell, Inc.
21  */
22
23 #ifndef NM_SETTING_BLUETOOTH_H
24 #define NM_SETTING_BLUETOOTH_H
25
26 #include "nm-setting.h"
27
28 G_BEGIN_DECLS
29
30 #define NM_TYPE_SETTING_BLUETOOTH            (nm_setting_bluetooth_get_type ())
31 #define NM_SETTING_BLUETOOTH(obj)            (G_TYPE_CHECK_INSTANCE_CAST ((obj), NM_TYPE_SETTING_BLUETOOTH, NMSettingBluetooth))
32 #define NM_SETTING_BLUETOOTH_CLASS(klass)    (G_TYPE_CHECK_CLASS_CAST ((klass), NM_TYPE_SETTING_BLUETOOTH, NMSettingBluetoothClass))
33 #define NM_IS_SETTING_BLUETOOTH(obj)         (G_TYPE_CHECK_INSTANCE_TYPE ((obj), NM_TYPE_SETTING_BLUETOOTH))
34 #define NM_IS_SETTING_BLUETOOTH_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), NM_TYPE_SETTING_BLUETOOTH))
35 #define NM_SETTING_BLUETOOTH_GET_CLASS(obj)  (G_TYPE_INSTANCE_GET_CLASS ((obj), NM_TYPE_SETTING_BLUETOOTH, NMSettingBluetoothClass))
36
37 #define NM_SETTING_BLUETOOTH_SETTING_NAME "bluetooth"
38
39 /**
40  * NMSettingBluetoothError:
41  * @NM_SETTING_BLUETOOTH_ERROR_UNKNOWN: unknown or unclassified error
42  * @NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY: the property was invalid
43  * @NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY: the property was missing and is
44  * required
45  * @NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND: the connection
46  * did not contain a required type setting, ie for DUN connections the connection
47  * must also contain an #NMSettingGsm or #NMSettingCdma as appropriate
48  */
49 typedef enum {
50         NM_SETTING_BLUETOOTH_ERROR_UNKNOWN = 0,            /*< nick=UnknownError >*/
51         NM_SETTING_BLUETOOTH_ERROR_INVALID_PROPERTY,       /*< nick=InvalidProperty >*/
52         NM_SETTING_BLUETOOTH_ERROR_MISSING_PROPERTY,       /*< nick=MissingProperty >*/
53         NM_SETTING_BLUETOOTH_ERROR_TYPE_SETTING_NOT_FOUND, /*< nick=TypeSettingNotFound >*/
54 } NMSettingBluetoothError;
55
56 #define NM_SETTING_BLUETOOTH_ERROR nm_setting_bluetooth_error_quark ()
57 GQuark nm_setting_bluetooth_error_quark (void);
58
59 #define NM_SETTING_BLUETOOTH_BDADDR    "bdaddr"
60 #define NM_SETTING_BLUETOOTH_TYPE      "type"
61
62 /**
63  * NM_SETTING_BLUETOOTH_TYPE_DUN:
64  *
65  * Connection type describing a connection to devices that support the Bluetooth
66  * DUN profile.
67  */
68 #define NM_SETTING_BLUETOOTH_TYPE_DUN  "dun"
69
70 /**
71  * NM_SETTING_BLUETOOTH_TYPE_PANU:
72  *
73  * Connection type describing a connection to devices that support the Bluetooth
74  * NAP (Network Access Point) protocol, which accepts connections via PANU.
75  */
76 #define NM_SETTING_BLUETOOTH_TYPE_PANU "panu"
77
78 typedef struct {
79         NMSetting parent;
80 } NMSettingBluetooth;
81
82 typedef struct {
83         NMSettingClass parent;
84
85         /* Padding for future expansion */
86         void (*_reserved1) (void);
87         void (*_reserved2) (void);
88         void (*_reserved3) (void);
89         void (*_reserved4) (void);
90 } NMSettingBluetoothClass;
91
92 GType nm_setting_bluetooth_get_type (void);
93
94 NMSetting *       nm_setting_bluetooth_new                 (void);
95 const GByteArray *nm_setting_bluetooth_get_bdaddr          (NMSettingBluetooth *setting);
96 const char *      nm_setting_bluetooth_get_connection_type (NMSettingBluetooth *setting);
97
98 G_END_DECLS
99
100 #endif /* NM_SETTING_BLUETOOTH_H */