QtNetwork/qnetworkconfiguration.h Source File

qnetworkconfiguration.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
4 ** Contact: http://www.qt-project.org/legal
5 **
6 ** This file is part of the QtNetwork module of the Qt Toolkit.
7 **
8 ** $QT_BEGIN_LICENSE:LGPL$
9 ** Commercial License Usage
10 ** Licensees holding valid commercial Qt licenses may use this file in
11 ** accordance with the commercial license agreement provided with the
12 ** Software or, alternatively, in accordance with the terms contained in
13 ** a written agreement between you and Digia. For licensing terms and
14 ** conditions see http://qt.digia.com/licensing. For further information
15 ** use the contact form at http://qt.digia.com/contact-us.
16 **
17 ** GNU Lesser General Public License Usage
18 ** Alternatively, this file may be used under the terms of the GNU Lesser
19 ** General Public License version 2.1 as published by the Free Software
20 ** Foundation and appearing in the file LICENSE.LGPL included in the
21 ** packaging of this file. Please review the following information to
22 ** ensure the GNU Lesser General Public License version 2.1 requirements
23 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
24 **
25 ** In addition, as a special exception, Digia gives you certain additional
26 ** rights. These rights are described in the Digia Qt LGPL Exception
27 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
28 **
29 ** GNU General Public License Usage
30 ** Alternatively, this file may be used under the terms of the GNU
31 ** General Public License version 3.0 as published by the Free Software
32 ** Foundation and appearing in the file LICENSE.GPL included in the
33 ** packaging of this file. Please review the following information to
34 ** ensure the GNU General Public License version 3.0 requirements will be
35 ** met: http://www.gnu.org/copyleft/gpl.html.
36 **
37 **
38 ** $QT_END_LICENSE$
39 **
40 ****************************************************************************/
41 
42 #ifndef QNETWORKCONFIGURATION_H
43 #define QNETWORKCONFIGURATION_H
44 
45 #ifndef QT_MOBILITY_BEARER
46 # include <QtCore/qglobal.h>
47 #else
48 # include "qmobilityglobal.h"
49 #endif
50 
51 #include <QtCore/qshareddata.h>
52 #include <QtCore/qstring.h>
53 #include <QtCore/qlist.h>
54 
55 #if defined(Q_OS_WIN) && defined(interface)
56 #undef interface
57 #endif
58 
60 
61 #ifndef QT_MOBILITY_BEARER
63 QT_MODULE(Network)
64 #define QNetworkConfigurationExport Q_NETWORK_EXPORT
65 #else
66 QTM_BEGIN_NAMESPACE
67 #define QNetworkConfigurationExport Q_BEARER_EXPORT
68 #endif
69 
70 class QNetworkConfigurationPrivate;
72 {
73 public:
76  QNetworkConfiguration &operator=(const QNetworkConfiguration &other);
78 
79  bool operator==(const QNetworkConfiguration &other) const;
80  inline bool operator!=(const QNetworkConfiguration &other) const
81  { return !operator==(other); }
82 
83  enum Type {
84  InternetAccessPoint = 0,
87  Invalid
88  };
89 
90  enum Purpose {
91  UnknownPurpose = 0,
94  ServiceSpecificPurpose
95  };
96 
97  enum StateFlag {
98  Undefined = 0x0000001,
99  Defined = 0x0000002,
100  Discovered = 0x0000006,
101  Active = 0x000000e
102  };
103  Q_DECLARE_FLAGS(StateFlags, StateFlag)
104 
105 #ifndef QT_MOBILITY_BEARER
106  enum BearerType {
115  BearerWiMAX
116  };
117 #endif
118 
119  StateFlags state() const;
120  Type type() const;
121  Purpose purpose() const;
122 
123 #ifndef QT_MOBILITY_BEARER
124 #ifdef QT_DEPRECATED
125  // Required to maintain source compatibility with Qt Mobility.
126  QT_DEPRECATED inline QString bearerName() const { return bearerTypeName(); }
127 #endif
128  BearerType bearerType() const;
129  QString bearerTypeName() const;
130 #else
131  QString bearerName() const;
132 #endif
133 
134  QString identifier() const;
135  bool isRoamingAvailable() const;
136  QList<QNetworkConfiguration> children() const;
137 
138  QString name() const;
139  bool isValid() const;
140 
141 private:
142  friend class QNetworkConfigurationPrivate;
144  friend class QNetworkConfigurationManagerPrivate;
145  friend class QNetworkSessionPrivate;
147 };
148 
149 #ifndef QT_MOBILITY_BEARER
151 #else
152 QTM_END_NAMESPACE
153 #endif
154 
156 
157 #endif // QNETWORKCONFIGURATION_H
GLuint GLuint GLsizei GLenum type
Definition: GLee.h:872
#define QNetworkConfigurationExport
#define QT_END_NAMESPACE
Definition: qglobal.h:128
bool operator!=(const QNetworkConfiguration &other) const
#define QT_BEGIN_HEADER
Definition: qglobal.h:141
bool operator==(const Attribute &cA, const AttributeInstance< type > &cB)
This operator compares the two attributes and NOT their values.
Definition: node.h:577
#define QT_BEGIN_NAMESPACE
Definition: qglobal.h:127
GLuint const GLchar * name
Definition: GLee.h:1704
#define QT_END_HEADER
Definition: qglobal.h:142