1 /* |
|
2 * Copyright (c) 2002-2003 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: Encapsulates all of the lines required by the CS Plugin. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef RCSPLINECONTAINER_H |
|
20 #define RCSPLINECONTAINER_H |
|
21 |
|
22 // INCLUDES |
|
23 |
|
24 #include <etelmm.h> // ETel |
|
25 #include <mccpcscall.h> |
|
26 #include <mccecall.h> |
|
27 |
|
28 // CLASS DEFINITIONS |
|
29 |
|
30 /** |
|
31 * Encapsulates all of the lines required by the phone |
|
32 * engine. |
|
33 * |
|
34 * @lib phoneengine.lib |
|
35 * @since 1.2 |
|
36 */ |
|
37 NONSHARABLE_CLASS(RCSPLineContainer) |
|
38 { |
|
39 public: |
|
40 |
|
41 enum TCSPLineId { |
|
42 ECSPLineSpeech = 0, |
|
43 ECSPLineAuxSpeech, |
|
44 ECSPLineData, |
|
45 ECSPLineFax |
|
46 }; |
|
47 |
|
48 public: // Constructors |
|
49 |
|
50 // Default c++ constructor |
|
51 RCSPLineContainer(); |
|
52 |
|
53 public: // new functions |
|
54 /** |
|
55 * Open voice, aux, data and fax lines. |
|
56 * @since 3.2 |
|
57 * @param aPhone open lines on this phone |
|
58 * @return Returns an error only if the primary |
|
59 * line cannot be opened, otherwise KErrNone. |
|
60 */ |
|
61 TInt Open( RMobilePhone& aPhone, |
|
62 TUint32 aServiceId ); |
|
63 |
|
64 |
|
65 /** |
|
66 * @since 3.2 |
|
67 * Close the lines. Frees all resources owned by |
|
68 * this container. |
|
69 */ |
|
70 void Close(); |
|
71 |
|
72 /** |
|
73 * Access a specific line |
|
74 * @since 1.2 |
|
75 * @param aLine The type of line to return |
|
76 * @returns The line specified |
|
77 */ |
|
78 RMobileLine& LineByType( TCSPLineId aLine ); |
|
79 |
|
80 /** |
|
81 * Returns whether the specified line is open |
|
82 * @since 3.2 |
|
83 * @param aLine line to check |
|
84 * @return ETrue if specified line is open. |
|
85 */ |
|
86 TBool LineIsOpen( TCSPLineId aLine ); |
|
87 |
|
88 /** |
|
89 * Resolve call information. |
|
90 * @param aLineId line id (input) |
|
91 * @param aServiceId service id (output) |
|
92 * @param aCallType call type (output) |
|
93 * @param aLineType line type (output) |
|
94 */ |
|
95 TInt ResolveCallInfo( RCSPLineContainer::TCSPLineId aLineId, |
|
96 TUint32& aServiceId, |
|
97 CCPCall::TCallType& aCallType, |
|
98 CCCECallParameters::TCCELineType& aLineType ) const; |
|
99 |
|
100 /** |
|
101 * Resolves line id based on call parameters. |
|
102 * @param aCallParameters |
|
103 * @return line id |
|
104 */ |
|
105 RCSPLineContainer::TCSPLineId ResolveLineIdL( |
|
106 const CCCECallParameters& aCallParameters ) const; |
|
107 |
|
108 |
|
109 private: |
|
110 |
|
111 // Prohibit copy constructor if not deriving from CBase. |
|
112 RCSPLineContainer( RCSPLineContainer& ); |
|
113 // Prohibit assigment operator if not deriving from CBase. |
|
114 RCSPLineContainer& operator=( const RCSPLineContainer& ); |
|
115 |
|
116 private: |
|
117 RMobileLine iPrimaryLine; |
|
118 RMobileLine iAls2Line; |
|
119 RMobileLine iDataLine; |
|
120 RMobileLine iFaxLine; |
|
121 |
|
122 TUint32 iServiceId; |
|
123 }; |
|
124 |
|
125 #endif // RCSPLINECONTAINER_H |
|
126 |
|
127 // End of File |
|