1 /* |
1 /* |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
3 * All rights reserved. |
3 * All rights reserved. |
4 * This component and the accompanying materials are made available |
4 * This component and the accompanying materials are made available |
5 * under the terms of the License "Eclipse Public License v1.0" |
5 * under the terms of "Eclipse Public License v1.0" |
6 * which accompanies this distribution, and is available |
6 * which accompanies this distribution, and is available |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
8 * |
8 * |
9 * Initial Contributors: |
9 * Initial Contributors: |
10 * Nokia Corporation - initial contribution. |
10 * Nokia Corporation - initial contribution. |
15 * Expanded EAP type QT data structure |
15 * Expanded EAP type QT data structure |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 /* |
19 /* |
20 * %version: 2 % |
20 * %version: 5 % |
21 */ |
21 */ |
22 |
22 |
23 #ifndef EAPQTEXPANDEDEAPTYPE_H |
23 #ifndef EAPQTEXPANDEDEAPTYPE_H |
24 #define EAPQTEXPANDEDEAPTYPE_H |
24 #define EAPQTEXPANDEDEAPTYPE_H |
25 |
25 |
|
26 // System includes |
26 #include <QByteArray> |
27 #include <QByteArray> |
27 #include <QMetaType> |
28 #include <QMetaType> |
28 #include <eapqtconfigdefs.h> |
29 #include <eapqtconfigexport.h> |
29 |
30 |
|
31 // User includes |
30 |
32 |
|
33 // Forward declarations |
31 class EapQtExpandedEapTypePrivate; |
34 class EapQtExpandedEapTypePrivate; |
32 |
35 |
|
36 // External data types |
|
37 |
|
38 // Constants |
|
39 |
|
40 // Class declaration |
33 class EAP_QT_PLUGIN_INFO_EXPORT EapQtExpandedEapType |
41 class EAP_QT_PLUGIN_INFO_EXPORT EapQtExpandedEapType |
34 { |
42 { |
|
43 |
35 public: |
44 public: |
|
45 |
|
46 // Data types |
|
47 |
36 enum Type |
48 enum Type |
37 { |
49 { |
38 TypeUndefined = 0, |
50 TypeUndefined = 0, |
39 TypeEapAka, |
51 TypeEapAka, |
40 TypeEapFast, |
52 TypeEapFast, |
46 TypeEapTls, |
58 TypeEapTls, |
47 TypeEapTtls, |
59 TypeEapTtls, |
48 TypeProtectedSetup, |
60 TypeProtectedSetup, |
49 TypePap, |
61 TypePap, |
50 TypePlainMschapv2, |
62 TypePlainMschapv2, |
51 // keep this as the last one |
63 // marker for the last item |
52 TypeLast |
64 TypeLast |
53 }; |
65 }; |
54 |
66 |
|
67 // default constructor |
55 EapQtExpandedEapType(); |
68 EapQtExpandedEapType(); |
|
69 |
|
70 // constructs an instance from an EapQtExpandedEapType::Type value |
56 EapQtExpandedEapType(const Type type); |
71 EapQtExpandedEapType(const Type type); |
57 EapQtExpandedEapType(const QByteArray data); |
72 |
58 EapQtExpandedEapType(const EapQtExpandedEapType& type); |
73 // constructs an instance from expanded EAP type binary data, |
|
74 // see RFC3748 |
|
75 EapQtExpandedEapType(const QByteArray &data); |
|
76 |
|
77 // copy constructor |
|
78 EapQtExpandedEapType(const EapQtExpandedEapType &type); |
|
79 |
|
80 // destructor |
59 ~EapQtExpandedEapType(); |
81 ~EapQtExpandedEapType(); |
60 |
82 |
|
83 // returns expanded EAP type binary data, |
|
84 // see RFC3748 |
61 QByteArray eapExpandedData() const; |
85 QByteArray eapExpandedData() const; |
|
86 |
|
87 // returns EapQtExpandedEapType::Type of the instance |
62 Type type() const; |
88 Type type() const; |
63 |
89 |
|
90 // assignment |
64 EapQtExpandedEapType &operator=(const EapQtExpandedEapType &type); |
91 EapQtExpandedEapType &operator=(const EapQtExpandedEapType &type); |
|
92 |
|
93 // comparisons |
65 bool operator ==(const EapQtExpandedEapType &right_type_value) const; |
94 bool operator ==(const EapQtExpandedEapType &right_type_value) const; |
66 bool operator !=(const EapQtExpandedEapType &right_type_value) const; |
95 bool operator !=(const EapQtExpandedEapType &right_type_value) const; |
67 |
96 |
68 private: |
97 private: // data |
|
98 |
69 QScopedPointer<EapQtExpandedEapTypePrivate> d_ptr; |
99 QScopedPointer<EapQtExpandedEapTypePrivate> d_ptr; |
|
100 |
70 }; |
101 }; |
71 |
102 |
72 // Make the class known to QMetaType to support using QVariant |
103 // Make the class known to QMetaType to support using QVariant |
73 Q_DECLARE_METATYPE(EapQtExpandedEapType) |
104 Q_DECLARE_METATYPE(EapQtExpandedEapType) |
74 |
105 |
75 #endif /* EAPQTEXTENDEDEAPTYPE_H */ |
106 #endif // EAPQTEXTENDEDEAPTYPE_H |