|
1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Provides domain manager and member server message definitions and |
|
15 // DmStateXXX inlines. |
|
16 // |
|
17 // |
|
18 |
|
19 #ifndef __DOMAIN_SRV_H__ |
|
20 #define __DOMAIN_SRV_H__ |
|
21 |
|
22 #include <e32def.h> |
|
23 |
|
24 #include <domaindefs.h> |
|
25 |
|
26 _LIT(KDmDomainServerNameLit,"!DmDomainServer"); |
|
27 #define KDmDomainServerVersion TVersion(1, 0, 0) |
|
28 _LIT(KDmManagerServerNameLit,"!DmManagerServer"); |
|
29 #define KDmManagerServerVersion TVersion(1, 0, 0) |
|
30 |
|
31 #ifdef __DS_DEBUG |
|
32 #include <e32debug.h> |
|
33 #define __DS_TRACE(s) RDebug::Print s |
|
34 #else |
|
35 #define __DS_TRACE(s) |
|
36 #endif |
|
37 |
|
38 enum TMemberRequests |
|
39 { |
|
40 EDmDomainJoin, |
|
41 EDmStateAcknowledge, |
|
42 EDmStateRequestTransitionNotification, |
|
43 EDmStateCancelTransitionNotification, |
|
44 EDmStateDeferAcknowledgement, |
|
45 EDmStateCancelDeferral |
|
46 }; |
|
47 |
|
48 enum TControllerRequests |
|
49 { |
|
50 EDmRequestSystemTransition, |
|
51 EDmRequestDomainTransition, |
|
52 EDmCancelTransition, |
|
53 EDmHierarchyJoin, |
|
54 EDmHierarchyAdd, |
|
55 EDmGetTransitionFailureCount, |
|
56 EDmGetTransitionFailures, |
|
57 EDmObserverJoin, |
|
58 EDmObserverStart, |
|
59 EDmObserverStop, |
|
60 EDmObserverNotify, |
|
61 EDmObserverEventCount, |
|
62 EDmObserverGetEvent, |
|
63 EDmObserverCancel, |
|
64 EDmObserveredCount |
|
65 }; |
|
66 |
|
67 inline TInt DmStatePropertyKey(TDmHierarchyId aHierarchyId, TDmDomainId aDomainId) |
|
68 { return (TInt) ((aHierarchyId << 8) | ((aDomainId << 8) & 0xff0000) | (aDomainId & 0xff) ); } |
|
69 |
|
70 inline TInt DmStatePropertyValue(TUint aId, TUint32 aState) |
|
71 { return (TInt) ((aId << 24) | (aState & 0xffffff)); } |
|
72 |
|
73 inline TDmDomainState DmStateFromPropertyValue(TInt aValue) |
|
74 { return (TDmDomainState) (aValue & 0xffffff); } |
|
75 |
|
76 #endif |