1 /* -*- Mode: C; tab-width: 4; indent-tabs-mode: t; c-basic-offset: 4 -*- */
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.
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.
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.
19 * Copyright 2007 - 2009 Red Hat, Inc.
20 * Copyright 2007 - 2008 Novell, Inc.
23 #ifndef NM_SETTING_BLUETOOTH_H
24 #define NM_SETTING_BLUETOOTH_H
26 #include "nm-setting.h"
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))
37 #define NM_SETTING_BLUETOOTH_SETTING_NAME "bluetooth"
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
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
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;
56 #define NM_SETTING_BLUETOOTH_ERROR nm_setting_bluetooth_error_quark ()
57 GQuark nm_setting_bluetooth_error_quark (void);
59 #define NM_SETTING_BLUETOOTH_BDADDR "bdaddr"
60 #define NM_SETTING_BLUETOOTH_TYPE "type"
63 * NM_SETTING_BLUETOOTH_TYPE_DUN:
65 * Connection type describing a connection to devices that support the Bluetooth
68 #define NM_SETTING_BLUETOOTH_TYPE_DUN "dun"
71 * NM_SETTING_BLUETOOTH_TYPE_PANU:
73 * Connection type describing a connection to devices that support the Bluetooth
74 * NAP (Network Access Point) protocol, which accepts connections via PANU.
76 #define NM_SETTING_BLUETOOTH_TYPE_PANU "panu"
83 NMSettingClass parent;
85 /* Padding for future expansion */
86 void (*_reserved1) (void);
87 void (*_reserved2) (void);
88 void (*_reserved3) (void);
89 void (*_reserved4) (void);
90 } NMSettingBluetoothClass;
92 GType nm_setting_bluetooth_get_type (void);
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);
100 #endif /* NM_SETTING_BLUETOOTH_H */