~ubuntu-branches/ubuntu/oneiric/knetworkmanager/oneiric

« back to all changes in this revision

Viewing changes to knetworkmanager/src/knetworkmanager-wireless_network.h

  • Committer: Bazaar Package Importer
  • Author(s): Jonathan Riddell
  • Date: 2008-07-14 14:05:44 UTC
  • mfrom: (1.2.6 upstream)
  • Revision ID: james.westby@ubuntu.com-20080714140544-yjhxgrdwartk3kx7
Tags: 1:0.7svn830754-0ubuntu1
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/***************************************************************************
 
2
 *
 
3
 * knetworkmanager-wireless_network.h - A NetworkManager frontend for KDE 
 
4
 *
 
5
 * Copyright (C) 2005, 2006 Novell, Inc.
 
6
 *
 
7
 * Author: Helmut Schaa <hschaa@suse.de>, <Helmut.Schaa@gmx.de>
 
8
 *
 
9
 * This program is free software; you can redistribute it and/or modify
 
10
 * it under the terms of the GNU General Public License as published by
 
11
 * the Free Software Foundation; either version 2 of the License, or
 
12
 * (at your option) any later version.
 
13
 *
 
14
 * This program is distributed in the hope that it will be useful,
 
15
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 
16
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
17
 * GNU General Public License for more details.
 
18
 *
 
19
 * You should have received a copy of the GNU General Public License
 
20
 * along with this program; if not, write to the Free Software
 
21
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
22
 *
 
23
 **************************************************************************/
 
24
 
 
25
#ifndef KNETWORKMANAGER_WIRELESS_NETWORK_H
 
26
#define KNETWORKMANAGER_WIRELESS_NETWORK_H
 
27
 
 
28
#include "knetworkmanager.h"
 
29
#include "knetworkmanager-device.h"
 
30
 
 
31
#include <stdint.h>
 
32
 
 
33
class KNetworkManager;
 
34
class AccessPoint;
 
35
class WirelessNetworkPrivate;
 
36
 
 
37
namespace ConnectionSettings
 
38
{
 
39
        class WirelessConnection;
 
40
}
 
41
 
 
42
/*
 
43
        A wireless network represents multiple accesspoints
 
44
        that share the same essid and security-caps
 
45
*/
 
46
class WirelessNetwork
 
47
{
 
48
        public:
 
49
                // bitwise encoded enum
 
50
                // allows the specification on how multiple APs get grouped together
 
51
                enum MATCH_ATTRIBUTES
 
52
                {
 
53
                        // only match APs with the same ssid
 
54
                        MATCH_SSID = 1
 
55
                };
 
56
 
 
57
                WirelessNetwork(const WirelessNetwork& other);
 
58
                WirelessNetwork (Q_UINT32 match = MATCH_SSID);
 
59
                ~WirelessNetwork ();
 
60
 
 
61
                WirelessNetwork& operator= (const WirelessNetwork&);
 
62
 
 
63
                // check if the AccessPoint represents the same net
 
64
                bool contains(const AccessPoint * const);
 
65
 
 
66
                // add an AP to the Network
 
67
                bool       addAP(const AccessPoint * const);
 
68
 
 
69
                // combined flags of all APs
 
70
                Q_UINT32   getFlags() const;
 
71
 
 
72
                // combined wpa-flags of all APs
 
73
                Q_UINT32   getWpaFlags() const;
 
74
 
 
75
                // combined rsn-flags of all APs
 
76
                Q_UINT32   getRsnFlags() const;
 
77
 
 
78
                // ssid of all APs
 
79
                const QByteArray getSsid() const; 
 
80
 
 
81
                QString    getDisplaySsid() const;
 
82
                bool       isEncrypted() const;
 
83
 
 
84
                // strength of the best AP
 
85
                Q_UINT8    getStrength() const;
 
86
 
 
87
                void       setActive(bool active);
 
88
                bool       getActive() const;
 
89
 
 
90
                bool operator==(const WirelessNetwork&);
 
91
 
 
92
        private:
 
93
          WirelessNetworkPrivate * d;
 
94
};
 
95
 
 
96
#endif /* KNETWORKMANAGER_WIRELESS_NETWORK_H */