|
1 /* |
|
2 * Copyright (c) 2000 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: Internal header for ApplicationManagementOptions |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef __AMINSTALLOPTIONSINT_H__ |
|
20 #define __AMINSTALLOPTIONSINT_H__ |
|
21 |
|
22 |
|
23 #include <parser.h> |
|
24 |
|
25 #include <contenthandler.h> |
|
26 #include <documentparameters.h> |
|
27 #include <SWInstDefs.h> |
|
28 |
|
29 |
|
30 class CAMInstOptsParserBase : public CBase, public Xml::MContentHandler |
|
31 { |
|
32 public: |
|
33 virtual ~CAMInstOptsParserBase(); |
|
34 void ParseL(); |
|
35 protected: |
|
36 const TDesC8 &iBuffer; |
|
37 Xml::CParser *iParser ; |
|
38 TInt iCustIndex ; |
|
39 SwiUI::TPolicy iDefaultPolicy; |
|
40 |
|
41 CAMInstOptsParserBase( |
|
42 const TDesC8 &aBuffer, |
|
43 SwiUI::TPolicy aDefaultPolicy = SwiUI::EPolicyUserConfirm |
|
44 ) : iBuffer( aBuffer ), iCustIndex(-1), iDefaultPolicy ( aDefaultPolicy ) |
|
45 { |
|
46 |
|
47 } |
|
48 |
|
49 void SetPolicyValue( SwiUI::TPolicy &aPolicy, const TDesC8& aValue ) const; |
|
50 void ConstructL(); |
|
51 |
|
52 |
|
53 virtual void OnStartDocumentL(const Xml::RDocumentParameters& aDocParam, TInt aErrorCode); |
|
54 virtual void OnEndDocumentL(TInt aErrorCode); |
|
55 virtual void OnStartElementL(const Xml::RTagInfo& aElement, const Xml::RAttributeArray& aAttributes, TInt aErrorCode); |
|
56 virtual void OnEndElementL(const Xml::RTagInfo& aElement, TInt aErrorCode); |
|
57 virtual void OnContentL(const TDesC8& aBytes, TInt aErrorCode); |
|
58 virtual void OnStartPrefixMappingL(const RString& aPrefix, const RString& aUri, TInt aErrorCode); |
|
59 virtual void OnEndPrefixMappingL(const RString& aPrefix, TInt aErrorCode); |
|
60 virtual void OnIgnorableWhiteSpaceL(const TDesC8& aBytes, TInt aErrorCode); |
|
61 virtual void OnSkippedEntityL(const RString& aName, TInt aErrorCode); |
|
62 virtual void OnProcessingInstructionL(const TDesC8& aTarget, const TDesC8& aData, TInt aErrorCode); |
|
63 virtual void OnError(TInt aErrorCode); |
|
64 TAny* GetExtendedInterface(const TInt32 aUid); |
|
65 |
|
66 }; |
|
67 |
|
68 class CAMInstOptsParser : public CAMInstOptsParserBase//, public Xml::MContentHandler |
|
69 { |
|
70 //SwiUI::TInstallOptions &iResult; |
|
71 NApplicationManagement::TAMInstallOptions &iResult; |
|
72 |
|
73 //void ParseL(); |
|
74 public: |
|
75 |
|
76 |
|
77 static CAMInstOptsParser * NewL( const TDesC8 &aBuffer, NApplicationManagement::TAMInstallOptions &aResult ); |
|
78 static CAMInstOptsParser * NewLC( const TDesC8 &aBuffer, NApplicationManagement::TAMInstallOptions &aResult ); |
|
79 |
|
80 CAMInstOptsParser( const TDesC8 &aBuffer, NApplicationManagement::TAMInstallOptions &aResult ) |
|
81 : CAMInstOptsParserBase ( aBuffer ), iResult( aResult ) |
|
82 { |
|
83 |
|
84 } |
|
85 |
|
86 virtual ~CAMInstOptsParser(); |
|
87 |
|
88 void OnStartElementL(const Xml::RTagInfo& aElement, const Xml::RAttributeArray& aAttributes, TInt aErrorCode); |
|
89 private: |
|
90 }; |
|
91 |
|
92 class CAMUninstOptsParser : public CAMInstOptsParserBase |
|
93 { |
|
94 SwiUI::TUninstallOptions &iResult; |
|
95 public: |
|
96 static CAMUninstOptsParser * NewL( const TDesC8 &aBuffer, SwiUI::TUninstallOptions &aResult ); |
|
97 static CAMUninstOptsParser * NewLC( const TDesC8 &aBuffer, SwiUI::TUninstallOptions &aResult ); |
|
98 |
|
99 CAMUninstOptsParser( const TDesC8 &aBuffer, SwiUI::TUninstallOptions &aResult ) |
|
100 : CAMInstOptsParserBase( aBuffer ), iResult( aResult ) |
|
101 { |
|
102 |
|
103 } |
|
104 virtual ~CAMUninstOptsParser(); |
|
105 |
|
106 void OnStartElementL(const Xml::RTagInfo& aElement, const Xml::RAttributeArray& aAttributes, TInt aErrorCode); |
|
107 private: |
|
108 }; |
|
109 |
|
110 #endif // __AMINSTALLOPTIONSINT_H__ |
|
111 |
|
112 // End of File |