Update contrib.
1 // Copyright (c) 1996-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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
19 @internalComponent - Internal Symbian test code
22 #ifndef __TMESSAGE_H__
23 #define __TMESSAGE_H__
27 #include "../tlib/testbase.h"
29 #include "TGraphicsHarness.h"
31 class CMessageReceiver;
33 class CLowPriorityIdle : public CIdle
37 virtual TInt RunError(TInt aError);
40 class CTMessage : public CTWsGraphicsBase
43 CTMessage(CTestStep* aStep);
47 void MessageTests(TInt aNoOfMessages,TInt aMsgCountCheck,TBool aSyncSendReceiveFlag,TBool aTestNeedsExtraCheck);
48 void OnMessageReceived(const TWsEvent &aEvent, TInt& aMsgCount);
49 TInt SendSyncMessages();
50 static TInt CallbackLowPriority(TAny *aMessageTest);
51 TInt CreateAndSendMessages(TInt aCount,TInt aNoOfMessages);
52 void TestMessageQueueOverflowL();
55 virtual void RunTestCaseL(TInt aCurTestCase);
58 TBool iSyncSendReceiveFlag;
61 RPointerArray<CMessageReceiver>* iMessageReceiver;
62 CLowPriorityIdle* iLowPriorityObject;
67 class CMessageReceiver : public CTWindowGroup
70 CMessageReceiver(CTClient *aClient, CTMessage *aTMessage);
71 void MessageReady(const TWsEvent &aTime);
72 inline TInt MessageCount()
74 inline void ResetMessageCount()
77 CTMessage *iTMessage; // CTMessage, to call it's OnMessageReceived when message is received
83 class CTMessageStep : public CTGraphicsStep
89 virtual CTGraphicsBase* CreateTestL();
92 _LIT(KTMessageStep,"TMessage");