|
1 // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef __CUNKNOWNCONTENTHANDLER_H__ |
|
17 #define __CUNKNOWNCONTENTHANDLER_H__ |
|
18 |
|
19 // System includes |
|
20 // |
|
21 #include <e32base.h> |
|
22 #include <csmsgetdetdescinterface.h> |
|
23 #include <push/ccontenthandlerbase.h> |
|
24 |
|
25 // Local includes |
|
26 // |
|
27 |
|
28 |
|
29 // Contants |
|
30 // |
|
31 const TUid KUidPushUnknownContentHandler = { 0x101F3E60 }; |
|
32 _LIT(KUnknownContentHandlerData, "*"); |
|
33 |
|
34 // Forward class declarations |
|
35 // |
|
36 class CSmsMessage; |
|
37 class CUnknownPushMsgEntry; |
|
38 class CWapPushMsgUtils; |
|
39 class TWspPrimitiveDecoder; |
|
40 |
|
41 /** |
|
42 * CUnknownContentHandler provides the default plugin when the |
|
43 * specific plugin for a data type cannot be matched: |
|
44 */ |
|
45 //##ModelId=3B659DB203A2 |
|
46 class CUnknownContentHandler : public CContentHandlerBase |
|
47 /** |
|
48 @publishedPartner |
|
49 @released |
|
50 */ |
|
51 { |
|
52 public: |
|
53 |
|
54 static CUnknownContentHandler* NewL(); |
|
55 |
|
56 virtual ~CUnknownContentHandler(); |
|
57 |
|
58 private: // Methods from CPushHandlerBase |
|
59 |
|
60 virtual void HandleMessageL(CPushMessage* aPushMsg, TRequestStatus& aStatus); |
|
61 |
|
62 virtual void HandleMessageL(CPushMessage* aPushMsg); |
|
63 |
|
64 virtual void CancelHandleMessage(); |
|
65 |
|
66 virtual void CPushHandlerBase_Reserved1(); |
|
67 |
|
68 virtual void CPushHandlerBase_Reserved2(); |
|
69 |
|
70 private: // Methods from CActive |
|
71 |
|
72 virtual void DoCancel(); |
|
73 |
|
74 virtual void RunL(); |
|
75 |
|
76 virtual TInt RunError(TInt aError); |
|
77 |
|
78 private: |
|
79 |
|
80 CUnknownContentHandler(); |
|
81 |
|
82 void ConstructL(); |
|
83 |
|
84 void ProcessingPushMsgEntryL(); |
|
85 |
|
86 void StoreMsgL(CSmsMessage* aSmsMsg); |
|
87 |
|
88 void SaveUnknownPushMsgEntryL(); |
|
89 |
|
90 void SetUnknownPushMsgEntryFieldsL(CUnknownPushMsgEntry& aUnknownPushMsgEntry); |
|
91 |
|
92 |
|
93 TMsvId SetBioServiceIdL(); |
|
94 |
|
95 TBool BioMessageTypeL(); |
|
96 |
|
97 void SaveBioMessageEntryL(); |
|
98 |
|
99 TBool GetContentFileNameL(TFileName& aFilename); |
|
100 |
|
101 TBool DecodeWAPContentDispositionHeaderL(TFileName& aFilename, const TDesC8& aFieldValue); |
|
102 |
|
103 TBool DecodeWAPContentDispositionParameterL(TWspPrimitiveDecoder& aDecoder, TFileName& aFilename, TInt& aBytesRead); |
|
104 |
|
105 TBool DecodeWAPContentDispositionTypedParameterL(TWspPrimitiveDecoder& aDecoder, TFileName& aFilename, TInt& aBytesRead); |
|
106 |
|
107 TBool DecodeWAPContentDispositionUntypedParameterL(TWspPrimitiveDecoder& aDecoder, TFileName& aFilename, TInt& aBytesRead); |
|
108 private: |
|
109 |
|
110 TUid iBioMsgUID; |
|
111 |
|
112 CWapPushMsgUtils* iWapPushUtils; |
|
113 |
|
114 enum TState { EProcessing, EDone }; |
|
115 |
|
116 CSmsGetDetDescInterface* iSmsDetDesc; |
|
117 |
|
118 }; |
|
119 |
|
120 #endif // __CUNKNOWNCONTENTHANDLER_H__ |
|
121 |