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