messagingfw/wappushfw/PushMsgEntry/inc/CWapPushMsgUtils.h
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 #ifndef __CWAPPUSHMSGUTILS_H_
       
    17 #define __CWAPPUSHMSGUTILS_H_
       
    18 
       
    19 #include <e32std.h>
       
    20 #include <e32base.h>
       
    21 #include <msvapi.h>
       
    22 #include <pushentry.h>
       
    23 
       
    24 
       
    25 class mwappushlog;
       
    26 class cwappushmessagefilter;
       
    27 
       
    28 //  2 panic codes for Push Message Utils
       
    29 /**
       
    30 @internalComponent
       
    31 @released
       
    32 */
       
    33 enum TWapPushMsgUtilsPanic  {
       
    34 							EPushMsgUtilsNotValidPushMsg,
       
    35 							EPushMsgUtilsNotSiMsg
       
    36 							};
       
    37 
       
    38 
       
    39 _LIT(KMsgUtilsPanicTitle, "CWapPushMsgUtils");
       
    40 
       
    41 
       
    42 class CWapPushMsgUtils: public CBase, public MMsvSessionObserver
       
    43 /**
       
    44 Utility class for messaging operations which is provided for use by the WAP Push Content 
       
    45 Handlers and the UI. Has functions for locating and creating WAP Push Service. 
       
    46 
       
    47 Contains a CMsvSession object, and allows other objects to get a reference to a session 
       
    48 without having to inherit from the MMsvSessionObserver class.
       
    49 
       
    50 @internalTechnology
       
    51 @released
       
    52 */
       
    53 	{
       
    54 public:
       
    55 	IMPORT_C static CWapPushMsgUtils* NewL();
       
    56 	IMPORT_C virtual ~CWapPushMsgUtils();	
       
    57 	IMPORT_C void GetServiceIdL(TUid aMtm, TMsvId& rServiceId); 
       
    58 
       
    59 	inline CMsvSession& Session() const;
       
    60 	inline static TBool IsDeleted(const TMsvEntry& aEntry);
       
    61 	inline static TInt32 GetPushMsgType(const TMsvEntry& aEntry);
       
    62 
       
    63 protected:
       
    64 	IMPORT_C void ConstructL();
       
    65 	IMPORT_C CWapPushMsgUtils();
       
    66 	inline void HandleSessionEventL(TMsvSessionEvent , TAny* , TAny* , TAny* );
       
    67 	
       
    68 protected:
       
    69 	CMsvSession* iMsvSession;
       
    70 	CMsvEntry* iMsvEntry;
       
    71 	TMsvId iPushServiceId;
       
    72 	TMsvId iPushFolderId;
       
    73 	};
       
    74 
       
    75 class CWapPushMessageFilter;
       
    76  
       
    77 class CWapPushFilterUtils : public CBase
       
    78 	{
       
    79 public:
       
    80 	IMPORT_C static CWapPushMessageFilter* GetFilterPluginL();
       
    81 	};
       
    82 
       
    83 #include <push/cwappushmsgutils.inl>
       
    84 
       
    85 
       
    86 #endif