epoc32/include/push/ccontenthandlerbase.h
branchSymbian3
changeset 4 837f303aceeb
parent 3 e1b950c65cb4
equal deleted inserted replaced
3:e1b950c65cb4 4:837f303aceeb
     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".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 
       
    17 
       
    18 /**
       
    19  @file
       
    20  @publishedPartner
       
    21  @released
       
    22 */
       
    23 
       
    24 #ifndef __CCONTENTHANDLERBASE_H__
       
    25 #define __CCONTENTHANDLERBASE_H__
       
    26 
       
    27 // System includes
       
    28 //
       
    29 #include <e32base.h>
       
    30 #include <msvstd.h>
       
    31 #include <push/cpushhandlerbase.h>
       
    32 #include <push/pushmessage.h>
       
    33 
       
    34 
       
    35 // Constants
       
    36 //
       
    37 /** ECom interface UID for WAP Push Content Handler plug-ins. */
       
    38 const TUid KUidPushContentHandlerBase	= { 0x101F3E5E };
       
    39 
       
    40 
       
    41 /** 
       
    42 Abstract base class for WAP Push Content Handler plug-ins.
       
    43 
       
    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().
       
    48 
       
    49 A WAP Push Content Handling plugin is implemented as an ECom plug-in object derived from 
       
    50 the CContentHandlerBase interface.
       
    51 
       
    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".
       
    55 
       
    56 @publishedPartner
       
    57 @released
       
    58 */
       
    59 class CContentHandlerBase : public CPushHandlerBase
       
    60 	{
       
    61 public:
       
    62 
       
    63 	inline static CContentHandlerBase* NewL(const TDesC& aMatchData);
       
    64 
       
    65 	inline virtual ~CContentHandlerBase();
       
    66 
       
    67 	inline void SetParent(TMsvId aParentID);
       
    68 
       
    69 protected:	// Methods
       
    70 
       
    71 	inline CContentHandlerBase();
       
    72 
       
    73 	inline void Complete(TInt aError);
       
    74 
       
    75 	inline void IdleComplete();
       
    76 
       
    77 protected:
       
    78 
       
    79 	/** Parent message server entry. */
       
    80 	TMsvId				iParentID;
       
    81 
       
    82 	/** Unused. */
       
    83 	TInt				iState; //state machine
       
    84 
       
    85 	/** The derived class should set this to ETrue on receiving an asynchronous request. */
       
    86 	TBool				iAcknowledge;
       
    87 
       
    88 	/** Unused. */
       
    89 	CPushMessage*		iMessage;
       
    90 
       
    91 	};
       
    92 
       
    93 #include <push/ccontenthandlerbase.inl>
       
    94 
       
    95 #endif    // __CCONTENTHANDLERBASE_H__
       
    96