|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // This contains CLtsyCallInformationManager which manager call information |
|
15 // |
|
16 |
|
17 #ifndef LTSYCALLINFORMATIONMANAGER_H_ |
|
18 #define LTSYCALLINFORMATIONMANAGER_H_ |
|
19 |
|
20 //system include |
|
21 |
|
22 //user include |
|
23 #include "ltsycallinformation.h" |
|
24 |
|
25 //const define |
|
26 const TInt KLtsyMaxCallCount = 8; |
|
27 |
|
28 // forward class declarations |
|
29 class CATHangupCommandRecords; |
|
30 |
|
31 /** |
|
32 * This class is handling all the call related information. |
|
33 * |
|
34 * This call information manager store the call information and manage the call status. |
|
35 * |
|
36 */ |
|
37 class CLtsyCallInformationManager : public CBase |
|
38 { |
|
39 public: |
|
40 /** |
|
41 * Factory funciton to create a new object of CLtsyCallInfomationManager |
|
42 */ |
|
43 static CLtsyCallInformationManager* NewL(); |
|
44 |
|
45 /** |
|
46 * Factory funciton to create a new object of CLtsyCallInfomationManager |
|
47 */ |
|
48 static CLtsyCallInformationManager* NewLC(); |
|
49 |
|
50 /** |
|
51 * The destructor |
|
52 */ |
|
53 virtual ~CLtsyCallInformationManager(); |
|
54 |
|
55 /** |
|
56 * Clear all the call information related to the specific CallID |
|
57 */ |
|
58 void ResetCallInformationByCallId(TInt aCallId); |
|
59 |
|
60 /** |
|
61 * Clear all the call information stored by call information manager |
|
62 * |
|
63 * This function will be called when Hangup terminates all calls is called |
|
64 */ |
|
65 void ResetAllCalInformation(); |
|
66 |
|
67 /** |
|
68 * Get the call information by specific CallID |
|
69 */ |
|
70 TLtsyCallInformation& GetCallInformationByCallId(TInt aCallId); |
|
71 |
|
72 /** |
|
73 * Get the call Id which is not currently used |
|
74 */ |
|
75 TInt FindUnUesedCallId() const; |
|
76 |
|
77 /** |
|
78 * Check the callId is used or not |
|
79 */ |
|
80 TBool IsHaveUsedCallId() const; |
|
81 |
|
82 /** |
|
83 * Find the call ID of 1st incoming call |
|
84 */ |
|
85 TInt FindIncomingCallId() const; |
|
86 |
|
87 /** |
|
88 * Find the call Id by its status which is dialling and altering |
|
89 */ |
|
90 TInt FindDialingOrAlertingCallId() const; |
|
91 |
|
92 /** |
|
93 * Get the call Id of 2nd incoming call. |
|
94 * Waiting call means that an incoming call is already processed by the client. and just wait |
|
95 * the client to hanle this 2nd incoming call |
|
96 */ |
|
97 TInt FindWaitingCallId() const; |
|
98 |
|
99 /** |
|
100 * Set the incoming ring call flag. |
|
101 * If received "Ring" or "+CRing", set this flag to be ETrue. and set it to be EFalse, if this call has been connected. |
|
102 */ |
|
103 void SetIncomingCallFlag(TBool aIncomingCallFlag); |
|
104 |
|
105 /** |
|
106 * Get the incoming call flag |
|
107 */ |
|
108 TBool GetIncomingCallFlag() const; |
|
109 |
|
110 /** |
|
111 * Get the call ID assigned to emergence call |
|
112 */ |
|
113 TInt FindEmergencyCallId() const; |
|
114 |
|
115 /** |
|
116 * Get Hang up command records |
|
117 * |
|
118 */ |
|
119 CATHangupCommandRecords& GetHangupCommandRecords(); |
|
120 |
|
121 protected: |
|
122 /** |
|
123 * Constructor |
|
124 */ |
|
125 CLtsyCallInformationManager(); |
|
126 |
|
127 /** |
|
128 * 2nd constructor |
|
129 */ |
|
130 void ConstructL(); |
|
131 |
|
132 private: |
|
133 /** |
|
134 *Call Information array |
|
135 */ |
|
136 TLtsyCallInformation iCallInfo[KLtsyMaxCallCount]; |
|
137 |
|
138 /** |
|
139 * Incoming call status flag |
|
140 */ |
|
141 TBool iIncomingCallFlag; |
|
142 |
|
143 /** |
|
144 * Own. |
|
145 * The store to store the hanup information related to AT hangup command |
|
146 */ |
|
147 CATHangupCommandRecords* iHangupCommandRecords; |
|
148 }; |
|
149 |
|
150 #endif /*LTSYCALLINFORMATIONMANAGER_H_*/ |