|
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 __PHONE_H__ |
|
22 #define __PHONE_H__ |
|
23 |
|
24 #include <et_phone.h> |
|
25 #include "TSYCONFG.H" |
|
26 #include "ATBASE.H" |
|
27 |
|
28 class CATIO; |
|
29 class CATBase; |
|
30 class CLineHayes; |
|
31 class CLineMobileFax; |
|
32 class CLineMobileData; |
|
33 class CLineMobileVoice; |
|
34 class CATInit; |
|
35 class CLineHayes; |
|
36 class CATQuickInit; |
|
37 class CATErrorHandler; |
|
38 class CATWaitForCall; |
|
39 class CATCallConnectCommands; |
|
40 |
|
41 class CCallHayes; |
|
42 class CPhoneHayes : public CPhoneBase |
|
43 /** |
|
44 @internalComponent |
|
45 */ |
|
46 { |
|
47 public: |
|
48 static CPhoneHayes* NewL(); |
|
49 ~CPhoneHayes(); |
|
50 // |
|
51 static void ClosePhone(TAny* aObj); |
|
52 virtual CTelObject::TReqMode ReqModeL(const TInt aIpc); |
|
53 // MTelObjectTSY pure virtual |
|
54 virtual TInt RegisterNotification(const TInt aIpc); |
|
55 virtual TInt DeregisterNotification(const TInt aIpc); |
|
56 virtual void Init(); |
|
57 virtual CTelObject* OpenNewObjectByNameL(const TDesC& aName); |
|
58 virtual CTelObject* OpenNewObjectL(TDes& aNewName); |
|
59 virtual TInt CheckAndSetRegistrationParams(const TInt aIpc,const TDes8* aDes1,const TDes8* aDes2); |
|
60 virtual const CArrayFixFlat<TInt>* ArrayOfMemberDataSizes(const TInt aIpc) const; |
|
61 |
|
62 // MPhoneBaseTSY pure virtuals |
|
63 virtual TInt GetInfo(const TTsyReqHandle aTsyReqHandle, RPhone::TPhoneInfo* aPhoneNotifyInfo); |
|
64 virtual TInt NotifyCapsChange(const TTsyReqHandle aTsyReqHandle, RPhone::TCaps* aCaps); |
|
65 virtual TInt NotifyCapsChangeCancel(const TTsyReqHandle aTsyReqHandle); |
|
66 virtual TInt ControlledInitialisation(const TTsyReqHandle aTsyReqHandle); |
|
67 virtual TInt ControlledInitialisationCancel(const TTsyReqHandle aTsyReqHandle); |
|
68 virtual TInt NotifyModemDetected(const TTsyReqHandle aTsyReqHandle, RPhone::TModemDetection* aDetection); |
|
69 virtual TInt NotifyModemDetectedCancel(const TTsyReqHandle aTsyReqHandle); |
|
70 virtual TInt GetCaps(const TTsyReqHandle aTsyReqHandle,RPhone::TCaps* aCaps); |
|
71 virtual TInt GetStatus(const TTsyReqHandle aTsyReqHandle,RPhone::TStatus* aStatus); |
|
72 virtual TInt EnumerateLines(const TTsyReqHandle aTsyReqHandle,TInt*); |
|
73 virtual TInt GetLineInfo(const TTsyReqHandle aTsyReqHandle,TLineInfoIndex* aLineInfo); |
|
74 |
|
75 // MSubSessionExtBaseTSY pure virtual |
|
76 virtual TInt ExtFunc(const TTsyReqHandle aTsyReqHandle,const TInt aIpc,const TDataPackage& aPackage); |
|
77 |
|
78 // other functions |
|
79 void RemoveLine(CLineHayes* aLineHayes); |
|
80 void StartWaitForRing(); |
|
81 void SetCallRinging(TInt aLineIndex); |
|
82 void SetAmbiguousDataFaxCallRinging(); |
|
83 void StopRinging(); |
|
84 void StopRingCounter() const; |
|
85 void SetHookStatus(RCall::THookStatus aHookStatus); |
|
86 TBool CheckForOutstandingAnswer() const; |
|
87 void CancelOtherRingingCall(CLineHayes* aLine) const; |
|
88 void FreePreAllocCallIfNecessary(CLineHayes* aLine, CCallHayes* aCall); |
|
89 TInt MultimodeInitL(TBool aExplicit); |
|
90 |
|
91 protected: |
|
92 void ConstructL(); // protected so that derived classes can call this |
|
93 |
|
94 private: |
|
95 void Dummy(); |
|
96 |
|
97 protected: |
|
98 CATIO* iIo; |
|
99 CATInit* iInit; |
|
100 CPhoneGlobals* iPhoneGlobals; |
|
101 private: |
|
102 CLineMobileData* iDataLine; |
|
103 CLineMobileFax* iFaxLine; |
|
104 CLineMobileVoice* iVoiceLine; |
|
105 CATWaitForCall* iWaitForCall; |
|
106 CATErrorHandler* iErrorHandler; |
|
107 RPhone::TLineInfo iDefaultVoiceLineInfo; |
|
108 RPhone::TLineInfo iDefaultDataLineInfo; |
|
109 RPhone::TLineInfo iDefaultFaxLineInfo; |
|
110 CArrayFixFlat<TInt>* iSizeOfMemberData; |
|
111 }; |
|
112 |
|
113 #endif |