user: kashif.sayed
added dependencies/domaindefs.h
added dependencies/domainpolicy.h
added dependencies/ssm/ssmstates.hrh
changed dependencies/bld.inf
changed dependencies/ssm/bld.inf
--- a/dependencies/bld.inf Fri Mar 26 02:16:01 2010 +0530
+++ b/dependencies/bld.inf Fri Mar 26 02:22:35 2010 +0530
@@ -39,7 +39,8 @@
etelmm.h etelmm.h
ETELMMCS.H ETELMMCS.H
startupdomainpskeys.h startupdomainpskeys.h
-
+domaindefs.h domaindefs.h
+domainpolicy.h domainpolicy.h
#include "S3libs/bld.inf"
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dependencies/domaindefs.h Fri Mar 26 02:22:35 2010 +0530
@@ -0,0 +1,389 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// WARNING: This file contains some APIs which are internal and are subject
+// to change without notice. Such APIs should therefore not be used
+// outside the Kernel and Hardware Services package.
+//
+
+#ifndef __DOMAIN_DEFS_H__
+#define __DOMAIN_DEFS_H__
+
+#include <e32cmn.h>
+#include <e32power.h>
+
+/**
+@internalTechnology
+*/
+// Property category UID value reserved for Domain Management services.
+// This is the same as the process SID (see domainsrv.mmp)
+static const TInt32 KUidDmPropertyCategoryValue = 0x1020E406;
+/**
+@internalTechnology
+*/
+// Property category UID reserved for Domain Management services
+static const TUid KUidDmPropertyCategory = { KUidDmPropertyCategoryValue };
+/**
+@internalTechnology
+*/
+static const TUint KDmPropertyKeyInit = 0x00000001;
+
+
+
+
+/**
+@internalAll
+
+Defines the ways in which a domain hierarchy can be traversed.
+
+@see CDmDomainManager::RequestSystemTransition()
+@see CDmDomainManager::RequestDomainTransition()
+*/
+enum TDmTraverseDirection
+ {
+ /**
+ Transition parents first (i.e. before their children).
+ */
+ ETraverseParentsFirst,
+
+ /**
+ Transition children first (i.e. before their parents).
+ */
+ ETraverseChildrenFirst,
+
+ /**
+ Use the default direction specified in policy
+ */
+ ETraverseDefault,
+
+ /**
+ Maximum value for traverse mode
+ */
+ ETraverseMax = ETraverseDefault
+ };
+
+
+
+
+/**
+@internalAll
+
+Defines the type of transitions that will be notified to the observer.
+
+One of these values is specified when the observer is started through a
+call to CHierarchyObserver::StartObserver().
+*/
+enum TDmNotifyType
+ {
+ /**
+ Notifies the observer about all transition requests.
+ */
+ EDmNotifyTransRequest =0x02,
+
+ /**
+ Notifies the observer about successful transitions only.
+ */
+ EDmNotifyPass =0x04,
+
+ /**
+ Notifies the observer about failing transitions only.
+ */
+ EDmNotifyFail=0x08,
+
+ /**
+ Notifies the observer about all completed transitions.
+ */
+ EDmNotifyTransOnly=EDmNotifyPass|EDmNotifyFail,
+
+ /**
+ Notifies the observer about successful transitions and transition requests.
+ */
+ EDmNotifyReqNPass=EDmNotifyTransRequest|EDmNotifyPass,
+
+ /**
+ Notifies the observer about failed transitions and transition requests.
+ */
+ EDmNotifyReqNFail=EDmNotifyTransRequest|EDmNotifyFail,
+
+ /**
+ Notifies the observer about every event.
+ */
+ EDmNotifyAll=EDmNotifyTransRequest|EDmNotifyFail|EDmNotifyPass,
+ };
+
+
+
+
+/**
+@internalAll
+
+Domain hierarchy identifier type.
+
+Domain hierarchies are designated by "well known" domain hierarchy identifiers.
+The domain policy statically defines the list of domain hierarchies and their
+identifiers.
+
+@see RDmDomainManager::Connect()
+@see RDmDomainManager::AddDomainHierarchy()
+@see RDmDomain::Connect()
+@see CHierarchyObserver
+@see CDmDomainManager
+@see CDmDomain
+*/
+typedef TUint8 TDmHierarchyId;
+
+
+
+
+/**
+@internalAll
+
+A type used to describe the state of a domain.
+*/
+typedef TUint TDmDomainState;
+
+
+
+
+/**
+@internalTechnology
+
+The power domain hierarchy Id.
+*/
+static const TDmHierarchyId KDmHierarchyIdPower = 1;
+
+
+
+
+/**
+@internalAll
+
+The start-up domain hierarchy Id.
+*/
+static const TDmHierarchyId KDmHierarchyIdStartup = 2;
+
+
+
+/**
+@internalAll
+
+The start-up domain hierarchy Id. (For use by domain manager and/or SSMA)
+*/
+static const TDmHierarchyId KDmHierarchyIdSystemState = KDmHierarchyIdStartup;
+
+
+
+/**
+@publishedPartner
+@released
+
+Domain identifier type.
+
+Domains are designated by "well known" domain identifiers.
+The domain manager statically defines the list of domains and their identifiers.
+*/
+typedef TUint16 TDmDomainId;
+
+
+
+/**
+@internalAll
+
+A structure use to describe a transition failure.
+*/
+class TTransitionFailure
+ {
+public:
+ inline TTransitionFailure() {};
+ TTransitionFailure( TDmDomainId aDomainId, TInt aError);
+
+public:
+ /**
+ Id of the domain of interest
+ */
+ TDmDomainId iDomainId;
+ /**
+ error code in transition
+ */
+ TInt iError;
+ };
+
+
+/**
+@internalTechnology
+
+A structure use to describe a successful transition.
+*/
+class TTransInfo
+ {
+public:
+ inline TTransInfo() {};
+ TTransInfo( TDmDomainId aDomainId, TDmDomainState aState, TInt aError);
+
+public:
+ /**
+ Id of the domain of interest
+ */
+ TDmDomainId iDomainId;
+ /**
+ Final state of the domain after the transition
+ */
+ TDmDomainState iState;
+ /**
+ Any error in transition
+ */
+ TInt iError;
+ };
+
+
+
+
+/**
+@publishedPartner
+@released
+
+The null domain identifier.
+
+There are no domains with this identifier.
+*/
+static const TDmDomainId KDmIdNone = 0x00;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+The common ancestor of all domains.
+*/
+static const TDmDomainId KDmIdRoot = 0x01;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+The usual domain for all non-UI applications.
+*/
+static const TDmDomainId KDmIdApps = 0x02;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+The usual domain for all UI applications.
+*/
+static const TDmDomainId KDmIdUiApps = 0x03;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+Domain manager specific error code - the domain designated by
+the specified domain identifier does not exist.
+*/
+static const TInt KDmErrBadDomainId = -256;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+Domain manager specific error code - this RDmDomain object has already been
+connected to a domain.
+*/
+static const TInt KDmErrAlreadyJoin = -257;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+Domain manager specific error code - this RDmDomain object is not connected
+to any domain.
+*/
+static const TInt KDmErrNotJoin = -258;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+Domain manager specific error code - indicates a client-server protocol internal error.
+*/
+static const TInt KDmErrBadRequest = -259;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+Domain manager specific error code - indicates an internal Domain Manager error.
+*/
+static const TInt KDmErrBadDomainSpec = -260;
+
+
+
+
+/**
+@publishedPartner
+@released
+
+Domain manager specific error code - indicates a bad sequence of requests.
+
+Typically, this occurs when a new request been made while an ongoing domain
+transition request has not yet completed.
+*/
+static const TInt KDmErrBadSequence = -261;
+
+
+
+
+/**
+@internalTechnology
+
+Domain manager specific error code - indicates that a transition is outstanding.
+
+*/
+static const TInt KDmErrOutstanding = -262;
+
+
+
+
+/**
+@internalAll
+
+Domain manager specific error code - indicates that the domain hierarchy does not exist.
+*/
+static const TInt KErrBadHierarchyId = -263;
+
+#endif
+
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dependencies/domainpolicy.h Fri Mar 26 02:22:35 2010 +0530
@@ -0,0 +1,177 @@
+// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of the License "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+// WARNING: This file contains some APIs which are internal and are subject
+// to change without notice. Such APIs should therefore not be used
+// outside the Kernel and Hardware Services package.
+//
+
+#ifndef __DOMAIN_POLICY_H__
+#define __DOMAIN_POLICY_H__
+
+#include <e32std.h>
+
+#include <domaindefs.h>
+
+
+
+
+/**
+@publishedPartner
+@released
+
+Defines the characteristics of a domain.
+*/
+struct TDmDomainSpec
+ {
+ /**
+ The domain identifier.
+ */
+ TDmDomainId iId;
+
+ /**
+ The domain identifier of the domain's parent.
+ */
+ TDmDomainId iParentId;
+
+ /**
+ The security capability required to join this domain
+ */
+ TStaticSecurityPolicy iJoinPolicy;
+
+ /**
+ The initial state of the domain after construction.
+ */
+ TDmDomainState iInitState;
+
+ /**
+ The total time allowed for members of the domain to acknowledge
+ a transition.
+ */
+ TUint32 iTimeBudgetUs;
+ };
+
+
+
+
+/**
+@internalAll
+
+The possible ways in which the domain manager can behave
+when a transition fails.
+
+This is defined for each domain hierarchy.
+
+@see TDmHierarchyPolicy
+*/
+enum TDmTransitionFailurePolicy
+ {
+ /**
+ The domain manager stops at the first transition failure.
+ */
+ ETransitionFailureStop,
+
+ /**
+ The domain manager continues at any transition failure.
+ */
+ ETransitionFailureContinue
+ };
+
+
+
+/**
+@internalTechnology
+
+Defines the policy for a particular domain hierarchy.
+*/
+class TDmHierarchyPolicy
+ {
+public:
+ /**
+ direction of traverse if target state is after current state
+ */
+ TDmTraverseDirection iPositiveTransitions;
+ /**
+ direction of traverse if target state is before current state
+ */
+ TDmTraverseDirection iNegativeTransitions;
+ /**
+ policy which outlines the action upon transition failure
+ */
+ TDmTransitionFailurePolicy iFailurePolicy;
+ };
+
+
+/**
+@internalAll
+
+Defines the function type for a static function that is implemented by
+a device's domain policy DLL.
+
+The domain manager uses this function to access the hierarchy's policy.
+*/
+typedef const TDmDomainSpec* (*DmPolicyGetDomainSpecs)();
+
+
+/**
+@internalAll
+
+Defines the function type for a static function that is implemented by
+a device's domain policy DLL.
+
+The domain manager uses this function to release the domain
+hierarchy specification.
+*/
+typedef void (*DmPolicyRelease) (const TDmDomainSpec* aDomainSpec);
+
+
+/**
+@internalAll
+
+Defines the function type for a static function that is implemented by
+a device's domain policy DLL.
+
+The domain manager uses this function to access the domain
+hierarchy specification.
+*/
+typedef TInt (*DmPolicyGetPolicy) (TDmHierarchyPolicy& aPolicy);
+
+/**
+@publishedPartner
+@released
+
+A set of static functions implemented by a device's domain policy DLL that
+the domain manager uses to access, and release, the domain
+hierarchy specification.
+*/
+class DmPolicy
+ {
+public:
+ IMPORT_C static const TDmDomainSpec* GetDomainSpecs();
+ IMPORT_C static void Release(const TDmDomainSpec* aDomainSpec);
+ IMPORT_C static TInt GetPolicy(TDmHierarchyPolicy& aPolicy);
+ };
+
+
+/**
+@internalTechnology
+*/
+enum DmPolicyOrdinals
+ {
+ EDmPolicyGetDomainSpecs = 1,
+ EDmPolicyRelease,
+ EDmPolicyGetPolicy
+ };
+
+#endif
--- a/dependencies/ssm/bld.inf Fri Mar 26 02:16:01 2010 +0530
+++ b/dependencies/ssm/bld.inf Fri Mar 26 02:22:35 2010 +0530
@@ -6,4 +6,5 @@
startupreason.h ssm\startupreason.h
ssmdomaindefs.h ssm\ssmdomaindefs.h
ssmstate.h ssm\ssmstate.h
-ssmstateawaresession.h ssm\ssmstateawaresession.h
\ No newline at end of file
+ssmstateawaresession.h ssm\ssmstateawaresession.h
+ssmstates.hrh ssm\ssmstates.hrh
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/dependencies/ssm/ssmstates.hrh Fri Mar 26 02:22:35 2010 +0530
@@ -0,0 +1,53 @@
+// Copyright (c) 2007-2009 Nokia Corporation and/or its subsidiary(-ies).
+// All rights reserved.
+// This component and the accompanying materials are made available
+// under the terms of "Eclipse Public License v1.0"
+// which accompanies this distribution, and is available
+// at the URL "http://www.eclipse.org/legal/epl-v10.html".
+//
+// Initial Contributors:
+// Nokia Corporation - initial contribution.
+//
+// Contributors:
+//
+// Description:
+//
+
+#ifndef __SSMSTATES_HRH__
+#define __SSMSTATES_HRH__
+
+#include <e32def.h>
+
+/**
+ Enumeration of the main system states for the System State Manager
+
+ @see TSsmState
+
+ @publishedPartner
+ @released
+
+ The total value of the state can occupy a maximum of the lower 24 bits of a TUint32.
+ This has been divided into 8 bits (0-0xff for TSsmMainSystemStates, 16 bits (0-0xffff) for KSsmAnyMinorState
+*/
+enum TSsmMainSystemStates
+ {
+ ESsmStartup = 0, // This must be 0 for compatibility with existing GSA components
+ ESsmNormal,
+ ESsmShutdown,
+ ESsmFail,
+ ESsmBackup,
+ ESsmRestore,
+ ESsmEmergencyCallsOnly,
+ /** Main states are 16 bits, but 8 bits are reserved for internal use, so allowed values range is until 0xFF */
+ ESsmMainSystemStateMax = 0xFF
+ };
+
+/**
+ Represents any sub state, used for transitioning to policies where you don't know (or care)
+ about the sub state.
+ @publishedPartner
+@released
+ */
+const TUint16 KSsmAnySubState = 0xFFFF;
+
+#endif //__SSMSTATES_HRH__