|
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 information about ongoing calls. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <e32base.h> |
|
20 |
|
21 #include "ccallinformation.h" |
|
22 #include "MCallInformationObserver.h" |
|
23 #include "ccallinformationimpl.h" |
|
24 |
|
25 |
|
26 // ======== MEMBER FUNCTIONS ======== |
|
27 |
|
28 |
|
29 // --------------------------------------------------------------------------- |
|
30 // C++ constructor. |
|
31 // --------------------------------------------------------------------------- |
|
32 // |
|
33 CCallInformation::CCallInformation() |
|
34 { |
|
35 |
|
36 } |
|
37 |
|
38 |
|
39 // --------------------------------------------------------------------------- |
|
40 // Symbian second-phase constructor. |
|
41 // --------------------------------------------------------------------------- |
|
42 // |
|
43 void CCallInformation::ConstructL() |
|
44 { |
|
45 |
|
46 iImpl = CCallInformationImpl::NewL(); |
|
47 } |
|
48 |
|
49 |
|
50 // --------------------------------------------------------------------------- |
|
51 // Two-phased constructor. |
|
52 // --------------------------------------------------------------------------- |
|
53 // |
|
54 CCallInformation* CCallInformation::NewL() |
|
55 { |
|
56 CCallInformation* self = new (ELeave) CCallInformation( ); |
|
57 |
|
58 CleanupStack::PushL( self ); |
|
59 self->ConstructL(); |
|
60 CleanupStack::Pop( self ); |
|
61 |
|
62 return self; |
|
63 } |
|
64 |
|
65 |
|
66 |
|
67 // --------------------------------------------------------------------------- |
|
68 // Destructor |
|
69 // --------------------------------------------------------------------------- |
|
70 // |
|
71 CCallInformation::~CCallInformation() |
|
72 { |
|
73 delete iImpl; |
|
74 } |
|
75 |
|
76 // --------------------------------------------------------------------------- |
|
77 // Sets observer for call information changes. |
|
78 // --------------------------------------------------------------------------- |
|
79 // |
|
80 void CCallInformation::NotifyCallInformationChanges( |
|
81 MCallInformationObserver& aObserver ) |
|
82 { |
|
83 iImpl->NotifyCallInformationChanges( aObserver ); |
|
84 } |
|
85 |
|
86 // --------------------------------------------------------------------------- |
|
87 // Cancels previously placed NotifyCallInformationChangesL call. |
|
88 // --------------------------------------------------------------------------- |
|
89 // |
|
90 void CCallInformation::CancelNotification( ) |
|
91 { |
|
92 } |
|
93 |
|
94 // --------------------------------------------------------------------------- |
|
95 // Gets the snapshot of ongoing calls. |
|
96 // --------------------------------------------------------------------------- |
|
97 // |
|
98 CCallInfoIter& CCallInformation::GetCallsL( ) |
|
99 { |
|
100 return iImpl->GetCallsL( ); |
|
101 } |
|
102 |
|
103 // --------------------------------------------------------------------------- |
|
104 // Returns information whether call in given state exist. |
|
105 // --------------------------------------------------------------------------- |
|
106 // |
|
107 TBool CCallInformation::IsCallInState( CCPCall::TCallState aState ) const |
|
108 { |
|
109 return iImpl->IsCallInState( aState ); |
|
110 } |
|
111 |
|
112 |
|
113 |