|
1 /* |
|
2 * Copyright (c) 2010 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Observes changes in the default player that should be used for a bearer |
|
15 */ |
|
16 |
|
17 #include <e32base.h> |
|
18 #include <e32property.h> |
|
19 #include <w32std.h> |
|
20 |
|
21 |
|
22 NONSHARABLE_CLASS(MTspRulesTriggerObserver) |
|
23 { |
|
24 public: |
|
25 virtual void MtrtoEvaluateRoutingRules() = 0; |
|
26 }; |
|
27 |
|
28 NONSHARABLE_CLASS(CActiveAudioClientObserver) : public CActive |
|
29 { |
|
30 public: |
|
31 static CActiveAudioClientObserver* NewL(MTspRulesTriggerObserver& aObserver); |
|
32 ~CActiveAudioClientObserver(); |
|
33 |
|
34 private: |
|
35 // from CActive |
|
36 void RunL(); |
|
37 void DoCancel(); |
|
38 |
|
39 CActiveAudioClientObserver(MTspRulesTriggerObserver& aObserver); |
|
40 void ConstructL(); |
|
41 |
|
42 private: |
|
43 MTspRulesTriggerObserver& iObserver; |
|
44 RProperty iAudioApplication; |
|
45 }; |
|
46 |
|
47 NONSHARABLE_CLASS(CTspClientMapperObserver) : public CActive |
|
48 { |
|
49 public: |
|
50 static CTspClientMapperObserver* NewL(MTspRulesTriggerObserver& aObserver); |
|
51 ~CTspClientMapperObserver(); |
|
52 |
|
53 private: |
|
54 // from CActive |
|
55 void RunL(); |
|
56 void DoCancel(); |
|
57 |
|
58 CTspClientMapperObserver(MTspRulesTriggerObserver& aObserver); |
|
59 void ConstructL(); |
|
60 |
|
61 private: |
|
62 MTspRulesTriggerObserver& iObserver; |
|
63 RProperty iPlayingClients; |
|
64 }; |
|
65 |
|
66 NONSHARABLE_CLASS(CWsEventsObserver) : public CActive |
|
67 { |
|
68 public: |
|
69 static CWsEventsObserver* NewL(MTspRulesTriggerObserver& aObserver); |
|
70 ~CWsEventsObserver(); |
|
71 |
|
72 private: |
|
73 // from CActive |
|
74 void RunL(); |
|
75 void DoCancel(); |
|
76 |
|
77 CWsEventsObserver(MTspRulesTriggerObserver& aObserver); |
|
78 void ConstructL(); |
|
79 |
|
80 private: |
|
81 MTspRulesTriggerObserver& iObserver; |
|
82 RWsSession iWsSession; |
|
83 RWindowGroup iWindowGroup; |
|
84 }; |
|
85 |
|
86 NONSHARABLE_CLASS(CTspTriggerEventsWatcher) : public CBase |
|
87 { |
|
88 public: |
|
89 static CTspTriggerEventsWatcher* NewL(MTspRulesTriggerObserver& aObserver); |
|
90 ~CTspTriggerEventsWatcher(); |
|
91 TInt AddBearer(TUid& aBearerUid); |
|
92 TInt RemoveBearer(TUid& aBearerUid); |
|
93 |
|
94 private: |
|
95 CTspTriggerEventsWatcher(MTspRulesTriggerObserver& aObserver); |
|
96 void ConstructL(); |
|
97 |
|
98 private: |
|
99 MTspRulesTriggerObserver& iObserver; |
|
100 CActiveAudioClientObserver* iAudioClientObserver; |
|
101 CWsEventsObserver* iWsEventsObserver; |
|
102 CTspClientMapperObserver* iClientMapperObserver; |
|
103 }; |
|
104 |