os/kernelhwsrv/userlibandfileserver/domainmgr/inc/domaindefs.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_DEFS_H__
sl@0
    21
#define __DOMAIN_DEFS_H__
sl@0
    22
sl@0
    23
#include <e32cmn.h>
sl@0
    24
#include <e32power.h>
sl@0
    25
sl@0
    26
/**
sl@0
    27
@internalTechnology
sl@0
    28
*/
sl@0
    29
// Property category UID value reserved for Domain Management services.
sl@0
    30
// This is the same as the process SID (see domainsrv.mmp)
sl@0
    31
static const TInt32 KUidDmPropertyCategoryValue = 0x1020E406;
sl@0
    32
/**
sl@0
    33
@internalTechnology
sl@0
    34
*/
sl@0
    35
// Property category UID reserved for Domain Management services
sl@0
    36
static const TUid KUidDmPropertyCategory = { KUidDmPropertyCategoryValue };
sl@0
    37
/**
sl@0
    38
@internalTechnology
sl@0
    39
*/
sl@0
    40
static const TUint KDmPropertyKeyInit				= 0x00000001;
sl@0
    41
sl@0
    42
sl@0
    43
sl@0
    44
sl@0
    45
/**
sl@0
    46
@internalAll
sl@0
    47
sl@0
    48
Defines the ways in which a domain hierarchy can be traversed.
sl@0
    49
sl@0
    50
@see CDmDomainManager::RequestSystemTransition()
sl@0
    51
@see CDmDomainManager::RequestDomainTransition()
sl@0
    52
*/
sl@0
    53
enum TDmTraverseDirection
sl@0
    54
	{
sl@0
    55
	/**
sl@0
    56
	Transition parents first (i.e. before their children).
sl@0
    57
	*/
sl@0
    58
	ETraverseParentsFirst,
sl@0
    59
sl@0
    60
	/**
sl@0
    61
	Transition children first (i.e. before their parents).
sl@0
    62
	*/
sl@0
    63
	ETraverseChildrenFirst,
sl@0
    64
sl@0
    65
	/**
sl@0
    66
	Use the default direction specified in policy
sl@0
    67
	*/
sl@0
    68
	ETraverseDefault,
sl@0
    69
	
sl@0
    70
	/**
sl@0
    71
	Maximum value for traverse mode
sl@0
    72
	*/
sl@0
    73
	ETraverseMax = ETraverseDefault
sl@0
    74
	};
sl@0
    75
sl@0
    76
sl@0
    77
sl@0
    78
sl@0
    79
/**
sl@0
    80
@internalAll
sl@0
    81
sl@0
    82
Defines the type of transitions that will be notified to the observer.
sl@0
    83
sl@0
    84
One of these values is specified when the observer is started through a 
sl@0
    85
call to CHierarchyObserver::StartObserver().
sl@0
    86
*/
sl@0
    87
enum TDmNotifyType
sl@0
    88
	{
sl@0
    89
	/**
sl@0
    90
	Notifies the observer about all transition requests.
sl@0
    91
	*/
sl@0
    92
	EDmNotifyTransRequest =0x02,
sl@0
    93
	
sl@0
    94
	/**
sl@0
    95
	Notifies the observer about successful transitions only.
sl@0
    96
	*/
sl@0
    97
	EDmNotifyPass =0x04, 
sl@0
    98
	
sl@0
    99
	/**
sl@0
   100
	Notifies the observer about failing transitions only.
sl@0
   101
	*/
sl@0
   102
	EDmNotifyFail=0x08, 
sl@0
   103
	
sl@0
   104
	/**
sl@0
   105
	Notifies the observer about all completed transitions.
sl@0
   106
	*/
sl@0
   107
	EDmNotifyTransOnly=EDmNotifyPass|EDmNotifyFail,
sl@0
   108
	
sl@0
   109
	/**
sl@0
   110
	Notifies the observer about successful transitions and transition requests.
sl@0
   111
	*/
sl@0
   112
	EDmNotifyReqNPass=EDmNotifyTransRequest|EDmNotifyPass,
sl@0
   113
	
sl@0
   114
	/**
sl@0
   115
	Notifies the observer about failed transitions and transition requests.
sl@0
   116
	*/
sl@0
   117
	EDmNotifyReqNFail=EDmNotifyTransRequest|EDmNotifyFail,
sl@0
   118
	
sl@0
   119
	/**
sl@0
   120
	Notifies the observer about every event.
sl@0
   121
	*/
sl@0
   122
	EDmNotifyAll=EDmNotifyTransRequest|EDmNotifyFail|EDmNotifyPass, 
sl@0
   123
	};
sl@0
   124
sl@0
   125
sl@0
   126
sl@0
   127
