epoc32/include/push/cpushhandlerbase.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
     1.1 --- a/epoc32/include/push/cpushhandlerbase.h	Wed Mar 31 12:27:01 2010 +0100
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,146 +0,0 @@
     1.4 -// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 -// All rights reserved.
     1.6 -// This component and the accompanying materials are made available
     1.7 -// 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
     1.8 -// which accompanies this distribution, and is available
     1.9 -// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 -//
    1.11 -// Initial Contributors:
    1.12 -// Nokia Corporation - initial contribution.
    1.13 -//
    1.14 -// Contributors:
    1.15 -//
    1.16 -// Description:
    1.17 -//
    1.18 -
    1.19 -
    1.20 -
    1.21 -/**
    1.22 - @file
    1.23 - @publishedPartner
    1.24 - @released
    1.25 -*/
    1.26 -
    1.27 -#ifndef __CPUSHHANDLERBASE_H__
    1.28 -#define __CPUSHHANDLERBASE_H__
    1.29 -
    1.30 -// System includes
    1.31 -#include <e32base.h>
    1.32 -
    1.33 -// Forward class declarations
    1.34 -class CPushMessage;
    1.35 -class CPluginKiller;
    1.36 -class MWapPushLog;
    1.37 -class MConnManObserver;
    1.38 -
    1.39 -/** ECom interface UID for WAP Push Application plug-ins. */
    1.40 -const TUid KUidPushHandlerBase = { 0x101F3E5A };
    1.41 -
    1.42 -/** 
    1.43 -Abstract base class for WAP Push Application plugins.
    1.44 -
    1.45 -A WAP Push Application plugin is implemented as an ECom plug-in object that 
    1.46 -derives from this interface. Each plugin specifies in its ECom IMPLEMENTATION_INFO 
    1.47 -default_data field the Push Application IDs that it should handle. When the 
    1.48 -WAP Push Framework receives a push message, it examines the message's Application 
    1.49 -ID, and loads the appropriate plug-in to handle the message with HandleMessageL().
    1.50 -
    1.51 -A plug-in can handle multiple Application IDs. Application IDs can be specified 
    1.52 -as URNs or WINA (http://www.wapforum.org/wina/push-app-id.htm) values. For 
    1.53 -example, a plug-in to handle MMS would set its default_data to "x-wap-application:mms.ua||0x00000004".
    1.54 -
    1.55 -A plug-in must destroy itself when it is has finished handling the message. 
    1.56 -The framework supplies a CPluginKiller object that the plug-in calls to do 
    1.57 -this. 
    1.58 -
    1.59 -@publishedPartner
    1.60 -@released
    1.61 -*/
    1.62 -class CPushHandlerBase : public CActive
    1.63 -	{
    1.64 -public:	// Methods
    1.65 -
    1.66 -	inline static CPushHandlerBase* NewL(const TDesC& aMatchData);
    1.67 -
    1.68 -	inline static CPushHandlerBase* NewL(const TDesC& aMatchData, const TUid& aInterfaceUid);
    1.69 -
    1.70 -	inline virtual ~CPushHandlerBase();
    1.71 -
    1.72 -	//Async. Functions
    1.73 -	/** 
    1.74 -	Handles a push message asynchronously.
    1.75 -	
    1.76 -	Implementations should store the passed aStatus using SetConfirmationStatus(), 
    1.77 -	and when handling is complete, complete it with SignalConfirmationStatus().
    1.78 -	
    1.79 -	@param aPushMsg 
    1.80 -	Push message. Ownership of the message is passed to the object.
    1.81 -	
    1.82 -	@param aStatus 
    1.83 -	Asynchronous status word 
    1.84 -	*/
    1.85 -	virtual void HandleMessageL(CPushMessage* aPushMsg,TRequestStatus& aStatus) =0;
    1.86 -
    1.87 -	/** 
    1.88 -	Cancels an outstanding HandleMessageL() call. 
    1.89 -	*/
    1.90 -	virtual void CancelHandleMessage() =0;
    1.91 -
    1.92 -	//Sync. Functions
    1.93 -	/** 
    1.94 -	Handles a push message synchronously.
    1.95 -	
    1.96 -	@param aPushMsg 
    1.97 -	Push message. Ownership of the message is passed to the object. 
    1.98 -	*/
    1.99 -	virtual void HandleMessageL(CPushMessage* aPushMsg) =0;
   1.100 -
   1.101 -	inline void SetLogger(MWapPushLog& aLog);
   1.102 -
   1.103 -	inline void SetKiller(CPluginKiller& aPluginKiller);
   1.104 -
   1.105 -	inline void SetManager(MConnManObserver& aManager);
   1.106 -
   1.107 -protected:	// Methods
   1.108 -
   1.109 -	CPushHandlerBase();
   1.110 -
   1.111 -	void SetConfirmationStatus(TRequestStatus& aStatus);
   1.112 -
   1.113 -	void SignalConfirmationStatus(TInt aErr);
   1.114 -
   1.115 -protected:	// Attributes
   1.116 -
   1.117 -	/** Plugin killer utility object. */
   1.118 -	CPluginKiller*		iPluginKiller;
   1.119 -
   1.120 -	/** Log interface. */
   1.121 -	MWapPushLog*		iLog;
   1.122 -
   1.123 -    /** connection manager */
   1.124 -	MConnManObserver*	iManager;
   1.125 -
   1.126 -	/** HandleMessageL() asynchronous status word. */
   1.127 -	TRequestStatus*		iConfirmStatus;
   1.128 -
   1.129 -private:	// Attributes
   1.130 -
   1.131 -	/** A unique UID used in interface destruction */
   1.132 -	TUid	iDtor_ID_Key;
   1.133 -
   1.134 -private:	// BC-proofing
   1.135 -
   1.136 -	/** Reserved for future expansion */
   1.137 -	virtual void CPushHandlerBase_Reserved1() =0;		
   1.138 -
   1.139 -	/** Reserved for future expansion */
   1.140 -	virtual void CPushHandlerBase_Reserved2() =0;		
   1.141 -
   1.142 -	/** Reserved for future expansion */
   1.143 -	TAny*		iCPushHandlerBase_Reserved;
   1.144 -
   1.145 -	};
   1.146 -
   1.147 -#include <push/cpushhandlerbase.inl>
   1.148 -
   1.149 -#endif    // __PUSHBASEHAND_H__