os/kernelhwsrv/userlibandfileserver/domainmgr/inc/domaindefs.h
changeset 0 bde4ae8d615e
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/os/kernelhwsrv/userlibandfileserver/domainmgr/inc/domaindefs.h	Fri Jun 15 03:10:57 2012 +0200
     1.3 @@ -0,0 +1,389 @@
     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_DEFS_H__
    1.24 +#define __DOMAIN_DEFS_H__
    1.25 +
    1.26 +#include <e32cmn.h>
    1.27 +#include <e32power.h>
    1.28 +
    1.29 +/**
    1.30 +@internalTechnology
    1.31 +*/
    1.32 +// Property category UID value reserved for Domain Management services.
    1.33 +// This is the same as the process SID (see domainsrv.mmp)
    1.34 +static const TInt32 KUidDmPropertyCategoryValue = 0x1020E406;
    1.35 +/**
    1.36 +@internalTechnology
    1.37 +*/
    1.38 +// Property category UID reserved for Domain Management services
    1.39 +static const TUid KUidDmPropertyCategory = { KUidDmPropertyCategoryValue };
    1.40 +/**
    1.41 +@internalTechnology
    1.42 +*/
    1.43 +static const TUint KDmPropertyKeyInit				= 0x00000001;
    1.44 +
    1.45 +
    1.46 +
    1.47 +
    1.48 +/**
    1.49 +@internalAll
    1.50 +
    1.51 +Defines the ways in which a domain hierarchy can be traversed.
    1.52 +
    1.53 +@see CDmDomainManager::RequestSystemTransition()
    1.54 +@see CDmDomainManager::RequestDomainTransition()
    1.55 +*/
    1.56 +enum TDmTraverseDirection
    1.57 +	{
    1.58 +	/**
    1.59 +	Transition parents first (i.e. before their children).
    1.60 +	*/
    1.61 +	ETraverseParentsFirst,
    1.62 +
    1.63 +	/**
    1.64 +	Transition children first (i.e. before their parents).
    1.65 +	*/
    1.66 +	ETraverseChildrenFirst,
    1.67 +
    1.68 +	/**
    1.69 +	Use the default direction specified in policy
    1.70 +	*/
    1.71 +	ETraverseDefault,
    1.72 +	
    1.73 +	/**
    1.74 +	Maximum value for traverse mode
    1.75 +	*/
    1.76 +	ETraverseMax = ETraverseDefault
    1.77 +	};
    1.78 +
    1.79 +
    1.80 +
    1.81 +
    1.82 +/**
    1.83 +@internalAll
    1.84 +
    1.85 +Defines the type of transitions that will be notified to the observer.
    1.86 +
    1.87 +One of these values is specified when the observer is started through a 
    1.88 +call to CHierarchyObserver::StartObserver().
    1.89 +*/
    1.90 +enum TDmNotifyType
    1.91 +	{
    1.92 +	/**
    1.93 +	Notifies the observer about all transition requests.
    1.94 +	*/
    1.95 +	EDmNotifyTransRequest =0x02,
    1.96 +	
    1.97 +	/**
    1.98 +	Notifies the observer about successful transitions only.
    1.99 +	*/
   1.100 +	EDmNotifyPass =0x04, 
   1.101 +	
   1.102 +	/**
   1.103 +	Notifies the observer about failing transitions only.
   1.104 +	*/
   1.105 +	EDmNotifyFail=0x08, 
   1.106 +	
   1.107 +	/**
   1.108 +	Notifies the observer about all completed transitions.
   1.109 +	*/
   1.110 +	EDmNotifyTransOnly=EDmNotifyPass|EDmNotifyFail,
   1.111 +	
   1.112 +	/**
   1.113 +	Notifies the observer about successful transitions and transition requests.
   1.114 +	*/
   1.115 +	EDmNotifyReqNPass=EDmNotifyTransRequest|EDmNotifyPass,
   1.116 +	
   1.117 +	/**
   1.118 +	Notifies the observer about failed transitions and transition requests.
   1.119 +	*/
   1.120 +	EDmNotifyReqNFail=EDmNotifyTransRequest|EDmNotifyFail,
   1.121 +	
   1.122 +	/**
   1.123 +	Notifies the observer about every event.
   1.124 +	*/
   1.125 +	EDmNotifyAll=EDmNotifyTransRequest|EDmNotifyFail|EDmNotifyPass, 
   1.126 +	};
   1.127 +
   1.128 +
   1.129 +
   1.130 +
   1.131 +/**
   1.132 +@internalAll
   1.133 +
   1.134 +Domain hierarchy identifier type.
   1.135 + 
   1.136 +Domain hierarchies are designated by "well known" domain hierarchy identifiers.
   1.137 +The domain policy statically defines the list of domain hierarchies and their 
   1.138 +identifiers.
   1.139 +
   1.140 +@see RDmDomainManager::Connect()
   1.141 +@see RDmDomainManager::AddDomainHierarchy()
   1.142 +@see RDmDomain::Connect()
   1.143 +@see CHierarchyObserver
   1.144 +@see CDmDomainManager
   1.145 +@see CDmDomain
   1.146 +*/
   1.147 +typedef TUint8 TDmHierarchyId;
   1.148 +
   1.149 +
   1.150 +
   1.151 +
   1.152 +/**
   1.153 +@internalAll
   1.154 +
   1.155 +A type used to describe the state of a domain.
   1.156 +*/
   1.157 +typedef TUint TDmDomainState;
   1.158 +
   1.159 +
   1.160 +
   1.161 +
   1.162 +/**
   1.163 +@internalTechnology
   1.164 +
   1.165 +The power domain hierarchy Id.
   1.166 +*/
   1.167 +static const TDmHierarchyId	KDmHierarchyIdPower		= 1;
   1.168 +
   1.169 +
   1.170 +
   1.171 +
   1.172 +/**
   1.173 +@internalAll
   1.174 +
   1.175 +The start-up domain hierarchy Id.
   1.176 +*/
   1.177 +static const TDmHierarchyId	KDmHierarchyIdStartup	= 2;
   1.178 +
   1.179 +
   1.180 +
   1.181 +/**
   1.182 +@internalAll
   1.183 +
   1.184 +The start-up domain hierarchy Id. (For use by domain manager and/or SSMA)
   1.185 +*/
   1.186 +static const TDmHierarchyId KDmHierarchyIdSystemState = KDmHierarchyIdStartup;
   1.187 +
   1.188 +
   1.189 +
   1.190 +/**
   1.191 +@publishedPartner
   1.192 +@released
   1.193 +
   1.194 +Domain identifier type.
   1.195 + 
   1.196 +Domains are designated by "well known" domain identifiers.
   1.197 +The domain manager statically defines the list of domains and their identifiers.
   1.198 +*/
   1.199 +typedef TUint16 TDmDomainId;
   1.200 +
   1.201 +
   1.202 +
   1.203 +/**
   1.204 +@internalAll
   1.205 +
   1.206 +A structure use to describe a transition failure.
   1.207 +*/
   1.208 +class TTransitionFailure
   1.209 +	{
   1.210 +public:
   1.211 +	inline TTransitionFailure() {};
   1.212 +	TTransitionFailure(	TDmDomainId aDomainId, TInt aError);
   1.213 +
   1.214 +public:
   1.215 +	/**
   1.216 +	Id of the domain of interest
   1.217 +	*/
   1.218 +	TDmDomainId iDomainId;
   1.219 +	/**
   1.220 +	error code in transition
   1.221 +	*/
   1.222 +	TInt iError;
   1.223 +	};
   1.224 +
   1.225 +
   1.226 +/**
   1.227 +@internalTechnology
   1.228 +
   1.229 +A structure use to describe a successful transition.
   1.230 +*/
   1.231 +class TTransInfo
   1.232 +	{
   1.233 +public:
   1.234 +	inline TTransInfo() {};
   1.235 +	TTransInfo(	TDmDomainId aDomainId, TDmDomainState aState, TInt aError);
   1.236 +
   1.237 +public:
   1.238 +	/**
   1.239 +	Id of the domain of interest
   1.240 +	*/
   1.241 +	TDmDomainId iDomainId;				 
   1.242 +	/**
   1.243 +	Final state of the domain after the transition 
   1.244 +	*/
   1.245 +	TDmDomainState iState;
   1.246 +	/**
   1.247 +	Any error in transition
   1.248 +	*/
   1.249 +	TInt iError;
   1.250 +	};
   1.251 +
   1.252 +
   1.253 +
   1.254 +
   1.255 +/**
   1.256 +@publishedPartner
   1.257 +@released
   1.258 +
   1.259 +The null domain identifier.
   1.260 +
   1.261 +There are no domains with this identifier.
   1.262 +*/
   1.263 +static const TDmDomainId	KDmIdNone	= 0x00;
   1.264 +
   1.265 +
   1.266 +
   1.267 +
   1.268 +/**
   1.269 +@publishedPartner
   1.270 +@released
   1.271 +
   1.272 +The common ancestor of all domains.
   1.273 +*/
   1.274 +static const TDmDomainId	KDmIdRoot	= 0x01;
   1.275 +
   1.276 +
   1.277 +
   1.278 +
   1.279 +/**
   1.280 +@publishedPartner
   1.281 +@released
   1.282 +
   1.283 +The usual domain for all non-UI applications.
   1.284 +*/
   1.285 +static const TDmDomainId	KDmIdApps	= 0x02;
   1.286 +
   1.287 +
   1.288 +
   1.289 +
   1.290 +/**
   1.291 +@publishedPartner
   1.292 +@released
   1.293 +
   1.294 +The usual domain for all UI applications.
   1.295 +*/
   1.296 +static const TDmDomainId	KDmIdUiApps	= 0x03;
   1.297 +
   1.298 +
   1.299 +
   1.300 +
   1.301 +/**
   1.302 +@publishedPartner
   1.303 +@released
   1.304 +
   1.305 +Domain manager specific error code - the domain designated by
   1.306 +the specified domain identifier does not exist.
   1.307 +*/
   1.308 +static const TInt KDmErrBadDomainId		= -256;
   1.309 +
   1.310 +
   1.311 +
   1.312 +
   1.313 +/**
   1.314 +@publishedPartner
   1.315 +@released
   1.316 +
   1.317 +Domain manager specific error code - this RDmDomain object has already been
   1.318 +connected to a domain.
   1.319 +*/
   1.320 +static const TInt KDmErrAlreadyJoin		= -257;
   1.321 +
   1.322 +
   1.323 +
   1.324 +
   1.325 +/**
   1.326 +@publishedPartner
   1.327 +@released
   1.328 +
   1.329 +Domain manager specific error code - this RDmDomain object is not connected
   1.330 +to any domain.
   1.331 +*/
   1.332 +static const TInt KDmErrNotJoin			= -258;
   1.333 +
   1.334 +
   1.335 +
   1.336 +
   1.337 +/**
   1.338 +@publishedPartner
   1.339 +@released
   1.340 +
   1.341 +Domain manager specific error code - indicates a client-server protocol internal error.
   1.342 +*/
   1.343 +static const TInt KDmErrBadRequest		= -259;
   1.344 +
   1.345 +
   1.346 +
   1.347 +
   1.348 +/**
   1.349 +@publishedPartner
   1.350 +@released
   1.351 +
   1.352 +Domain manager specific error code - indicates an internal Domain Manager error.
   1.353 +*/
   1.354 +static const TInt KDmErrBadDomainSpec	= -260;
   1.355 +
   1.356 +
   1.357 +
   1.358 +
   1.359 +/**
   1.360 +@publishedPartner
   1.361 +@released
   1.362 +
   1.363 +Domain manager specific error code - indicates a bad sequence of requests.
   1.364 +
   1.365 +Typically, this occurs when a new request been made while an ongoing domain
   1.366 +transition request has not yet completed.
   1.367 +*/
   1.368 +static const TInt KDmErrBadSequence		= -261;
   1.369 +
   1.370 +
   1.371 +
   1.372 +
   1.373 +/**
   1.374 +@internalTechnology
   1.375 +
   1.376 +Domain manager specific error code - indicates that a transition is outstanding.
   1.377 + 
   1.378 +*/
   1.379 +static const TInt KDmErrOutstanding		= -262;
   1.380 +
   1.381 +
   1.382 +
   1.383 +
   1.384 +/**
   1.385 +@internalAll
   1.386 +
   1.387 +Domain manager specific error code - indicates that the domain hierarchy does not exist.
   1.388 +*/
   1.389 +static const TInt KErrBadHierarchyId	= -263;
   1.390 +
   1.391 +#endif
   1.392 +