|
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 /** |
|
17 @file |
|
18 @publishedPartner |
|
19 @released |
|
20 */ |
|
21 |
|
22 #ifndef __CCONTENTHANDLERBASE_H__ |
|
23 #define __CCONTENTHANDLERBASE_H__ |
|
24 |
|
25 // System includes |
|
26 // |
|
27 #include <e32base.h> |
|
28 #include <msvstd.h> |
|
29 #include <push/cpushhandlerbase.h> |
|
30 #include <push/pushmessage.h> |
|
31 |
|
32 |
|
33 // Constants |
|
34 // |
|
35 /** ECom interface UID for WAP Push Content Handler plug-ins. */ |
|
36 const TUid KUidPushContentHandlerBase = { 0x101F3E5E }; |
|
37 |
|
38 |
|
39 /** |
|
40 Abstract base class for WAP Push Content Handler plug-ins. |
|
41 |
|
42 A WAP Push Content Handler plug-in processes a WAP Push message that contains |
|
43 data of a specific media type. A Content Handler plug-in is loaded by a WAP Push Application |
|
44 Handler plug-in (CPushHandlerBase-derived object), and the message is passed to handle |
|
45 through HandleMessageL(). |
|
46 |
|
47 A WAP Push Content Handling plugin is implemented as an ECom plug-in object derived from |
|
48 the CContentHandlerBase interface. |
|
49 |
|
50 Each Content Handler plug-in should specify the media type that it handles. Content Handler |
|
51 plug-ins can handle multiple media types: for example, a plug-in to handle SI messages can |
|
52 specify it's media type as "text/vnd.wap.si||application/vnd.wap.sic". |
|
53 |
|
54 @publishedPartner |
|
55 @released |
|
56 */ |
|
57 class CContentHandlerBase : public CPushHandlerBase |
|
58 { |
|
59 public: |
|
60 |
|
61 inline static CContentHandlerBase* NewL(const TDesC& aMatchData); |
|
62 |
|
63 inline virtual ~CContentHandlerBase(); |
|
64 |
|
65 inline void SetParent(TMsvId aParentID); |
|
66 |
|
67 protected: // Methods |
|
68 |
|
69 inline CContentHandlerBase(); |
|
70 |
|
71 inline void Complete(TInt aError); |
|
72 |
|
73 inline void IdleComplete(); |
|
74 |
|
75 protected: |
|
76 |
|
77 /** Parent message server entry. */ |
|
78 TMsvId iParentID; |
|
79 |
|
80 /** Unused. */ |
|
81 TInt iState; //state machine |
|
82 |
|
83 /** The derived class should set this to ETrue on receiving an asynchronous request. */ |
|
84 TBool iAcknowledge; |
|
85 |
|
86 /** Unused. */ |
|
87 CPushMessage* iMessage; |
|
88 |
|
89 }; |
|
90 |
|
91 #include <push/ccontenthandlerbase.inl> |
|
92 |
|
93 #endif // __CCONTENTHANDLERBASE_H__ |
|
94 |