|
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 "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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalComponent |
|
19 */ |
|
20 |
|
21 #if !defined(__SS_MSGS_H__) |
|
22 #define __SS_MSGS_H__ |
|
23 |
|
24 #include <elements/sd_msgs.h> |
|
25 //#include <elements/msgintercept_macro.h> |
|
26 |
|
27 namespace ESock |
|
28 { |
|
29 class RTierThreadMap; |
|
30 } |
|
31 |
|
32 /** |
|
33 @class TWorkerCookiesMsg |
|
34 */ |
|
35 class TWorkerCookiesMsg : public Den::TWorkerMsg |
|
36 { |
|
37 public: |
|
38 enum {KCode = Den::TWorkerMsg::EWorkerCookies};//< Message code |
|
39 inline TWorkerCookiesMsg ( |
|
40 const Messages::TNodeId& aDataPlaneFC, |
|
41 const Messages::TNodeId& aSubConnPlaneFC, |
|
42 const Messages::TNodeId& aConnPlaneFC, |
|
43 const Messages::TNodeId& aMetaConnPlaneFC, |
|
44 const Messages::TNodeId& aTierManagerFC |
|
45 ) |
|
46 : Den::TWorkerMsg(KCode) |
|
47 { |
|
48 TParams* params=reinterpret_cast<TParams*>(ParamBlock()); |
|
49 Mem::FillZ(params, sizeof(TParams)); |
|
50 params->iDataPlaneFC = aDataPlaneFC; |
|
51 params->iSubConnPlaneFC = aSubConnPlaneFC; |
|
52 params->iConnPlaneFC = aConnPlaneFC; |
|
53 params->iMetaConnPlaneFC = aMetaConnPlaneFC; |
|
54 params->iTierManagerFC = aTierManagerFC; |
|
55 } |
|
56 |
|
57 inline const Messages::TNodeId& DataPlaneFC() const |
|
58 { |
|
59 const TParams* params = reinterpret_cast<const TParams*>(ParamBlock()); |
|
60 return params->iDataPlaneFC; |
|
61 } |
|
62 inline const Messages::TNodeId& SubConnPlaneFC() const |
|
63 { |
|
64 const TParams* params = reinterpret_cast<const TParams*>(ParamBlock()); |
|
65 return params->iSubConnPlaneFC; |
|
66 } |
|
67 inline const Messages::TNodeId& ConnPlaneFC() const |
|
68 { |
|
69 const TParams* params = reinterpret_cast<const TParams*>(ParamBlock()); |
|
70 return params->iConnPlaneFC; |
|
71 } |
|
72 inline const Messages::TNodeId& MetaConnPlaneFC() const |
|
73 { |
|
74 const TParams* params = reinterpret_cast<const TParams*>(ParamBlock()); |
|
75 return params->iMetaConnPlaneFC; |
|
76 } |
|
77 inline const Messages::TNodeId& TierManagerFC() const |
|
78 { |
|
79 const TParams* params = reinterpret_cast<const TParams*>(ParamBlock()); |
|
80 return params->iTierManagerFC; |
|
81 } |
|
82 private: |
|
83 struct TParams /** Message parameters */ |
|
84 { |
|
85 // Cookies for plane factory containers (only filled by threads containing a Player) |
|
86 Messages::TNodeId iTierManagerFC; |
|
87 Messages::TNodeId iMetaConnPlaneFC; |
|
88 Messages::TNodeId iConnPlaneFC; |
|
89 Messages::TNodeId iSubConnPlaneFC; |
|
90 Messages::TNodeId iDataPlaneFC; |
|
91 }; |
|
92 |
|
93 __ASSERT_COMPILE(sizeof(TParams) <= CommsFW::KCFMessageParamBlockSize); |
|
94 }; |
|
95 |
|
96 /** |
|
97 @class TWorkerLoadTierMappings |
|
98 @see TWorkerMsg::ELoadTierMappings |
|
99 */ |
|
100 class TWorkerLoadTierMappings : public Den::TWorkerMsg |
|
101 { |
|
102 public: |
|
103 enum {KCode = TWorkerMsg::ELoadTierMappings};/**Message code*/ |
|
104 inline TWorkerLoadTierMappings() |
|
105 : Den::TWorkerMsg(KCode) |
|
106 { |
|
107 } |
|
108 }; |
|
109 |
|
110 /** |
|
111 @class TWorkerTierMappingsLoaded |
|
112 @see TWorkerMsg::ETierMappingsLoaded |
|
113 */ |
|
114 class TWorkerTierMappingsLoaded : public Den::TWorkerMsg |
|
115 { |
|
116 public: |
|
117 enum {KCode = TWorkerMsg::ETierMappingsLoaded};/**Message code*/ |
|
118 |
|
119 inline TWorkerTierMappingsLoaded(ESock::RTierThreadMap* aTierMap) |
|
120 : Den::TWorkerMsg(KCode) |
|
121 { |
|
122 TParams* params=reinterpret_cast<TParams*>(ParamBlock()); |
|
123 params->iTierMap = aTierMap; |
|
124 } |
|
125 |
|
126 inline const ESock::RTierThreadMap* TierMap() const |
|
127 { |
|
128 const TParams* params = reinterpret_cast<const TParams*>(ParamBlock()); |
|
129 return params->iTierMap; |
|
130 } |
|
131 |
|
132 private: |
|
133 struct TParams /** Message parameters */ |
|
134 { |
|
135 ESock::RTierThreadMap* iTierMap; |
|
136 }; |
|
137 }; |
|
138 |
|
139 |
|
140 class TBrokerIntroductionMsg : public Den::TWorkerMsg |
|
141 { |
|
142 public: |
|
143 enum {KCode = Den::TWorkerMsg::EBrokerIntroduction}; |
|
144 |
|
145 inline TBrokerIntroductionMsg (const Messages::TNodeId& aBrokerId) |
|
146 : Den::TWorkerMsg(KCode) |
|
147 { |
|
148 TParams* params=reinterpret_cast<TParams*>(ParamBlock()); |
|
149 Mem::FillZ(params, sizeof(TParams)); |
|
150 params->iBrokerId = aBrokerId; |
|
151 } |
|
152 |
|
153 inline const Messages::TNodeId& BrokerId() const |
|
154 { |
|
155 const TParams* params = reinterpret_cast<const TParams*>(ParamBlock()); |
|
156 return params->iBrokerId; |
|
157 } |
|
158 |
|
159 private: |
|
160 // Message parameters |
|
161 struct TParams |
|
162 { |
|
163 Messages::TNodeId iBrokerId; |
|
164 }; |
|
165 |
|
166 __ASSERT_COMPILE(sizeof(TParams) <= CommsFW::KCFMessageParamBlockSize); |
|
167 }; |
|
168 |
|
169 #endif |
|
170 |