epoc32/include/push/ccontenthandlerbase.inl
author William Roberts <williamr@symbian.org>
Tue, 16 Mar 2010 16:12:26 +0000
branchSymbian2
changeset 2 2fe1408b6811
permissions -rw-r--r--
Final list of Symbian^2 public API header files
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
// Local includes
williamr@2
    15
// 
williamr@2
    16
//
williamr@2
    17
williamr@2
    18
williamr@2
    19
williamr@2
    20
/**
williamr@2
    21
 @file
williamr@2
    22
 @publishedPartner
williamr@2
    23
 @released
williamr@2
    24
*/
williamr@2
    25
williamr@2
    26
// System includes
williamr@2
    27
//
williamr@2
    28
#include <ecom/ecom.h>
williamr@2
    29
#include <push/ccontenthandlerbase.h>
williamr@2
    30
#include <push/pushlog.h>
williamr@2
    31
#include <push/pluginkiller.h>
williamr@2
    32
williamr@2
    33
williamr@2
    34
/** 
williamr@2
    35
Constructor. 
williamr@2
    36
*/
williamr@2
    37
inline CContentHandlerBase::CContentHandlerBase()
williamr@2
    38
: CPushHandlerBase()
williamr@2
    39
	{
williamr@2
    40
	}
williamr@2
    41
williamr@2
    42
williamr@2
    43
/** 
williamr@2
    44
Destructor. 
williamr@2
    45
*/
williamr@2
    46
inline CContentHandlerBase::~CContentHandlerBase()
williamr@2
    47
	{
williamr@2
    48
	__LOG_PTR_DEBUG("CContentHandlerBase:: Destructor Called");
williamr@2
    49
	Cancel();
williamr@2
    50
	delete iMessage;
williamr@2
    51
	}
williamr@2
    52
williamr@2
    53
williamr@2
    54
/** 
williamr@2
    55
Finds and instantiates an ECom WAP Push Content Handler plug-in that matches 
williamr@2
    56
the specified media type.
williamr@2
    57
williamr@2
    58
@param aMatchData 
williamr@2
    59
Media type.
williamr@2
    60
williamr@2
    61
@return 
williamr@2
    62
WAP Push plug-in that handles the specified media type.
williamr@2
    63
*/
williamr@2
    64
inline CContentHandlerBase* CContentHandlerBase::NewL(const TDesC& aMatchData)
williamr@2
    65
	{
williamr@2
    66
	// Call base class interface CPushHandlerBase::NewL()
williamr@2
    67
	return REINTERPRET_CAST(CContentHandlerBase*, 
williamr@2
    68
							CPushHandlerBase::NewL(aMatchData, KUidPushContentHandlerBase));
williamr@2
    69
	}
williamr@2
    70
williamr@2
    71
williamr@2
    72
/** 
williamr@2
    73
Sets a parent message server entry for any output to be saved in the message 
williamr@2
    74
server.
williamr@2
    75
williamr@2
    76
@param aParentID 
williamr@2
    77
ID of the parent message server entry. This is stored in iParentID. 
williamr@2
    78
*/
williamr@2
    79
inline void CContentHandlerBase::SetParent(TMsvId aParentID)
williamr@2
    80
	{
williamr@2
    81
	iParentID = aParentID;
williamr@2
    82
	}
williamr@2
    83
williamr@2
    84
williamr@2
    85
/** 
williamr@2
    86
Provides clean-up for the plug-in.
williamr@2
    87
williamr@2
    88
A derived class calls this when handling of the message is complete: it deletes 
williamr@2
    89
the plug-in, and if the asynchronous request iAcknowledge flag is set, sets 
williamr@2
    90
the status with the passed error code.
williamr@2
    91
williamr@2
    92
@param aError 
williamr@2
    93
Error code. 
williamr@2
    94
*/
williamr@2
    95
inline void CContentHandlerBase::Complete(TInt aError)
williamr@2
    96
	{
williamr@2
    97
	__LOG_PTR_DEBUG("CContentHandlerPluginBase:: Complete Called");
williamr@2
    98
	if (iAcknowledge)
williamr@2
    99
		SignalConfirmationStatus(aError);
williamr@2
   100
	iPluginKiller->KillPushPlugin();
williamr@2
   101
	}	
williamr@2
   102
williamr@2
   103
williamr@2
   104
/** 
williamr@2
   105
Utility that completes this active object with KErrNone. 
williamr@2
   106
*/
williamr@2
   107
inline void CContentHandlerBase::IdleComplete()
williamr@2
   108
	{
williamr@2
   109
	TRequestStatus* pS = &iStatus;
williamr@2
   110
	User::RequestComplete(pS,KErrNone);
williamr@2
   111
	SetActive();
williamr@2
   112
	}