|
1 /* |
|
2 * Copyright (c) 2007-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: Declarations for class CSPAudioHandler |
|
15 * |
|
16 */ |
|
17 |
|
18 #ifndef CSPAUDIOHANDLER_H |
|
19 #define CSPAUDIOHANDLER_H |
|
20 |
|
21 #include <e32base.h> |
|
22 |
|
23 class TmsHandler; |
|
24 /** |
|
25 * Handles call adding from calls not done by the plugin. |
|
26 * |
|
27 */ |
|
28 class CSPAudioHandler : public CBase |
|
29 { |
|
30 public: |
|
31 //Constructors and descructor |
|
32 |
|
33 /** |
|
34 * Two-phased constructing for the monitor. |
|
35 * |
|
36 * @param aObserver the observer for getting notification |
|
37 * @param aLine the line to monitor |
|
38 * @param aLineId line identifier |
|
39 */ |
|
40 static CSPAudioHandler* NewL(); |
|
41 |
|
42 /** |
|
43 * C++ default destructor. |
|
44 */ |
|
45 virtual ~CSPAudioHandler(); |
|
46 |
|
47 /** |
|
48 * Start audio streams. |
|
49 */ |
|
50 void Start(); |
|
51 |
|
52 /** |
|
53 * Stop audio streams. |
|
54 */ |
|
55 void Stop(); |
|
56 |
|
57 protected: |
|
58 // From CActive |
|
59 /** |
|
60 * From CActive |
|
61 * RunL |
|
62 */ |
|
63 void RunL(); |
|
64 |
|
65 /** |
|
66 * From CActive |
|
67 * Catches errors if RunL leaves |
|
68 * @param aError error code |
|
69 * @return error code |
|
70 */ |
|
71 TInt RunError(TInt aError); |
|
72 |
|
73 /** |
|
74 * From CActive |
|
75 * Cancels the monitor |
|
76 */ |
|
77 void DoCancel(); |
|
78 |
|
79 private: |
|
80 /** |
|
81 * C++ default constructor |
|
82 * @param aObserver the observer for status change (incoming call) |
|
83 * @param aLine the line associated with the call |
|
84 * @param aLineId line identifier |
|
85 */ |
|
86 CSPAudioHandler(); |
|
87 |
|
88 /** |
|
89 * Constructs the monitor in the second phase. |
|
90 */ |
|
91 void ConstructL(); |
|
92 |
|
93 private: |
|
94 // data |
|
95 |
|
96 |
|
97 /** |
|
98 * Audio streams handler. |
|
99 */ |
|
100 TmsHandler* iTmsHandler; |
|
101 |
|
102 /** |
|
103 * Call count |
|
104 */ |
|
105 TInt iCallCount; |
|
106 }; |
|
107 |
|
108 #endif // CSPAUDIOHANDLER_H |