epoc32/include/push/cwappushmsgutils.inl
branchSymbian2
changeset 2 2fe1408b6811
equal deleted inserted replaced
1:666f914201fb 2:2fe1408b6811
       
     1 // Copyright (c) 2003-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 // WAP Push Message Inline functions file for the Utility class
       
    15 // 
       
    16 //
       
    17 
       
    18 #ifndef __CWAPPUSHMSGUTILS_INL_
       
    19 #define __CWAPPUSHMSGUTILS_INL_
       
    20 
       
    21 
       
    22 /**
       
    23  * Returns a reference to the CMsvSession member of the class. 
       
    24  * Used by other objects when they need to pass a reference to another 
       
    25  * function, usually Push Entry class for Save or Retrieve. 
       
    26  * 
       
    27  * @return Reference to the iMsvSession class member. 
       
    28  */
       
    29 inline CMsvSession& CWapPushMsgUtils::Session() const 
       
    30 	{
       
    31 	return *iMsvSession;
       
    32 	}
       
    33 
       
    34 
       
    35 /** 
       
    36  * Inherited function that must be implemented. 
       
    37  * Does not do anything as we do not need to respond to session events. 
       
    38  * If there are any problems, calls to the session will leave. Things will be 
       
    39  * tidied up then.
       
    40  * @param TMsvSessionEvent enumeration indicating event that has just occured
       
    41  * @param TAny* specific data
       
    42  */
       
    43 inline void CWapPushMsgUtils::HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* )
       
    44 	{
       
    45 	}
       
    46 
       
    47 
       
    48 
       
    49 /**
       
    50  * Static function that determines whether an entry has been flagged 
       
    51  * as Deleted. Hides the implementation of the deletion mechanism, and 
       
    52  * avoids other classes having to perform bitwise operations.
       
    53  * 
       
    54  * @param aEntry Reference to an entry in the message server index
       
    55  * @return TBool ETrue if the entry status is set to Deleted, otherwise EFalse.
       
    56  */
       
    57 inline TBool CWapPushMsgUtils::IsDeleted(const TMsvEntry& aEntry)
       
    58 	{
       
    59 	// Must always be a Push Msg Entry, otherwise operation is pointless
       
    60 	__ASSERT_ALWAYS(aEntry.iMtm == KUidMtmWapPush, 
       
    61 				User::Panic(KMsgUtilsPanicTitle,EPushMsgUtilsNotValidPushMsg));
       
    62 	return ( (aEntry.MtmData1() & KPushMaskOnlyStatus) 
       
    63 					== CPushMsgEntryBase::EPushMsgStatusDeleted);
       
    64 	}
       
    65 
       
    66 
       
    67 #endif