|
1 /* |
|
2 * Copyright (c) 2006-2008 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 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_NCDCREATEACCESSPOINTOPERATIONIMPL_H |
|
20 #define C_NCDCREATEACCESSPOINTOPERATIONIMPL_H |
|
21 |
|
22 #include "ncdbaseoperation.h" |
|
23 #include "ncdoperationobserver.h" |
|
24 #include "ncdparserobserver.h" |
|
25 |
|
26 |
|
27 class MNcdParser; |
|
28 class CNcdConfigurationProtocolClientConfigurationParser; |
|
29 |
|
30 /** |
|
31 * Operation for creating a new accesspoint |
|
32 * |
|
33 * |
|
34 * @note A new accesspoint is not created if a matching accesspoint |
|
35 * already exists |
|
36 */ |
|
37 class CNcdCreateAccessPointOperation : |
|
38 public CNcdBaseOperation, |
|
39 public MNcdParserObserver |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * NewL |
|
45 * |
|
46 */ |
|
47 static CNcdCreateAccessPointOperation* NewL( |
|
48 HBufC* aAccessPointData, |
|
49 MNcdOperationRemoveHandler& aRemoveHandler, |
|
50 CNcdGeneralManager& aGeneralManager, |
|
51 MCatalogsSession& aSession ); |
|
52 |
|
53 |
|
54 /** |
|
55 * Destructor |
|
56 */ |
|
57 ~CNcdCreateAccessPointOperation(); |
|
58 |
|
59 public: // From CNcdBaseOperation |
|
60 |
|
61 /** |
|
62 * @see CNcdBaseOperation::Cancel() |
|
63 */ |
|
64 void Cancel(); |
|
65 |
|
66 |
|
67 public: //from MNcdParserObserver |
|
68 |
|
69 /** |
|
70 * @see MNcdParserObserver |
|
71 */ |
|
72 void ParseError( TInt aErrorCode ); |
|
73 |
|
74 /** |
|
75 * @see MNcdParserObserver |
|
76 */ |
|
77 void ParseCompleteL( TInt aError ); |
|
78 |
|
79 |
|
80 protected: // From CNcdBaseOperation |
|
81 |
|
82 /** |
|
83 * @see CNcdBaseOperation::RunOperation() |
|
84 */ |
|
85 TInt RunOperation(); |
|
86 |
|
87 protected: |
|
88 |
|
89 void HandleStateL(); |
|
90 |
|
91 /** |
|
92 * Completes pending message with error code if aError != KErrNone |
|
93 * @return ETrue if aError != KErrNone |
|
94 */ |
|
95 TBool HandleError( TInt aError ); |
|
96 |
|
97 void StartParsingL(); |
|
98 |
|
99 void ParseAccessPointDataL(); |
|
100 |
|
101 protected: |
|
102 |
|
103 // Constructor |
|
104 CNcdCreateAccessPointOperation( |
|
105 MNcdOperationRemoveHandler& aRemoveHandler, |
|
106 CNcdGeneralManager& aGeneralManager, |
|
107 MCatalogsSession& aSession ); |
|
108 |
|
109 void ConstructL( HBufC* aAccessPointData ); |
|
110 |
|
111 private: |
|
112 |
|
113 MNcdParser* iParser; |
|
114 CNcdConfigurationProtocolClientConfigurationParser* iSubParser; // Not owned |
|
115 HBufC* iAccessPointData; |
|
116 TUint32 iAccessPoint; |
|
117 }; |
|
118 |
|
119 #endif // C_NCDCREATEACCESSPOINTOPERATIONIMPL_H |