24
|
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 |
class CCallEntry : public CBase
|
|
191 |
/**
|
|
192 |
@internalComponent
|
|
193 |
*/
|
|
194 |
{
|
|
195 |
friend class CLineHayes;
|
|
196 |
public:
|
|
197 |
static CCallEntry* NewL(CCallHayes* aCall);
|
|
198 |
CCallEntry(CCallHayes* aCall);
|
|
199 |
~CCallEntry();
|
|
200 |
void Deque();
|
|
201 |
void CompleteAndDeque(TInt aError);
|
|
202 |
public:
|
|
203 |
CCallHayes* iCallHayes;
|
|
204 |
private:
|
|
205 |
TDblQueLink iLink;
|
|
206 |
};
|
|
207 |
|
|
208 |
#endif
|