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 the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
24 #ifndef __CCONTENTHANDLERBASE_H__
25 #define __CCONTENTHANDLERBASE_H__
31 #include <push/cpushhandlerbase.h>
32 #include <push/pushmessage.h>
37 /** ECom interface UID for WAP Push Content Handler plug-ins. */
38 const TUid KUidPushContentHandlerBase = { 0x101F3E5E };
42 Abstract base class for WAP Push Content Handler plug-ins.
44 A WAP Push Content Handler plug-in processes a WAP Push message that contains
45 data of a specific media type. A Content Handler plug-in is loaded by a WAP Push Application
46 Handler plug-in (CPushHandlerBase-derived object), and the message is passed to handle
47 through HandleMessageL().
49 A WAP Push Content Handling plugin is implemented as an ECom plug-in object derived from
50 the CContentHandlerBase interface.
52 Each Content Handler plug-in should specify the media type that it handles. Content Handler
53 plug-ins can handle multiple media types: for example, a plug-in to handle SI messages can
54 specify it's media type as "text/vnd.wap.si||application/vnd.wap.sic".
59 class CContentHandlerBase : public CPushHandlerBase
63 inline static CContentHandlerBase* NewL(const TDesC& aMatchData);
65 inline virtual ~CContentHandlerBase();
67 inline void SetParent(TMsvId aParentID);
71 inline CContentHandlerBase();
73 inline void Complete(TInt aError);
75 inline void IdleComplete();
79 /** Parent message server entry. */
83 TInt iState; //state machine
85 /** The derived class should set this to ETrue on receiving an asynchronous request. */
89 CPushMessage* iMessage;
93 #include <push/ccontenthandlerbase.inl>
95 #endif // __CCONTENTHANDLERBASE_H__