1 /* |
|
2 * Copyright (c) 2002 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 * Handles wireless village settings in provisioning. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef CWPPECADAPTER_H |
|
21 #define CWPPECADAPTER_H |
|
22 |
|
23 // INCLUDES |
|
24 #include <CWPAdapter.h> |
|
25 #include <MWPContextExtension.h> |
|
26 #include "WPIMUtil.h" |
|
27 |
|
28 // FORWARD DECLARATIONS |
|
29 class CWPCharacteristic; |
|
30 class CWPIMSAPItem; |
|
31 |
|
32 |
|
33 // CLASS DECLARATION |
|
34 |
|
35 /** |
|
36 * CWPPecAdapter handles PEC settings. |
|
37 * |
|
38 * @lib WPWAPAdapter |
|
39 * @since 2.0 |
|
40 */ |
|
41 class CWPPecAdapter : public CWPAdapter, private MWPContextExtension |
|
42 { |
|
43 public: // Constructors and destructor |
|
44 |
|
45 /** |
|
46 * Two-phased constructor. |
|
47 */ |
|
48 static CWPPecAdapter* NewL(); |
|
49 |
|
50 /** |
|
51 * Destructor. |
|
52 */ |
|
53 virtual ~CWPPecAdapter(); |
|
54 |
|
55 public : // from CWPAdapter |
|
56 |
|
57 TInt ItemCount() const; |
|
58 const TDesC16& SummaryTitle(TInt aIndex) const; |
|
59 const TDesC16& SummaryText(TInt aIndex) const; |
|
60 void SaveL( TInt aItem ); |
|
61 TBool CanSetAsDefault( TInt aItem ) const; |
|
62 void SetAsDefaultL( TInt aItem ); |
|
63 TInt DetailsL( TInt aItem, MWPPairVisitor& aVisitor ); |
|
64 void VisitL(CWPCharacteristic& aElement); |
|
65 void VisitL(CWPParameter& aElement); |
|
66 void VisitLinkL(CWPCharacteristic& aLink ); |
|
67 TInt ContextExtension( MWPContextExtension*& aExtension ); |
|
68 |
|
69 public: // from MWPContextExtension |
|
70 const TDesC8& SaveDataL( TInt aIndex ) const; |
|
71 void DeleteL( const TDesC8& aSaveData ); |
|
72 TUint32 Uid() const; |
|
73 |
|
74 public: // New functions |
|
75 /** |
|
76 * C++ default constructor. |
|
77 */ |
|
78 CWPPecAdapter(); |
|
79 |
|
80 /** |
|
81 * By default Symbian 2nd phase constructor is private. |
|
82 */ |
|
83 void ConstructL(); |
|
84 |
|
85 private: |
|
86 |
|
87 void SaveL( TInt aIndex, TIMPSAccessGroup aAccessGroup ); |
|
88 |
|
89 private: // Data |
|
90 |
|
91 // The application id of the current characteristic |
|
92 TPtrC iAppID; |
|
93 |
|
94 // Current data, owns. |
|
95 TData* iCurrentData; |
|
96 |
|
97 // The settings items, owns. |
|
98 RPointerArray<TData> iDatas; |
|
99 |
|
100 // Default name for service access point, owns. |
|
101 HBufC* iDefaultName; |
|
102 |
|
103 // Title for wireless village settings, owns. |
|
104 HBufC* iWVTitle; |
|
105 |
|
106 // Id of SAP item to be set as default |
|
107 TUint32 iSAPIdForDefault; |
|
108 }; |
|
109 |
|
110 #endif // CWPPECADAPTER_H |
|
111 |
|
112 // End of File |
|