os/kernelhwsrv/userlibandfileserver/domainmgr/inc/domainmember.h
author sl
Tue, 10 Jun 2014 14:32:02 +0200
changeset 1 260cb5ec6c19
permissions -rw-r--r--
Update contrib.
sl@0
     1
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
sl@0
     2
// All rights reserved.
sl@0
     3
// This component and the accompanying materials are made available
sl@0
     4
// under the terms of the License "Eclipse Public License v1.0"
sl@0
     5
// which accompanies this distribution, and is available
sl@0
     6
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
sl@0
     7
//
sl@0
     8
// Initial Contributors:
sl@0
     9
// Nokia Corporation - initial contribution.
sl@0
    10
//
sl@0
    11
// Contributors:
sl@0
    12
//
sl@0
    13
// Description:
sl@0
    14
//
sl@0
    15
// WARNING: This file contains some APIs which are internal and are subject
sl@0
    16
//          to change without notice. Such APIs should therefore not be used
sl@0
    17
//          outside the Kernel and Hardware Services package.
sl@0
    18
//
sl@0
    19
sl@0
    20
#ifndef __DOMAIN_MEMBER_H__
sl@0
    21
#define __DOMAIN_MEMBER_H__
sl@0
    22
sl@0
    23
#include <e32std.h>
sl@0
    24
#include <e32property.h>
sl@0
    25
#include <domaindefs.h>
sl@0
    26
sl@0
    27
/**
sl@0
    28
@internalComponent
sl@0
    29
*/
sl@0
    30
class RDmDomainSession : public RSessionBase
sl@0
    31
	{
sl@0
    32
public:
sl@0
    33
	TInt Connect(TDmHierarchyId aHierarchyId, TDmDomainId, TUint* aKey);
sl@0
    34
	void Acknowledge(TInt aValue, TInt aError);
sl@0
    35
	void RequestTransitionNotification();
sl@0
    36
	void CancelTransitionNotification();
sl@0
    37
	};
sl@0
    38
sl@0
    39
sl@0
    40
/**
sl@0
    41
@publishedPartner
sl@0
    42
@released
sl@0
    43
sl@0
    44
The application's interface to the domain manager.
sl@0
    45
*/
sl@0
    46
class RDmDomain
sl@0
    47
	{
sl@0
    48
public:
sl@0
    49
	IMPORT_C TInt Connect(TDmDomainId aId);
sl@0
    50
	IMPORT_C void Close();
sl@0
    51
sl@0
    52
	IMPORT_C void RequestTransitionNotification(TRequestStatus& aStatus);
sl@0
    53
	IMPORT_C void CancelTransitionNotification();
sl@0
    54
sl@0
    55
	IMPORT_C TPowerState GetPowerState();
sl@0
    56
	IMPORT_C void AcknowledgeLastState();
sl@0
    57
sl@0
    58
	/**
sl@0
    59
	@internalAll
sl@0
    60
	*/
sl@0
    61
	IMPORT_C TInt Connect(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId);
sl@0
    62
	/**
sl@0
    63
	@internalAll
sl@0
    64
	*/
sl@0
    65
	IMPORT_C void AcknowledgeLastState(TInt aError);
sl@0
    66
	/**
sl@0
    67
	@internalAll
sl@0
    68
	*/
sl@0
    69
	IMPORT_C TDmDomainState GetState();
sl@0
    70
sl@0
    71
private:
sl@0
    72
	RDmDomainSession	iSession;
sl@0
    73
	RProperty			iStateProperty;
sl@0
    74
	TInt				iLastStatePropertyValue;	
sl@0
    75
	};
sl@0
    76
sl@0
    77
sl@0
    78
sl@0
    79
/**
sl@0
    80
@publishedPartner
sl@0
    81
@released
sl@0
    82
sl@0
    83
An abstract class for interfacing to a domain managed by the domain manager.
sl@0
    84
sl@0
    85
To make use of this class an application must derive from it and implement a RunL()
sl@0
    86
method to handle notifications.
sl@0
    87
*/
sl@0
    88
class CDmDomain : public CActive
sl@0
    89
	{
sl@0
    90
public:
sl@0
    91
	IMPORT_C CDmDomain(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId);
sl@0
    92
	IMPORT_C ~CDmDomain();
sl@0
    93
sl@0
    94
	IMPORT_C void RequestTransitionNotification();
sl@0
    95
	/**
sl@0
    96
	@internalTechnology
sl@0
    97
	*/
sl@0
    98
	IMPORT_C void AcknowledgeLastState(TInt aError);
sl@0
    99
	/**
sl@0
   100
	@internalTechnology
sl@0
   101
	*/
sl@0
   102
	IMPORT_C TDmDomainState GetState();
sl@0
   103
	virtual void RunL() = 0;
sl@0
   104
protected:
sl@0
   105
	// from CActive
sl@0
   106
	IMPORT_C void DoCancel();
sl@0
   107
	IMPORT_C void ConstructL();
sl@0
   108
sl@0
   109
private:
sl@0
   110
	RDmDomain iDomain;
sl@0
   111
	TDmHierarchyId iHierarchyId;
sl@0
   112
	TDmDomainId iDomainId;
sl@0
   113
	TInt iReserved[4];	
sl@0
   114
	};
sl@0
   115
sl@0
   116
sl@0
   117
#endif