os/kernelhwsrv/userlibandfileserver/domainmgr/inc/domainmember.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/userlibandfileserver/domainmgr/inc/domainmember.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,117 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Eclipse Public License v1.0"
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.eclipse.org/legal/epl-v10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +// WARNING: This file contains some APIs which are internal and are subject
    1.19 +//          to change without notice. Such APIs should therefore not be used
    1.20 +//          outside the Kernel and Hardware Services package.
    1.21 +//
    1.22 +
    1.23 +#ifndef __DOMAIN_MEMBER_H__
    1.24 +#define __DOMAIN_MEMBER_H__
    1.25 +
    1.26 +#include <e32std.h>
    1.27 +#include <e32property.h>
    1.28 +#include <domaindefs.h>
    1.29 +
    1.30 +/**
    1.31 +@internalComponent
    1.32 +*/
    1.33 +class RDmDomainSession : public RSessionBase
    1.34 +	{
    1.35 +public:
    1.36 +	TInt Connect(TDmHierarchyId aHierarchyId, TDmDomainId, TUint* aKey);
    1.37 +	void Acknowledge(TInt aValue, TInt aError);
    1.38 +	void RequestTransitionNotification();
    1.39 +	void CancelTransitionNotification();
    1.40 +	};
    1.41 +
    1.42 +
    1.43 +/**
    1.44 +@publishedPartner
    1.45 +@released
    1.46 +
    1.47 +The application's interface to the domain manager.
    1.48 +*/
    1.49 +class RDmDomain
    1.50 +	{
    1.51 +public:
    1.52 +	IMPORT_C TInt Connect(TDmDomainId aId);
    1.53 +	IMPORT_C void Close();
    1.54 +
    1.55 +	IMPORT_C void RequestTransitionNotification(TRequestStatus& aStatus);
    1.56 +	IMPORT_C void CancelTransitionNotification();
    1.57 +
    1.58 +	IMPORT_C TPowerState GetPowerState();
    1.59 +	IMPORT_C void AcknowledgeLastState();
    1.60 +
    1.61 +	/**
    1.62 +	@internalAll
    1.63 +	*/
    1.64 +	IMPORT_C TInt Connect(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId);
    1.65 +	/**
    1.66 +	@internalAll
    1.67 +	*/
    1.68 +	IMPORT_C void AcknowledgeLastState(TInt aError);
    1.69 +	/**
    1.70 +	@internalAll
    1.71 +	*/
    1.72 +	IMPORT_C TDmDomainState GetState();
    1.73 +
    1.74 +private:
    1.75 +	RDmDomainSession	iSession;
    1.76 +	RProperty			iStateProperty;
    1.77 +	TInt				iLastStatePropertyValue;	
    1.78 +	};
    1.79 +
    1.80 +
    1.81 +
    1.82 +/**
    1.83 +@publishedPartner
    1.84 +@released
    1.85 +
    1.86 +An abstract class for interfacing to a domain managed by the domain manager.
    1.87 +
    1.88 +To make use of this class an application must derive from it and implement a RunL()
    1.89 +method to handle notifications.
    1.90 +*/
    1.91 +class CDmDomain : public CActive
    1.92 +	{
    1.93 +public:
    1.94 +	IMPORT_C CDmDomain(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId);
    1.95 +	IMPORT_C ~CDmDomain();
    1.96 +
    1.97 +	IMPORT_C void RequestTransitionNotification();
    1.98 +	/**
    1.99 +	@internalTechnology
   1.100 +	*/
   1.101 +	IMPORT_C void AcknowledgeLastState(TInt aError);
   1.102 +	/**
   1.103 +	@internalTechnology
   1.104 +	*/
   1.105 +	IMPORT_C TDmDomainState GetState();
   1.106 +	virtual void RunL() = 0;
   1.107 +protected:
   1.108 +	// from CActive
   1.109 +	IMPORT_C void DoCancel();
   1.110 +	IMPORT_C void ConstructL();
   1.111 +
   1.112 +private:
   1.113 +	RDmDomain iDomain;
   1.114 +	TDmHierarchyId iHierarchyId;
   1.115 +	TDmDomainId iDomainId;
   1.116 +	TInt iReserved[4];	
   1.117 +	};
   1.118 +
   1.119 +
   1.120 +#endif