sl@0: // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). sl@0: // All rights reserved. sl@0: // This component and the accompanying materials are made available sl@0: // under the terms of the License "Eclipse Public License v1.0" sl@0: // which accompanies this distribution, and is available sl@0: // at the URL "http://www.eclipse.org/legal/epl-v10.html". sl@0: // sl@0: // Initial Contributors: sl@0: // Nokia Corporation - initial contribution. sl@0: // sl@0: // Contributors: sl@0: // sl@0: // Description: sl@0: // domain\src\domainsrv.h sl@0: // sl@0: // sl@0: sl@0: #ifndef __DOMAIN_SRV_H__ sl@0: #define __DOMAIN_SRV_H__ sl@0: sl@0: #include sl@0: sl@0: #include sl@0: sl@0: _LIT(KDmDomainServerNameLit,"!DmDomainServer"); sl@0: #define KDmDomainServerVersion TVersion(1, 0, 0) sl@0: _LIT(KDmManagerServerNameLit,"!DmManagerServer"); sl@0: #define KDmManagerServerVersion TVersion(1, 0, 0) sl@0: sl@0: enum sl@0: { sl@0: EDmDomainJoin, sl@0: EDmStateAcknowledge, sl@0: EDmStateRequestTransitionNotification, sl@0: EDmStateCancelTransitionNotification sl@0: }; sl@0: sl@0: enum sl@0: { sl@0: EDmRequestSystemTransition, sl@0: EDmRequestDomainTransition, sl@0: EDmCancelTransition, sl@0: EDmHierarchyJoin, sl@0: EDmHierarchyAdd, sl@0: EDmGetTransitionFailureCount, sl@0: EDmGetTransitionFailures, sl@0: EDmObserverJoin, sl@0: EDmObserverStart, sl@0: EDmObserverStop, sl@0: EDmObserverNotify, sl@0: EDmObserverEventCount, sl@0: EDmObserverGetEvent, sl@0: EDmObserverCancel, sl@0: EDmObserveredCount sl@0: }; sl@0: sl@0: inline TInt DmStatePropertyKey(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId) sl@0: { return (TInt) ((aHierarchyId << 8) | ((aDomainId << 8) & 0xff0000) | (aDomainId & 0xff) ); } sl@0: sl@0: inline TInt DmStatePropertyValue(TUint aId, TUint32 aState) sl@0: { return (TInt) ((aId << 24) | (aState & 0xffffff)); } sl@0: sl@0: inline TDmDomainState DmStateFromPropertyValue(TInt aValue) sl@0: { return (TDmDomainState) (aValue & 0xffffff); } sl@0: sl@0: #endif