sl@0
   128
/**
sl@0
   129
@internalAll
sl@0
   130
sl@0
   131
Domain hierarchy identifier type.
sl@0
   132
 
sl@0
   133
Domain hierarchies are designated by "well known" domain hierarchy identifiers.
sl@0
   134
The domain policy statically defines the list of domain hierarchies and their 
sl@0
   135
identifiers.
sl@0
   136
sl@0
   137
@see RDmDomainManager::Connect()
sl@0
   138
@see RDmDomainManager::AddDomainHierarchy()
sl@0
   139
@see RDmDomain::Connect()
sl@0
   140
@see CHierarchyObserver
sl@0
   141
@see CDmDomainManager
sl@0
   142
@see CDmDomain
sl@0
   143
*/
sl@0
   144
typedef TUint8 TDmHierarchyId;
sl@0
   145
sl@0
   146
sl@0
   147
sl@0
   148
sl@0
   149
/**
sl@0
   150
@internalAll
sl@0
   151
sl@0
   152
A type used to describe the state of a domain.
sl@0
   153
*/
sl@0
   154
typedef TUint TDmDomainState;
sl@0
   155
sl@0
   156
sl@0
   157
sl@0
   158
sl@0
   159
/**
sl@0
   160
@internalTechnology
sl@0
   161
sl@0
   162
The power domain hierarchy Id.
sl@0
   163
*/
sl@0
   164
static const TDmHierarchyId	KDmHierarchyIdPower		= 1;
sl@0
   165
sl@0
   166
sl@0
   167
sl@0
   168
sl@0
   169
/**
sl@0
   170
@internalAll
sl@0
   171
sl@0
   172
The start-up domain hierarchy Id.
sl@0
   173
*/
sl@0
   174
static const TDmHierarchyId	KDmHierarchyIdStartup	= 2;
sl@0
   175
sl@0
   176
sl@0
   177
sl@0
   178
/**
sl@0
   179
@internalAll
sl@0
   180
sl@0
   181
The start-up domain hierarchy Id. (For use by domain manager and/or SSMA)
sl@0
   182
*/
sl@0
   183
static const TDmHierarchyId KDmHierarchyIdSystemState = KDmHierarchyIdStartup;
sl@0
   184
sl@0
   185
sl@0
   186
sl@0
   187
/**
sl@0
   188
@publishedPartner
sl@0
   189
@released
sl@0
   190
sl@0
   191
Domain identifier type.
sl@0
   192
 
sl@0
   193
Domains are designated by "well known" domain identifiers.
sl@0
   194
The domain manager statically defines the list of domains and their identifiers.
sl@0
   195
*/
sl@0
   196
typedef TUint16 TDmDomainId;
sl@0
   197
sl@0
   198
sl@0
   199
sl@0
   200
/**
sl@0
   201
@internalAll
sl@0
   202
sl@0
   203
A structure use to describe a transition failure.
sl@0
   204
*/
sl@0
   205
class TTransitionFailure
sl@0
   206
	{
sl@0
   207
public:
sl@0
   208
	inline TTransitionFailure() {};
sl@0
   209
	TTransitionFailure(	TDmDomainId aDomainId, TInt aError);
sl@0
   210
sl@0
   211
public:
sl@0
   212
	/**
sl@0
   213
	Id of the domain of interest
sl@0
   214
	*/
sl@0
   215
	TDmDomainId iDomainId;
sl@0
   216
	/**
sl@0
   217
	error code in transition
sl@0
   218
	*/
sl@0
   219
	TInt iError;
sl@0
   220
	};
sl@0
   221
sl@0
   222
sl@0
   223
/**
sl@0
   224
@internalTechnology
sl@0
   225
sl@0
   226
A structure use to describe a successful transition.
sl@0
   227
*/
sl@0
   228
class TTransInfo
sl@0
   229
	{
sl@0
   230
public:
sl@0
   231
	inline TTransInfo() {};
sl@0
   232
	TTransInfo(	TDmDomainId aDomainId, TDmDomainState aState, TInt aError);
sl@0
   233
sl@0
   234
public:
sl@0
   235
	/**
sl@0
   236
	Id of the domain of interest
sl@0
   237
	*/
sl@0
   238
	TDmDomainId iDomainId;				 
sl@0
   239
	/**
sl@0
   240
	Final state of the domain after the transition 
sl@0
   241
	*/
sl@0
   242
	TDmDomainState iState;
sl@0
   243
	/**
sl@0
   244
	Any error in transition
sl@0
   245
	*/
sl@0
   246
	TInt iError;
sl@0
   247
	};
sl@0
   248
sl@0
   249
sl@0
   250
sl@0
   251
sl@0
   252
