112 aMessage.Complete(KErrNone); |
112 aMessage.Complete(KErrNone); |
113 iObserverMap.erase(context); |
113 iObserverMap.erase(context); |
114 iSts.StopAlarm(context); |
114 iSts.StopAlarm(context); |
115 } |
115 } |
116 |
116 |
|
117 void CStsServerSession::DoPlayToneStopL(const RMessage2& aMessage) |
|
118 { |
|
119 CSystemToneService::TToneType tone = |
|
120 (CSystemToneService::TToneType) aMessage.Int0(); |
|
121 unsigned int context = 0; |
|
122 //SR |
|
123 //iSts.PlayTone(tone, context, *this); |
|
124 iSts.PlayToneStop(tone, context, *this); |
|
125 iObserverMap[context] = (MStsPlayAlarmObserver*) aMessage.Ptr2(); |
|
126 TPckg<unsigned int> contextPckg(context); |
|
127 TRAPD(err,aMessage.WriteL(1,contextPckg)); |
|
128 aMessage.Complete(err); |
|
129 // if the context is 0 there was a problem with the PlayAlarm, |
|
130 // so trigger the PlayAlarmComplete callback. |
|
131 if (context == 0) |
|
132 { |
|
133 PlayAlarmComplete(0); |
|
134 } |
|
135 } |
|
136 |
|
137 |
117 void CStsServerSession::CleanUpObservers() |
138 void CStsServerSession::CleanUpObservers() |
118 { |
139 { |
119 while (!iObserverMap.empty()) |
140 while (!iObserverMap.empty()) |
120 { |
141 { |
121 //TODO: Add trace here |
142 //TODO: Add trace here |