messagingfw/wappushfw/plugins/PushAppHandler/CUnknownAppHandler.cpp
changeset 62 db3f5fa34ec7
parent 0 8e480a14352b
equal deleted inserted replaced
60:9f5ae1728557 62:db3f5fa34ec7
       
     1 // Copyright (c) 2000-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 "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 //
       
    15 
       
    16 // Local includes
       
    17 //
       
    18 #include "CUnknownAppHandler.h"
       
    19 
       
    20 // System includes
       
    21 //
       
    22 #include <push/pushlog.h>
       
    23 #include <push/pushmessage.h>
       
    24 #include <push/pluginkiller.h>
       
    25 
       
    26 // Constants
       
    27 _LIT(KReserved, "Reserved");
       
    28 
       
    29 void CUnknownAppHandler::CPushHandlerBase_Reserved1()
       
    30 	{
       
    31 	User::Panic(KReserved, KErrNotSupported);
       
    32 	}
       
    33 
       
    34 void CUnknownAppHandler::CPushHandlerBase_Reserved2()
       
    35 	{
       
    36 	User::Panic(KReserved, KErrNotSupported);
       
    37 	}
       
    38 
       
    39 /** CUnknownAppHandler Constructor.
       
    40  * 
       
    41  */ 
       
    42 CUnknownAppHandler::CUnknownAppHandler()
       
    43 : CPushHandlerBase()
       
    44 	{
       
    45 	}
       
    46 
       
    47 /** CUnknownAppHandler Static Factory Construction.
       
    48  * 
       
    49  */
       
    50 CUnknownAppHandler* CUnknownAppHandler::NewL()
       
    51 	{
       
    52 	CUnknownAppHandler* self = new (ELeave) CUnknownAppHandler;
       
    53 	return self;
       
    54 	}
       
    55 
       
    56 /**
       
    57  * Destructor.
       
    58  */
       
    59 CUnknownAppHandler::~CUnknownAppHandler()
       
    60 	{
       
    61 	__LOG_PTR_DEBUG("CUnknownAppHandler:: Destructor Called"); 
       
    62 	}
       
    63 
       
    64 /** Asynchronous Handle Message 
       
    65  *
       
    66  * Push Messages with an unknown AppId are deleted. No further
       
    67  * action is required.
       
    68  *
       
    69  * @param aPushMsg The Push Message with Unknown AppId
       
    70  * @param aStatus Status to be signalled when handling is complete
       
    71  */
       
    72 void CUnknownAppHandler::HandleMessageL(CPushMessage* aPushMsg, TRequestStatus& aStatus)
       
    73 	{
       
    74 	 __LOG_PTR_DEBUG("CUnknownAppHandler:: HandleMessageL Async. Func. Called"); 
       
    75 	delete aPushMsg;
       
    76 
       
    77 	SetConfirmationStatus(aStatus);
       
    78 	SignalConfirmationStatus(KErrNone);
       
    79 	iPluginKiller->KillPushPlugin();
       
    80 	}
       
    81 
       
    82 /** Cancelling any Outstanding Request.
       
    83  *
       
    84  * No Requests need to be canceled in the case of CUnknownAppHandler
       
    85  */
       
    86 void CUnknownAppHandler::CancelHandleMessage()
       
    87 	{
       
    88 	}
       
    89 
       
    90 /** Synchronous Handle Message.
       
    91  * 
       
    92  * Push Messages with an unknown AppId are deleted in a similar
       
    93  * way as for the asynchronous version.
       
    94  *
       
    95  * @param aPushMsg The Push Message with Unknown AppId
       
    96  */
       
    97 void CUnknownAppHandler::HandleMessageL(CPushMessage* aPushMsg)
       
    98 	{
       
    99 	 __LOG_PTR_DEBUG("CUnknownAppHandler:: HandleMessageL Sync. Func. Called"); 
       
   100 	delete aPushMsg;
       
   101 	iPluginKiller->KillPushPlugin();
       
   102 	}
       
   103 
       
   104 /**
       
   105  * Cancel any Outstanding Requests.
       
   106  */
       
   107 void CUnknownAppHandler::DoCancel()
       
   108 	{
       
   109 	__LOG_PTR_DEBUG("CUnknownAppHandler:: DoCancel Called"); 
       
   110 	}
       
   111 
       
   112 /**
       
   113  * Handle the completion of an aysynchronous request
       
   114  * This should never be called, since no requests are made.
       
   115  */
       
   116 void CUnknownAppHandler::RunL()
       
   117 	{
       
   118 	__LOG_PTR_DEBUG("CUnknownAppHandler:: RunL Called"); 
       
   119 	}