sl@0: // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // sl@0: // WARNING: This file contains some APIs which are internal and are subject sl@0: // to change without notice. Such APIs should therefore not be used sl@0: // outside the Kernel and Hardware Services package. sl@0: // sl@0: sl@0: #ifndef __DOMAIN_MEMBER_H__ sl@0: #define __DOMAIN_MEMBER_H__ sl@0: sl@0: #include sl@0: #include sl@0: #include sl@0: sl@0: /** sl@0: @internalComponent sl@0: */ sl@0: class RDmDomainSession : public RSessionBase sl@0: { sl@0: public: sl@0: TInt Connect(TDmHierarchyId aHierarchyId, TDmDomainId, TUint* aKey); sl@0: void Acknowledge(TInt aValue, TInt aError); sl@0: void RequestTransitionNotification(); sl@0: void CancelTransitionNotification(); sl@0: }; sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: The application's interface to the domain manager. sl@0: */ sl@0: class RDmDomain sl@0: { sl@0: public: sl@0: IMPORT_C TInt Connect(TDmDomainId aId); sl@0: IMPORT_C void Close(); sl@0: sl@0: IMPORT_C void RequestTransitionNotification(TRequestStatus& aStatus); sl@0: IMPORT_C void CancelTransitionNotification(); sl@0: sl@0: IMPORT_C TPowerState GetPowerState(); sl@0: IMPORT_C void AcknowledgeLastState(); sl@0: sl@0: /** sl@0: @internalAll sl@0: */ sl@0: IMPORT_C TInt Connect(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId); sl@0: /** sl@0: @internalAll sl@0: */ sl@0: IMPORT_C void AcknowledgeLastState(TInt aError); sl@0: /** sl@0: @internalAll sl@0: */ sl@0: IMPORT_C TDmDomainState GetState(); sl@0: sl@0: private: sl@0: RDmDomainSession iSession; sl@0: RProperty iStateProperty; sl@0: TInt iLastStatePropertyValue; sl@0: }; sl@0: sl@0: sl@0: sl@0: /** sl@0: @publishedPartner sl@0: @released sl@0: sl@0: An abstract class for interfacing to a domain managed by the domain manager. sl@0: sl@0: To make use of this class an application must derive from it and implement a RunL() sl@0: method to handle notifications. sl@0: */ sl@0: class CDmDomain : public CActive sl@0: { sl@0: public: sl@0: IMPORT_C CDmDomain(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId); sl@0: IMPORT_C ~CDmDomain(); sl@0: sl@0: IMPORT_C void RequestTransitionNotification(); sl@0: /** sl@0: @internalTechnology sl@0: */ sl@0: IMPORT_C void AcknowledgeLastState(TInt aError); sl@0: /** sl@0: @internalTechnology sl@0: */ sl@0: IMPORT_C TDmDomainState GetState(); sl@0: virtual void RunL() = 0; sl@0: protected: sl@0: // from CActive sl@0: IMPORT_C void DoCancel(); sl@0: IMPORT_C void ConstructL(); sl@0: sl@0: private: sl@0: RDmDomain iDomain; sl@0: TDmHierarchyId iHierarchyId; sl@0: TDmDomainId iDomainId; sl@0: TInt iReserved[4]; sl@0: }; sl@0: sl@0: sl@0: #endif