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. |
11 * |
11 * |
12 * Contributors: |
12 * Contributors: |
13 * |
13 * |
14 * Description: |
14 * Description: |
15 * Control Panel EAP plugin information |
15 * EAP UI plugin handle |
16 * |
16 * |
17 */ |
17 */ |
18 |
18 |
19 /* |
19 /* |
20 * %version: 4 % |
20 * %version: 7 % |
21 */ |
21 */ |
22 |
22 |
23 #ifndef EAPQTPLUGINHANDLE_H |
23 #ifndef EAPQTPLUGINHANDLE_H |
24 #define EAPQTPLUGINHANDLE_H |
24 #define EAPQTPLUGINHANDLE_H |
25 |
25 |
|
26 // System includes |
26 #include <qglobal.h> |
27 #include <qglobal.h> |
27 #include <QMetaType> |
28 #include <QMetaType> |
28 #include <eapqtconfigdefs.h> |
29 #include <eapqtconfigexport.h> |
29 |
30 |
|
31 // User includes |
|
32 |
|
33 // Forward declarations |
30 class EapQtExpandedEapType; |
34 class EapQtExpandedEapType; |
31 class EapQtPluginHandlePrivate; |
35 class EapQtPluginHandlePrivate; |
32 |
36 |
|
37 // External data types |
|
38 |
|
39 // Constants |
|
40 |
|
41 // Class declaration |
33 class EAP_QT_PLUGIN_INFO_EXPORT EapQtPluginHandle |
42 class EAP_QT_PLUGIN_INFO_EXPORT EapQtPluginHandle |
34 { |
43 { |
|
44 |
35 public: |
45 public: |
36 |
46 |
|
47 // Data types |
|
48 |
37 enum Plugin |
49 enum Plugin |
38 { |
50 { |
39 PluginUndefined = 0, |
51 PluginUndefined = 0, |
40 PluginEapAka, |
52 PluginEapAka, |
41 PluginEapFast, |
53 PluginEapFast, |
49 PluginPap, |
61 PluginPap, |
50 PluginPlainMschapv2, |
62 PluginPlainMschapv2, |
51 PluginLast |
63 PluginLast |
52 }; |
64 }; |
53 |
65 |
54 public: |
66 // default constructor |
|
67 EapQtPluginHandle(); |
55 |
68 |
56 EapQtPluginHandle(); |
69 // constructs an instance from an EapQtPluginHandle::Plugin value |
57 EapQtPluginHandle(Plugin id); |
70 EapQtPluginHandle(const Plugin id); |
58 EapQtPluginHandle(EapQtExpandedEapType type); // maps type to default UIDs |
71 |
59 EapQtPluginHandle(const EapQtPluginHandle& handle); |
72 // constructs an instance from an EapQtExpandedEapType object, |
60 EapQtPluginHandle(EapQtExpandedEapType type, int uid); |
73 // maps the supplied type to UIDs of default EAP protocol implementations |
|
74 EapQtPluginHandle(const EapQtExpandedEapType &type); |
|
75 |
|
76 // copy constructor |
|
77 EapQtPluginHandle(const EapQtPluginHandle &handle); |
|
78 |
|
79 // constructs an instance from an EapQtExpandedEapType object and |
|
80 // supplied EAP protocol implementation UID |
|
81 EapQtPluginHandle(const EapQtExpandedEapType &type, int uid); |
|
82 |
|
83 // destructor |
61 ~EapQtPluginHandle(); |
84 ~EapQtPluginHandle(); |
62 |
85 |
|
86 // returns EapQtExpandedEapType of the handle instance |
63 EapQtExpandedEapType type() const; |
87 EapQtExpandedEapType type() const; |
|
88 |
|
89 // returns EAP protocol implementation UID of the handle instance |
64 int protocolImplementationUid() const; |
90 int protocolImplementationUid() const; |
|
91 |
|
92 // returns EapQtPluginHandle::Plugin of the handle instance |
65 Plugin pluginId() const; |
93 Plugin pluginId() const; |
66 |
94 |
|
95 // assignment |
67 EapQtPluginHandle &operator=(const EapQtPluginHandle &handle); |
96 EapQtPluginHandle &operator=(const EapQtPluginHandle &handle); |
|
97 |
|
98 // comparisons |
68 bool operator ==(const EapQtPluginHandle &right_type_value) const; |
99 bool operator ==(const EapQtPluginHandle &right_type_value) const; |
|
100 bool operator !=(const EapQtPluginHandle &right_type_value) const; |
69 |
101 |
70 private: |
102 private: // data |
71 |
103 |
72 QScopedPointer<EapQtPluginHandlePrivate> d_ptr; |
104 QScopedPointer<EapQtPluginHandlePrivate> d_ptr; |
73 |
105 |
74 }; |
106 }; |
75 |
107 |
76 // Make the class known to QMetaType to support using QVariant |
108 // Make the class known to QMetaType to support using QVariant |
77 Q_DECLARE_METATYPE(EapQtPluginHandle) |
109 Q_DECLARE_METATYPE(EapQtPluginHandle) |
78 |
110 |
79 #endif /* EAPQTPLUGINHANDLE_H */ |
111 #endif // EAPQTPLUGINHANDLE_H |