epoc32/include/push/cwappushmsgutils.inl
branchSymbian2
changeset 2 2fe1408b6811
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/epoc32/include/push/cwappushmsgutils.inl	Tue Mar 16 16:12:26 2010 +0000
@@ -0,0 +1,67 @@
+// Copyright (c) 2003-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// 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
+// which accompanies this distribution, and is available
+// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+// WAP Push Message Inline functions file for the Utility class
+// 
+//
+
+#ifndef __CWAPPUSHMSGUTILS_INL_
+#define __CWAPPUSHMSGUTILS_INL_
+
+
+/**
+ * Returns a reference to the CMsvSession member of the class. 
+ * Used by other objects when they need to pass a reference to another 
+ * function, usually Push Entry class for Save or Retrieve. 
+ * 
+ * @return Reference to the iMsvSession class member. 
+ */
+inline CMsvSession& CWapPushMsgUtils::Session() const 
+	{
+	return *iMsvSession;
+	}
+
+
+/** 
+ * Inherited function that must be implemented. 
+ * Does not do anything as we do not need to respond to session events. 
+ * If there are any problems, calls to the session will leave. Things will be 
+ * tidied up then.
+ * @param TMsvSessionEvent enumeration indicating event that has just occured
+ * @param TAny* specific data
+ */
+inline void CWapPushMsgUtils::HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* )
+	{
+	}
+
+
+
+/**
+ * Static function that determines whether an entry has been flagged 
+ * as Deleted. Hides the implementation of the deletion mechanism, and 
+ * avoids other classes having to perform bitwise operations.
+ * 
+ * @param aEntry Reference to an entry in the message server index
+ * @return TBool ETrue if the entry status is set to Deleted, otherwise EFalse.
+ */
+inline TBool CWapPushMsgUtils::IsDeleted(const TMsvEntry& aEntry)
+	{
+	// Must always be a Push Msg Entry, otherwise operation is pointless
+	__ASSERT_ALWAYS(aEntry.iMtm == KUidMtmWapPush, 
+				User::Panic(KMsgUtilsPanicTitle,EPushMsgUtilsNotValidPushMsg));
+	return ( (aEntry.MtmData1() & KPushMaskOnlyStatus) 
+					== CPushMsgEntryBase::EPushMsgStatusDeleted);
+	}
+
+
+#endif