|
1 /* |
|
2 * Copyright (c) 2007-2008 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: Provides implementation class for CCallInformation -class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CCALLINFORMATIONIMPL_H_ |
|
20 #define CCALLINFORMATIONIMPL_H_ |
|
21 |
|
22 #include <e32base.h> |
|
23 |
|
24 #include "ctelsrvbase.h" |
|
25 #include "mcall.h" |
|
26 |
|
27 // forward declarations |
|
28 class MCallInformationObserver; |
|
29 class CCallInfoIter; |
|
30 class CCallInfos; |
|
31 |
|
32 |
|
33 /** |
|
34 * This class provides implementation for CCallInformation -class. |
|
35 * |
|
36 * @lib telephonyservice.lib |
|
37 * @since S60 v5.1 |
|
38 */ |
|
39 NONSHARABLE_CLASS( CCallInformationImpl ) : public CTelSrvBase |
|
40 { |
|
41 public: |
|
42 |
|
43 /** |
|
44 * Two-phased constructor. |
|
45 */ |
|
46 static CCallInformationImpl* NewL(); |
|
47 |
|
48 /** |
|
49 * Two-phased constructor for testing purposes. |
|
50 */ |
|
51 static CCallInformationImpl* NewL(CMediatorService* aMediatorService); |
|
52 |
|
53 |
|
54 /** |
|
55 * Destructor. |
|
56 */ |
|
57 virtual ~CCallInformationImpl(); |
|
58 |
|
59 /** |
|
60 * Sets the observer for changes in current calls. |
|
61 * |
|
62 * @since S60 v5.1 |
|
63 * @param aObserver Observer for notifications. |
|
64 */ |
|
65 void NotifyCallInformationChanges( MCallInformationObserver& aObserver ); |
|
66 |
|
67 /** |
|
68 * Used to cancel previously placed NotifyCallInformationChanges call. |
|
69 * |
|
70 * @since S60 v5.1 |
|
71 */ |
|
72 void CancelNotification(); |
|
73 |
|
74 /** |
|
75 * Gets the snapshot of ongoing calls. |
|
76 * |
|
77 * @since S60 v5.1 |
|
78 * @return Ongoing calls. |
|
79 */ |
|
80 CCallInfoIter& GetCallsL(); |
|
81 |
|
82 /** |
|
83 * Returns information whether call in given state exist. |
|
84 * |
|
85 * @since S60 v5.2 |
|
86 * @param aState Specifies a call state that is used as a search key. |
|
87 * @return ETrue if call in given state exist. |
|
88 */ |
|
89 TBool IsCallInState( CCPCall::TCallState aState ) const; |
|
90 |
|
91 // from base class CTelSrvBase |
|
92 |
|
93 /** |
|
94 * From CTelSrvBase. |
|
95 * A response to a Mediator Service command. |
|
96 * |
|
97 * @since S60 v5.1 |
|
98 * @param aData The parameters of the response. |
|
99 */ |
|
100 void DoHandleCommandResponseL( const TDesC8& aData ); |
|
101 |
|
102 |
|
103 /** |
|
104 * From CTelSrvBase. |
|
105 * A Mediator Service event. |
|
106 * |
|
107 * @since S60 v5.1 |
|
108 * @param aData The parameters of the event. |
|
109 * @return None. |
|
110 */ |
|
111 void DoHandleMediatorEventL( const TDesC8& aData ); |
|
112 |
|
113 protected: |
|
114 |
|
115 CCallInformationImpl(); |
|
116 |
|
117 void ConstructL(CMediatorService* aMediatorService); |
|
118 |
|
119 protected: //data |
|
120 |
|
121 /** |
|
122 * Observer to be notified when call information changes |
|
123 * Not own. |
|
124 */ |
|
125 MCallInformationObserver* iObserver; |
|
126 private: // data |
|
127 |
|
128 CCallInfos* iInfos; |
|
129 CCallInfos* iInfosInState; |
|
130 CCallInfoIter* iCallIter; |
|
131 CCallInfoIter* iCallStateIter; |
|
132 }; |
|
133 |
|
134 |
|
135 #endif /*CCALLINFORMATIONIMPL_H_*/ |
|
136 |