Go to
the documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042 #ifndef QNETWORKCONFIGURATION_H
00043 #define QNETWORKCONFIGURATION_H
00044
00045 #ifndef QT_MOBILITY_BEARER
00046 # include <QtCore/qglobal.h>
00047 #else
00048 # include "qmobilityglobal.h"
00049 #endif
00050
00051 #include <QtCore/qshareddata.h>
00052 #include <QtCore/qstring.h>
00053 #include <QtCore/qlist.h>
00054
00055 #if defined(Q_OS_WIN) && defined(interface)
00056 #undef interface
00057 #endif
00058
00059 QT_BEGIN_HEADER
00060
00061 #ifndef QT_MOBILITY_BEARER
00062 QT_BEGIN_NAMESPACE
00063 QT_MODULE(Network)
00064 #define QNetworkConfigurationExport Q_NETWORK_EXPORT
00065 #else
00066 QTM_BEGIN_NAMESPACE
00067 #define QNetworkConfigurationExport Q_BEARER_EXPORT
00068 #endif
00069
00070 class QNetworkConfigurationPrivate;
00071 class QNetworkConfigurationExport QNetworkConfiguration
00072 {
00073 public:
00074 QNetworkConfiguration();
00075 QNetworkConfiguration(const QNetworkConfiguration& other);
00076 QNetworkConfiguration &operator=(const QNetworkConfiguration& other);
00077 ~QNetworkConfiguration();
00078
00079 bool operator==(const QNetworkConfiguration& cp) const;
00080 inline bool operator!=(const QNetworkConfiguration& cp) const
00081 { return !operator==(cp); }
00082
00083 enum Type {
00084 InternetAccessPoint = 0,
00085 ServiceNetwork,
00086 UserChoice,
00087 Invalid
00088 };
00089
00090 enum Purpose {
00091 UnknownPurpose = 0,
00092 PublicPurpose,
00093 PrivatePurpose,
00094 ServiceSpecificPurpose
00095 };
00096
00097 enum StateFlag {
00098 Undefined = 0x0000001,
00099 Defined = 0x0000002,
00100 Discovered = 0x0000006,
00101 Active = 0x000000e
00102 };
00103
00104 Q_DECLARE_FLAGS(StateFlags, StateFlag)
00105
00106 #ifndef QT_MOBILITY_BEARER
00107 enum BearerType {
00108 BearerUnknown,
00109 BearerEthernet,
00110 BearerWLAN,
00111 Bearer2G,
00112 BearerCDMA2000,
00113 BearerWCDMA,
00114 BearerHSPA,
00115 BearerBluetooth,
00116 BearerWiMAX
00117 };
00118 #endif
00119
00120 StateFlags state() const;
00121 Type type() const;
00122 Purpose purpose() const;
00123
00124 #ifndef QT_MOBILITY_BEARER
00125 #ifdef QT_DEPRECATED
00126
00127 QT_DEPRECATED inline QString bearerName() const { return bearerTypeName(); }
00128 #endif
00129 BearerType bearerType() const;
00130 QString bearerTypeName() const;
00131 #else
00132 QString bearerName() const;
00133 #endif
00134
00135 QString identifier() const;
00136 bool isRoamingAvailable() const;
00137 QList<QNetworkConfiguration> children() const;
00138
00139 QString name() const;
00140 bool isValid() const;
00141
00142 private:
00143 friend class QNetworkConfigurationPrivate;
00144 friend class QNetworkConfigurationManager;
00145 friend class QNetworkConfigurationManagerPrivate;
00146 friend class QNetworkSessionPrivate;
00147 QExplicitlySharedDataPointer<QNetworkConfigurationPrivate> d;
00148 };
00149
00150 #ifndef QT_MOBILITY_BEARER
00151 QT_END_NAMESPACE
00152 #else
00153 QTM_END_NAMESPACE
00154 #endif
00155
00156 QT_END_HEADER
00157
00158 #endif //QNETWORKCONFIGURATION_H