lowlevellibsandfws/pluginfw/Framework/frame/TestHarnessDomainMember.h
changeset 0 e4d67989cc36
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/lowlevellibsandfws/pluginfw/Framework/frame/TestHarnessDomainMember.h	Tue Feb 02 02:01:42 2010 +0200
@@ -0,0 +1,66 @@
+// Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef __TEST_HARNESS_DOMAIN_MEMBER_H__
+#define __TEST_HARNESS_DOMAIN_MEMBER_H__
+
+#include <e32base.h>
+#include <domainmember.h>
+/**
+@internalTechnology
+
+Test version of CDmDomain defined in domainmember.h
+An class for interfacing to a domain managed by 
+the domain manager or the test harness depending on whether
+__ECOM_SERVER_TESTABILITY__ macro is defined or not.
+This class acts either as a dummy intermediate class which 
+passes all the calls directly to the base class CDmDomain or
+a class which blocks all the calls to the CDmDomain. The
+behaviour is defined based on the existence of 
+KIniEcomTestBehaviourFileName
+*/
+class CDmDomainTestHarness : public CDmDomain
+	{
+public:
+	CDmDomainTestHarness(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId);
+	~CDmDomainTestHarness();
+
+	void RequestTransitionNotificationL();
+	void AcknowledgeLastStateL(TInt aError);
+	TDmDomainState GetState();
+	void ChangeStartupStateL(TInt aState);
+	
+	void ResetRequestTransitionNotificationL();
+	TBool IsTransitionNotificationRequestedL();
+	void ResetLastStateAcknowledgedL();
+	TBool IsLastStateAcknowledgedL();
+	TBool IsRequestNotificationCancelledL();
+	void Cancel();
+protected:
+	// from CActive
+	void DoCancel();
+	void ConstructL();
+private:
+	TBool IsTestBehaviour();
+    TBool iIsRequestSent;
+    TBool iIsLastStateAcknowledged;
+	TInt iState;
+	TInt iIsTestBehaviour;
+	TInt iIsBehaviourSet;
+	TBool iIsRequestCancelled;
+	};
+
+#endif //__TEST_HARNESS_DOMAIN_MEMBER_H__
+