|
1 // Copyright (c) 2005-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 // CC32WorkerDataGlobals |
|
15 // |
|
16 // |
|
17 |
|
18 |
|
19 inline CC32WorkerThread* CC32WorkerDataGlobals::WorkerThread(TWorkerId aWorker) const |
|
20 { |
|
21 return GetWorkerGlobals(aWorker)->iWorker; |
|
22 } |
|
23 |
|
24 // |
|
25 // CCSYInfo |
|
26 // |
|
27 |
|
28 |
|
29 inline void CCSYInfo::SetWorkerId(TInt aThreadNum) |
|
30 { |
|
31 iThreadNum=aThreadNum; |
|
32 } |
|
33 |
|
34 inline TInt CCSYInfo::WorkerId() const |
|
35 { |
|
36 return iThreadNum; |
|
37 } |
|
38 |
|
39 inline const HBufC8* CCSYInfo::GetCSYName() const |
|
40 { |
|
41 return iCSYName; |
|
42 } // guaranteed to be non-null if NewL called. |
|
43 |
|
44 inline CSerial* CCSYInfo::GetCSYHandle() const |
|
45 { |
|
46 return iCSYHandle; |
|
47 } |
|
48 |
|
49 |
|
50 inline TPtrC CCSYInfo::GetPortName() const |
|
51 { |
|
52 return iCSYPortPrefix; |
|
53 } |
|
54 |
|
55 inline void CCSYInfo::IncAccessCount() |
|
56 { |
|
57 iAccessCount++; |
|
58 } |
|
59 |
|
60 inline void CCSYInfo::DecAccessCount() |
|
61 { |
|
62 iAccessCount--; |
|
63 } |
|
64 |
|
65 inline TInt CCSYInfo::AccessCount() const |
|
66 { |
|
67 return iAccessCount; |
|
68 } |
|
69 |
|
70 inline TBool CCSYInfo::IsLoaded() const |
|
71 { |
|
72 return iLoaded; |
|
73 } |
|
74 |
|
75 inline void CCSYInfo::SetLoadState(const TBool aLoaded) |
|
76 { |
|
77 iLoaded=aLoaded; |
|
78 } |
|
79 |
|
80 inline void CCSYInfo::SetLoadIndex(TInt aIndex) |
|
81 { |
|
82 iLoadIndex = aIndex; |
|
83 } |
|
84 |
|
85 inline TInt CCSYInfo::LoadIndex() const |
|
86 { |
|
87 return iLoadIndex; |
|
88 } |
|
89 |
|
90 // |
|
91 // CC32ThreadInfo |
|
92 // |
|
93 |
|
94 inline const HBufC8* CC32ThreadManager::CC32ThreadInfo::ModuleName() const |
|
95 { |
|
96 return iModuleName; |
|
97 } |
|
98 |
|
99 // |
|
100 // CC32ParsedIniData |
|
101 // |
|
102 |
|
103 inline void CC32ThreadManager::CC32ParsedIniData::SetWorkerId(const TInt aThreadNum) |
|
104 { |
|
105 iCMIWorkerId = aThreadNum; |
|
106 } |
|
107 |
|
108 inline TInt CC32ThreadManager::CC32ParsedIniData::NumCSYs() const |
|
109 { |
|
110 return iCSYs.Count(); |
|
111 } |
|
112 |
|
113 inline TBool CC32ThreadManager::CC32ParsedIniData::IsPlayer() const |
|
114 { |
|
115 return iIsPlayer; |
|
116 } |
|
117 |
|
118 inline TBool CC32ThreadManager::CC32ParsedIniData::IsDefaultThread() const |
|
119 { |
|
120 return iIsDefault; |
|
121 } |
|
122 |
|
123 inline TInt CC32ThreadManager::CC32ParsedIniData::WorkerId() const |
|
124 { |
|
125 return iCMIWorkerId; |
|
126 } |
|
127 |
|
128 // |
|
129 // CC32Dealer |
|
130 // |
|
131 |
|
132 |
|
133 inline TBool CC32Dealer::WorkerDataGlobalsExist() const |
|
134 { |
|
135 return (iWorkerDataGlobals != NULL); |
|
136 } |
|
137 |
|
138 inline CC32WorkerDataGlobals& CC32Dealer::WorkerDataGlobals() const |
|
139 { |
|
140 ASSERT(iWorkerDataGlobals); |
|
141 return *iWorkerDataGlobals; |
|
142 } |
|
143 |
|
144 inline TBool CC32Dealer::StartupFailed() const |
|
145 { |
|
146 return iFailedStartup; |
|
147 } |
|
148 |
|
149 /** |
|
150 Immediate shutdowns expose a number of additional race risks; in the face of one happening to |
|
151 any thread at all we stop attempting certain kinds of cleanup. This should be acceptable |
|
152 behaviour since at it will be the whole of C32 shutting down. |
|
153 */ |
|
154 inline void CC32Dealer::SetImmediateShutdownPresent() |
|
155 { |
|
156 iImmediateShutdownMark = ETrue; |
|
157 } |
|
158 |
|
159 inline TBool CC32Dealer::TestImmediateShutdownPresent() const |
|
160 { |
|
161 return iImmediateShutdownMark; |
|
162 } |
|
163 |
|
164 // |
|
165 // CC32Player |
|
166 // |
|
167 |
|
168 inline CC32WorkerThread& CC32Player::WorkerThread() const |
|
169 { |
|
170 return *iOwnerThread; |
|
171 } |
|
172 |
|
173 inline CC32Dealer& CC32Player::CC32DealerByRef() const |
|
174 { |
|
175 return WorkerThread().DealerByRef(); |
|
176 } |
|
177 |
|
178 inline TWorkerId CC32Player::WorkerId() const |
|
179 { |
|
180 return WorkerThread().WorkerId(); |
|
181 } |
|
182 |
|
183 inline const RMessage2& CC32Player::Message() const |
|
184 { |
|
185 return *iCurrentMessage; |
|
186 } |
|
187 |
|
188 inline CC32Player::TSubSessionContainer& CC32Player::SubSessions() |
|
189 { |
|
190 return iSubSessions; |
|
191 } |
|
192 |
|
193 |
|
194 |