author | William Roberts <williamr@symbian.org> |
Tue, 16 Mar 2010 16:12:26 +0000 | |
branch | Symbian2 |
changeset 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
// Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 2 |
// All rights reserved. |
williamr@2 | 3 |
// This component and the accompanying materials are made available |
williamr@2 | 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 |
williamr@2 | 5 |
// which accompanies this distribution, and is available |
williamr@2 | 6 |
// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
williamr@2 | 7 |
// |
williamr@2 | 8 |
// Initial Contributors: |
williamr@2 | 9 |
// Nokia Corporation - initial contribution. |
williamr@2 | 10 |
// |
williamr@2 | 11 |
// Contributors: |
williamr@2 | 12 |
// |
williamr@2 | 13 |
// Description: |
williamr@2 | 14 |
// |
williamr@2 | 15 |
|
williamr@2 | 16 |
|
williamr@2 | 17 |
|
williamr@2 | 18 |
/** |
williamr@2 | 19 |
@file |
williamr@2 | 20 |
@publishedPartner |
williamr@2 | 21 |
@released |
williamr@2 | 22 |
*/ |
williamr@2 | 23 |
|
williamr@2 | 24 |
#ifndef __CCONTENTHANDLERBASE_H__ |
williamr@2 | 25 |
#define __CCONTENTHANDLERBASE_H__ |
williamr@2 | 26 |
|
williamr@2 | 27 |
// System includes |
williamr@2 | 28 |
// |
williamr@2 | 29 |
#include <e32base.h> |
williamr@2 | 30 |
#include <msvstd.h> |
williamr@2 | 31 |
#include <push/cpushhandlerbase.h> |
williamr@2 | 32 |
#include <push/pushmessage.h> |
williamr@2 | 33 |
|
williamr@2 | 34 |
|
williamr@2 | 35 |
// Constants |
williamr@2 | 36 |
// |
williamr@2 | 37 |
/** ECom interface UID for WAP Push Content Handler plug-ins. */ |
williamr@2 | 38 |
const TUid KUidPushContentHandlerBase = { 0x101F3E5E }; |
williamr@2 | 39 |
|
williamr@2 | 40 |
|
williamr@2 | 41 |
/** |
williamr@2 | 42 |
Abstract base class for WAP Push Content Handler plug-ins. |
williamr@2 | 43 |
|
williamr@2 | 44 |
A WAP Push Content Handler plug-in processes a WAP Push message that contains |
williamr@2 | 45 |
data of a specific media type. A Content Handler plug-in is loaded by a WAP Push Application |
williamr@2 | 46 |
Handler plug-in (CPushHandlerBase-derived object), and the message is passed to handle |
williamr@2 | 47 |
through HandleMessageL(). |
williamr@2 | 48 |
|
williamr@2 | 49 |
A WAP Push Content Handling plugin is implemented as an ECom plug-in object derived from |
williamr@2 | 50 |
the CContentHandlerBase interface. |
williamr@2 | 51 |
|
williamr@2 | 52 |
Each Content Handler plug-in should specify the media type that it handles. Content Handler |
williamr@2 | 53 |
plug-ins can handle multiple media types: for example, a plug-in to handle SI messages can |
williamr@2 | 54 |
specify it's media type as "text/vnd.wap.si||application/vnd.wap.sic". |
williamr@2 | 55 |
|
williamr@2 | 56 |
@publishedPartner |
williamr@2 | 57 |
@released |
williamr@2 | 58 |
*/ |
williamr@2 | 59 |
class CContentHandlerBase : public CPushHandlerBase |
williamr@2 | 60 |
{ |
williamr@2 | 61 |
public: |
williamr@2 | 62 |
|
williamr@2 | 63 |
inline static CContentHandlerBase* NewL(const TDesC& aMatchData); |
williamr@2 | 64 |
|
williamr@2 | 65 |
inline virtual ~CContentHandlerBase(); |
williamr@2 | 66 |
|
williamr@2 | 67 |
inline void SetParent(TMsvId aParentID); |
williamr@2 | 68 |
|
williamr@2 | 69 |
protected: // Methods |
williamr@2 | 70 |
|
williamr@2 | 71 |
inline CContentHandlerBase(); |
williamr@2 | 72 |
|
williamr@2 | 73 |
inline void Complete(TInt aError); |
williamr@2 | 74 |
|
williamr@2 | 75 |
inline void IdleComplete(); |
williamr@2 | 76 |
|
williamr@2 | 77 |
protected: |
williamr@2 | 78 |
|
williamr@2 | 79 |
/** Parent message server entry. */ |
williamr@2 | 80 |
TMsvId iParentID; |
williamr@2 | 81 |
|
williamr@2 | 82 |
/** Unused. */ |
williamr@2 | 83 |
TInt iState; //state machine |
williamr@2 | 84 |
|
williamr@2 | 85 |
/** The derived class should set this to ETrue on receiving an asynchronous request. */ |
williamr@2 | 86 |
TBool iAcknowledge; |
williamr@2 | 87 |
|
williamr@2 | 88 |
/** Unused. */ |
williamr@2 | 89 |
CPushMessage* iMessage; |
williamr@2 | 90 |
|
williamr@2 | 91 |
}; |
williamr@2 | 92 |
|
williamr@2 | 93 |
#include <push/ccontenthandlerbase.inl> |
williamr@2 | 94 |
|
williamr@2 | 95 |
#endif // __CCONTENTHANDLERBASE_H__ |
williamr@2 | 96 |