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