|
1 // Copyright (c) 1997-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 // |
|
15 |
|
16 /** |
|
17 @file |
|
18 @internalAll |
|
19 */ |
|
20 |
|
21 #ifndef __LINE_H__ |
|
22 #define __LINE_H__ |
|
23 |
|
24 #include <et_phone.h> |
|
25 #include "ATWAIT.H" |
|
26 |
|
27 // |
|
28 // CLineHayes - General Line Functionality |
|
29 // |
|
30 class CCallEntry; |
|
31 class CLineHayes : public CLineBase |
|
32 /** |
|
33 @internalComponent |
|
34 */ |
|
35 { |
|
36 public: |
|
37 CLineHayes(CATIO* aIo,CATInit* aInit,CPhoneGlobals* aPhoneGlobals); |
|
38 ~CLineHayes(); |
|
39 void AppendNewCallL(CCallHayes* aNewCall); |
|
40 virtual TInt RegisterNotification(const TInt aIpc); |
|
41 virtual TInt DeregisterNotification(const TInt aIpc); |
|
42 static void CloseLine(TAny* aObj); |
|
43 virtual CTelObject::TReqMode ReqModeL(const TInt aIpc); |
|
44 // MTelObjectTSY pure virtuals |
|
45 virtual void Init(); |
|
46 virtual const CArrayFixFlat<TInt>* ArrayOfMemberDataSizes(const TInt aIpc) const; |
|
47 |
|
48 // MLineBaseTSY pure virtuals |
|
49 virtual TInt GetInfo(const TTsyReqHandle aTsyReqHandle,RLine::TLineInfo* aLineInfo); |
|
50 virtual TInt NotifyCapsChange(const TTsyReqHandle aTsyReqHandle, RLine::TCaps* aCaps); |
|
51 virtual TInt NotifyCapsChangeCancel(const TTsyReqHandle aTsyReqHandle); |
|
52 virtual TInt NotifyIncomingCall(const TTsyReqHandle aTsyReqHandle, TName* aName); |
|
53 virtual TInt NotifyIncomingCallCancel(const TTsyReqHandle aTsyReqHandle); |
|
54 virtual TInt NotifyHookChange(const TTsyReqHandle aTsyReqHandle, RCall::THookStatus* aHookStatus); |
|
55 virtual TInt NotifyHookChangeCancel(const TTsyReqHandle aTsyReqHandle); |
|
56 virtual TInt NotifyStatusChange(const TTsyReqHandle aTsyReqHandle,RCall::TStatus* aLineStatus); |
|
57 virtual TInt NotifyStatusChangeCancel(const TTsyReqHandle aTsyReqHandle); |
|
58 virtual TInt NotifyCallAdded(const TTsyReqHandle aTsyReqHandle,TName* aName); |
|
59 virtual TInt NotifyCallAddedCancel(const TTsyReqHandle aTsyReqHandle); |
|
60 virtual TInt GetStatus(const TTsyReqHandle aTsyReqHandle,RCall::TStatus* aStatus); |
|
61 virtual TInt EnumerateCall(const TTsyReqHandle aTsyReqHandle,TInt* aCount); |
|
62 virtual TInt GetHookStatus(const TTsyReqHandle aTsyReqHandle,RCall::THookStatus* aHookStatus); |
|
63 |
|
64 // MSubSessionExtBaseTSY pure virtual |
|
65 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage&); |
|
66 |
|
67 // other functions |
|
68 TBool StopMyCallRinging(); |
|
69 void GetLineStatus(RCall::TStatus& aLineStatus); |
|
70 void RemoveCall(CCallHayes* aCallHayes); |
|
71 void GetLastCallName(TDes& aName) const; |
|
72 void GetNameOfCallForAnswering(TDes& aName); |
|
73 void SetCallsHookStatus(RCall::THookStatus aHookStatus); |
|
74 TBool AnswerIfPossible(); |
|
75 TBool CheckForOutstandingAnswer(); |
|
76 void SetPreAllocCall(); |
|
77 void ResetPreAllocCall(); |
|
78 void ResetNotifyIncomingCall(); |
|
79 TBool IsNotifyIncomingCallOutstanding(); |
|
80 void FreePreAllocCallIfNecessary(); |
|
81 |
|
82 protected: |
|
83 void ConstructL(const TName& aName); |
|
84 CCallEntry* CheckNewObject(const TDesC& aName); |
|
85 |
|
86 private: |
|
87 void Dummy(); |
|
88 void Dummy1(); |
|
89 |
|
90 public: |
|
91 TName iLineName; |
|
92 protected: |
|
93 CATIO* iIo; |
|
94 CATInit* iInit; |
|
95 CPhoneGlobals* iPhoneGlobals; |
|
96 TDblQue<CCallEntry> iCalls; |
|
97 TInt iPosOfLastAddedCall; |
|
98 TInt iNameIndex; |
|
99 private: |
|
100 CArrayFixFlat<TInt>* iSizeOfMemberData; |
|
101 TBool iNotifyIncomingCallOutstanding; |
|
102 protected: |
|
103 CCallEntry* iPreAlloc; |
|
104 }; |
|
105 |
|
106 |
|
107 // |
|
108 // CLineMobile - Line functionality for mobile phones |
|
109 // |
|
110 |
|
111 class CLineMobile : public CLineHayes |
|
112 /** |
|
113 @internalComponent |
|
114 */ |
|
115 { |
|
116 public: |
|
117 CLineMobile(CATIO* aIo,CATInit* aInit,CPhoneGlobals* aPhoneGlobals); |
|
118 ~CLineMobile(); |
|
119 |
|
120 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage); |
|
121 virtual TInt CancelService(const TInt aIpc,const TTsyReqHandle aTsyReqHandle); |
|
122 virtual TReqMode ReqModeL(const TInt aIpc); |
|
123 virtual TInt NumberOfSlotsL(const TInt aIpc); |
|
124 |
|
125 private: |
|
126 // ETELMM supported requests |
|
127 TInt GetMobileLineStatus(const TTsyReqHandle aTsyReqHandle,RMobileCall::TMobileCallStatus* aStatus); |
|
128 TInt NotifyMobileLineStatusChange(const TTsyReqHandle aTsyReqHandle,RMobileCall::TMobileCallStatus* aStatus); |
|
129 TInt NotifyMobileLineStatusChangeCancel(const TTsyReqHandle aTsyReqHandle); |
|
130 }; |
|
131 |
|
132 |
|
133 //Added for Java Demo 4.4.99 |
|
134 // |
|
135 // CLineMobileVoice - Voice Specific Line Functionality |
|
136 // |
|
137 class CCallMobileVoice; |
|
138 class CLineMobileVoice : public CLineMobile |
|
139 /** |
|
140 @internalComponent |
|
141 */ |
|
142 { |
|
143 public: |
|
144 static CLineMobileVoice* NewL(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aPhoneGlobals,const TName& aName); |
|
145 CLineMobileVoice(CATIO* aATIO,CATInit* aInit,CPhoneGlobals*); |
|
146 ~CLineMobileVoice(); |
|
147 |
|
148 // MTelObjectTSY pure virtuals |
|
149 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
150 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
151 |
|
152 // MLineBaseTSY pure virtuals |
|
153 virtual TInt GetCaps(const TTsyReqHandle aTsyReqHandle,RLine::TCaps* aCaps); |
|
154 virtual TInt GetCallInfo(const TTsyReqHandle,TCallInfoIndex*); |
|
155 |
|
156 // |
|
157 protected: |
|
158 void GenerateName(TDes& aName); |
|
159 void ConstructL(const TName& aName); |
|
160 }; |
|
161 |
|
162 // |
|
163 // CLineMobileData - Data Specific Line Functionality |
|
164 // |
|
165 class CCallMobileData; |
|
166 class CLineMobileData : public CLineMobile |
|
167 /** |
|
168 @internalComponent |
|
169 */ |
|
170 { |
|
171 public: |
|
172 static CLineMobileData* NewL(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aPhoneGlobals,const TName& aName); |
|
173 CLineMobileData(CATIO* aATIO,CATInit* aInit,CPhoneGlobals*); |
|
174 ~CLineMobileData(); |
|
175 |
|
176 // MTelObjectTSY pure virtuals |
|
177 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
178 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
179 |
|
180 // MLineBaseTSY pure virtuals |
|
181 virtual TInt GetCaps(const TTsyReqHandle aTsyReqHandle,RLine::TCaps* aCaps); |
|
182 virtual TInt GetCallInfo(const TTsyReqHandle,TCallInfoIndex*); |
|
183 |
|
184 // |
|
185 protected: |
|
186 void GenerateName(TDes& aName); |
|
187 void ConstructL(const TName& aName); |
|
188 }; |
|
189 |
|
190 // |
|
191 // CLineMobileFax - Fax Specific Line Functionality |
|
192 // |
|
193 class CCallMobileFax; |
|
194 class CLineMobileFax : public CLineMobile |
|
195 /** |
|
196 @internalComponent |
|
197 */ |
|
198 { |
|
199 public: |
|
200 static CLineMobileFax* NewL(CATIO* aATIO,CATInit* aInit,CPhoneGlobals* aPhoneGlobals,const TName& aName); |
|
201 CLineMobileFax(CATIO* aATIO,CATInit* aInit,CPhoneGlobals*); |
|
202 ~CLineMobileFax(); |
|
203 |
|
204 // MTelObjectTSY pure virtuals |
|
205 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
206 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
207 |
|
208 // MLineBaseTSY pure virtuals |
|
209 virtual TInt GetCaps(const TTsyReqHandle aTsyReqHandle,RLine::TCaps* aCaps); |
|
210 virtual TInt GetCallInfo(const TTsyReqHandle,TCallInfoIndex*); |
|
211 |
|
212 protected: |
|
213 void GenerateName(TDes& aName); |
|
214 void ConstructL(const TName& aName); |
|
215 |
|
216 public: |
|
217 TBool iFaxOpened; // so that a CCallHayes instance knows whether another CCallHayes has opened a CFaxHayes object |
|
218 }; |
|
219 |
|
220 class CCallEntry : public CBase |
|
221 /** |
|
222 @internalComponent |
|
223 */ |
|
224 { |
|
225 friend class CLineHayes; |
|
226 public: |
|
227 static CCallEntry* NewL(CCallHayes* aCall); |
|
228 CCallEntry(CCallHayes* aCall); |
|
229 ~CCallEntry(); |
|
230 void Deque(); |
|
231 void CompleteAndDeque(TInt aError); |
|
232 public: |
|
233 CCallHayes* iCallHayes; |
|
234 private: |
|
235 TDblQueLink iLink; |
|
236 }; |
|
237 |
|
238 #endif |