/**
sl@0
   253
@publishedPartner
sl@0
   254
@released
sl@0
   255
sl@0
   256
The null domain identifier.
sl@0
   257
sl@0
   258
There are no domains with this identifier.
sl@0
   259
*/
sl@0
   260
static const TDmDomainId	KDmIdNone	= 0x00;
sl@0
   261
sl@0
   262
sl@0
   263
sl@0
   264
sl@0
   265
/**
sl@0
   266
@publishedPartner
sl@0
   267
@released
sl@0
   268
sl@0
   269
The common ancestor of all domains.
sl@0
   270
*/
sl@0
   271
static const TDmDomainId	KDmIdRoot	= 0x01;
sl@0
   272
sl@0
   273
sl@0
   274
sl@0
   275
sl@0
   276
/**
sl@0
   277
@publishedPartner
sl@0
   278
@released
sl@0
   279
sl@0
   280
The usual domain for all non-UI applications.
sl@0
   281
*/
sl@0
   282
static const TDmDomainId	KDmIdApps	= 0x02;
sl@0
   283
sl@0
   284
sl@0
   285
sl@0
   286
sl@0
   287
/**
sl@0
   288
@publishedPartner
sl@0
   289
@released
sl@0
   290
sl@0
   291
The usual domain for all UI applications.
sl@0
   292
*/
sl@0
   293
static const TDmDomainId	KDmIdUiApps	= 0x03;
sl@0
   294
sl@0
   295
sl@0
   296
sl@0
   297
sl@0
   298
/**
sl@0
   299
@publishedPartner
sl@0
   300
@released
sl@0
   301
sl@0
   302
Domain manager specific error code - the domain designated by
sl@0
   303
the specified domain identifier does not exist.
sl@0
   304
*/
sl@0
   305
static const TInt KDmErrBadDomainId		= -256;
sl@0
   306
sl@0
   307
sl@0
   308
sl@0
   309
sl@0
   310
/**
sl@0
   311
@publishedPartner
sl@0
   312
@released
sl@0
   313
sl@0
   314
Domain manager specific error code - this RDmDomain object has already been
sl@0
   315
connected to a domain.
sl@0
   316
*/
sl@0
   317
static const TInt KDmErrAlreadyJoin		= -257;
sl@0
   318
sl@0
   319
sl@0
   320
sl@0
   321
sl@0
   322
/**
sl@0
   323
@publishedPartner
sl@0
   324
@released
sl@0
   325
sl@0
   326
Domain manager specific error code - this RDmDomain object is not connected
sl@0
   327
to any domain.
sl@0
   328
*/
sl@0
   329
static const TInt KDmErrNotJoin			= -258;
sl@0
   330
sl@0
   331
sl@0
   332
sl@0
   333
sl@0
   334
/**
sl@0
   335
@publishedPartner
sl@0
   336
@released
sl@0
   337
sl@0
   338
Domain manager specific error code - indicates a client-server protocol internal error.
sl@0
   339
*/
sl@0
   340
static const TInt KDmErrBadRequest		= -259;
sl@0
   341
sl@0
   342
sl@0
   343
sl@0
   344
sl@0
   345
/**
sl@0
   346
@publishedPartner
sl@0
   347
@released
sl@0
   348
sl@0
   349
Domain manager specific error code - indicates an internal Domain Manager error.
sl@0
   350
*/
sl@0
   351
static const TInt KDmErrBadDomainSpec	= -260;
sl@0
   352
sl@0
   353
sl@0
   354
sl@0
   355
sl@0
   356
/**
sl@0
   357
@publishedPartner
sl@0
   358
@released
sl@0
   359
sl@0
   360
Domain manager specific error code - indicates a bad sequence of requests.
sl@0
   361
sl@0
   362
Typically, this occurs when a new request been made while an ongoing domain
sl@0
   363
transition request has not yet completed.
sl@0
   364
*/
sl@0
   365
static const TInt KDmErrBadSequence		= -261;
sl@0
   366
sl@0
   367
sl@0
   368
sl@0
   369
sl@0
   370
/**
sl@0
   371
@internalTechnology
sl@0
   372
sl@0
   373
Domain manager specific error code - indicates that a transition is outstanding.
sl@0
   374
 
sl@0
   375
*/
sl@0
   376
static const TInt KDmErrOutstanding		= -262;
sl@0
   377
sl@0
   378
sl@0
   379
sl@0
   380
sl@0
   381
/**
sl@0
   382
@internalAll
sl@0
   383
sl@0
   384
Domain manager specific error code - indicates that the domain hierarchy does not exist.
sl@0
   385
*/
sl@0
   386
static const TInt KErrBadHierarchyId	= -263;
sl@0
   387
sl@0
   388
#endif
sl@0
   389