|
1 /* |
|
2 * Copyright (c) 2002 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: It defines dial interface for phone client. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef CPHCLTEXTPHONEBASE_H |
|
20 #define CPHCLTEXTPHONEBASE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include "phclttypes.h" |
|
25 |
|
26 // FORWARD DECLARATIONS |
|
27 class MPhCltExtPhoneObserver; |
|
28 class CPhCltExtPhoneDialData; |
|
29 |
|
30 // CLASS DECLARATION |
|
31 |
|
32 /** |
|
33 * It defines dial interface for phone client. |
|
34 * |
|
35 * Usage: |
|
36 * |
|
37 * To dial, you must have a string of characters from set |
|
38 * { 0, 1, 2, .. 9, #, *, +, p, P, w, W }. It is the only |
|
39 * mandatory parameter. String may also contain other characters, |
|
40 * but then only a note is displayed. So you should proceed as follows: |
|
41 * 1. Check that string is acceptable. |
|
42 * (application specific grammar) |
|
43 * 2. If not, stop. Otherwise continue. |
|
44 * 3. Convert to string acceptable by phoneclient. |
|
45 * Note PhCltUtils class may help. |
|
46 * 4. Dial using the class. |
|
47 * |
|
48 * Note that dialling does not always mean creating a call. |
|
49 * (E.g. *#43# makes phone to interrogate status of call waiting.) |
|
50 * |
|
51 * In order to dial, you need instance of CPhCltExtPhoneBase. You |
|
52 * can create one as follows: |
|
53 * iExtCall = CPhCltExtPhoneBase::NewL( this ); |
|
54 * (the parameter is pointer to observer) |
|
55 * |
|
56 * Then you must fill dial parameters to instance of TPhCltExtPhoneDialData. |
|
57 * (you can read more details from its header) |
|
58 * |
|
59 * TPhCltExtPhoneDialData data; |
|
60 * data.SetTelephoneNumber( .. ); |
|
61 * .. |
|
62 * |
|
63 * And finally, you can dial. Note that the method is asynchronous and |
|
64 * observer will be informed when phone starts dialing. |
|
65 * |
|
66 * iExtCall->DialL( data ); |
|
67 * |
|
68 * Finally, you can delete the instance. If dialing is ongoing, this should |
|
69 * be done after observer has been informed. You can also delete before that, |
|
70 * but then the request might also be canceled. |
|
71 * |
|
72 * @lib phoneclient.lib |
|
73 * @since 1.0 |
|
74 */ |
|
75 class CPhCltExtPhoneBase : public CActive |
|
76 { |
|
77 public: // Constructors and destructor |
|
78 |
|
79 /** |
|
80 * Create an instance that implements the interface. |
|
81 * |
|
82 * @param aObserver It is the observer for the instance. |
|
83 * @return Returns the created instance. |
|
84 */ |
|
85 IMPORT_C static CPhCltExtPhoneBase* NewL( |
|
86 MPhCltExtPhoneObserver* aObserver ); |
|
87 |
|
88 |
|
89 public: // New fuctions |
|
90 |
|
91 |
|
92 /** |
|
93 * Makes a new call. This is the preferred way of dialling! |
|
94 * |
|
95 * @param aData The object containing the parameters for |
|
96 * the dial request. |
|
97 */ |
|
98 virtual void DialL( CPhCltExtPhoneDialData& aData ) = 0; |
|
99 |
|
100 |
|
101 protected: |
|
102 |
|
103 /** |
|
104 * C++ constructor. |
|
105 */ |
|
106 CPhCltExtPhoneBase( MPhCltExtPhoneObserver* aObserver ); |
|
107 |
|
108 |
|
109 protected: // Data |
|
110 |
|
111 // Observer to handle events. |
|
112 MPhCltExtPhoneObserver* iObserver; |
|
113 |
|
114 }; |
|
115 |
|
116 #endif // CPHCLTEXTPHONEBASE_H |
|
117 |
|
118 // End of File |