williamr@2: // Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). williamr@2: // All rights reserved. williamr@2: // This component and the accompanying materials are made available williamr@2: // 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 williamr@2: // which accompanies this distribution, and is available williamr@2: // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". williamr@2: // williamr@2: // Initial Contributors: williamr@2: // Nokia Corporation - initial contribution. williamr@2: // williamr@2: // Contributors: williamr@2: // williamr@2: // Description: williamr@2: // williamr@2: williamr@2: williamr@2: williamr@2: /** williamr@2: @file williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: williamr@2: #ifndef __CCONTENTHANDLERBASE_H__ williamr@2: #define __CCONTENTHANDLERBASE_H__ williamr@2: williamr@2: // System includes williamr@2: // williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: williamr@2: // Constants williamr@2: // williamr@2: /** ECom interface UID for WAP Push Content Handler plug-ins. */ williamr@2: const TUid KUidPushContentHandlerBase = { 0x101F3E5E }; williamr@2: williamr@2: williamr@2: /** williamr@2: Abstract base class for WAP Push Content Handler plug-ins. williamr@2: williamr@2: A WAP Push Content Handler plug-in processes a WAP Push message that contains williamr@2: data of a specific media type. A Content Handler plug-in is loaded by a WAP Push Application williamr@2: Handler plug-in (CPushHandlerBase-derived object), and the message is passed to handle williamr@2: through HandleMessageL(). williamr@2: williamr@2: A WAP Push Content Handling plugin is implemented as an ECom plug-in object derived from williamr@2: the CContentHandlerBase interface. williamr@2: williamr@2: Each Content Handler plug-in should specify the media type that it handles. Content Handler williamr@2: plug-ins can handle multiple media types: for example, a plug-in to handle SI messages can williamr@2: specify it's media type as "text/vnd.wap.si||application/vnd.wap.sic". williamr@2: williamr@2: @publishedPartner williamr@2: @released williamr@2: */ williamr@2: class CContentHandlerBase : public CPushHandlerBase williamr@2: { williamr@2: public: williamr@2: williamr@2: inline static CContentHandlerBase* NewL(const TDesC& aMatchData); williamr@2: williamr@2: inline virtual ~CContentHandlerBase(); williamr@2: williamr@2: inline void SetParent(TMsvId aParentID); williamr@2: williamr@2: protected: // Methods williamr@2: williamr@2: inline CContentHandlerBase(); williamr@2: williamr@2: inline void Complete(TInt aError); williamr@2: williamr@2: inline void IdleComplete(); williamr@2: williamr@2: protected: williamr@2: williamr@2: /** Parent message server entry. */ williamr@2: TMsvId iParentID; williamr@2: williamr@2: /** Unused. */ williamr@2: TInt iState; //state machine williamr@2: williamr@2: /** The derived class should set this to ETrue on receiving an asynchronous request. */ williamr@2: TBool iAcknowledge; williamr@2: williamr@2: /** Unused. */ williamr@2: CPushMessage* iMessage; williamr@2: williamr@2: }; williamr@2: williamr@2: #include williamr@2: williamr@2: #endif // __CCONTENTHANDLERBASE_H__ williamr@2: