messagingfw/wappushfw/examples/PushAppHandlerEx/test/t_serviceutils.h
changeset 0 8e480a14352b
equal deleted inserted replaced
-1:000000000000 0:8e480a14352b
       
     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 // WAP Push - ConnectionManager Test Harness
       
    15 // This file contains the declaration of the CWapPushTestMsgUtils which performs operations with
       
    16 // the message server
       
    17 // 
       
    18 //
       
    19 
       
    20 /**
       
    21  @file T_SERVICEUTILS.H
       
    22 */
       
    23 
       
    24 #ifndef __T_SERVICEUTILS_H__
       
    25 #define __T_SERVICEUTILS_H__
       
    26 
       
    27 #include <e32std.h>
       
    28 #include <msvapi.h>
       
    29 
       
    30 #define __TEST_SERVICE_CREATION__
       
    31 
       
    32 /*
       
    33  *Utility class that performs operations with with the Message Server 
       
    34  */
       
    35 class CWapPushTestMsgUtils: public CBase, public MMsvSessionObserver
       
    36 	{
       
    37 public:
       
    38 	static CWapPushTestMsgUtils* NewL();
       
    39 	~ CWapPushTestMsgUtils();
       
    40 
       
    41 	void PushServiceIdL(TMsvId& rFirstId, CMsvEntrySelection* rServiceIds);
       
    42 	TMsvId CreateServiceL();
       
    43 	TMsvId CreateMmsServiceL();
       
    44 	TMsvId CreatePushMsgFolderL();
       
    45 	void RemoveServiceEntryChildrenL(TMsvId aServiceId);
       
    46 	void RemoveEntriesFromLocalServiceFolderL(TMsvId aPushFolderId, TUid aMtm);
       
    47 	void PushFolderIdL(TMsvId& rFirstFolderId, CMsvEntrySelection* rFolderIds);
       
    48 	void InstallMtmGroupL(const TDesC& aDatFile);
       
    49 	void HandleSessionEventL(TMsvSessionEvent /*aEvent*/, TAny* /*aArg1*/, TAny* /*aArg2*/, TAny* /*aArg3*/) {}
       
    50 
       
    51 	// Only use the following if you want to remove the service or folder entries. Handle with care!
       
    52 	void RemoveAllPushServiceEntriesL(); // Clears any existing Push Service entries - test if creation works
       
    53 	void RemoveAllPushFolderEntriesL();      //Removes all existing Push Folder Entries.
       
    54 
       
    55 private:
       
    56 	void ConstructL();
       
    57 	void DeleteEntriesSychronouslyL(CMsvEntrySelection* aSelection);
       
    58 	void SetMmsSettingsL(TMsvId id);
       
    59 
       
    60 	CMsvSession* iMsvSession;
       
    61 	CMsvEntry*	 iMsvEntry;
       
    62 	TMsvId		 iPushServiceId;
       
    63 
       
    64 	};
       
    65 
       
    66 
       
    67 
       
    68 #endif