|
1 /* |
|
2 * Copyright (c) 2006 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: CCP emergency call class |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCCPEMERGENCYCALL_H |
|
20 #define MCCPEMERGENCYCALL_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 #include <e32cmn.h> // TDesC |
|
25 |
|
26 /** |
|
27 * Emergency call class |
|
28 * @since S60 3.2 |
|
29 */ |
|
30 class MCCPEmergencyCall |
|
31 { |
|
32 protected: |
|
33 /** |
|
34 * Protected destructor. Object cannot be deleted from plug-in client (CCE). |
|
35 * @since S60 3.2 |
|
36 */ |
|
37 virtual inline ~MCCPEmergencyCall() {}; |
|
38 |
|
39 public: |
|
40 /** |
|
41 * Dials an emergency call. |
|
42 * @param aRecipient Emergency call address suggested to be used. |
|
43 * Can be given also in CConvergedCallProvider::NewEmergencyCallL. |
|
44 * Plug-in will use given address and/or its own known one. |
|
45 * Preferred address usage order: |
|
46 * 1) Plug-in own emergency address |
|
47 * 2) Address given in Dial |
|
48 * 3) Address given in CConvergedCallProvider::NewEmergencyCallL. |
|
49 * @return KErrNone if request was started succesfully. |
|
50 * @return KErrNotReady If call is not in idle state. |
|
51 * @return KErrNotSupported Emergency call is not supported. |
|
52 * @since S60 3.2 |
|
53 */ |
|
54 virtual TInt Dial( const TDesC& aRecipient=KNullDesC) = 0; |
|
55 |
|
56 /** |
|
57 * Called by CCE instead of HangUp when Dial has been called and state change to |
|
58 * MCCPCallObserver::ECCPStateConnecting has not been received. |
|
59 * Cancels the last ongoing request. Used for Dial only. Not supported for other actions. |
|
60 * If the request cannot be started then an error will be returned immediately as return value. |
|
61 * In succesfull case KErrNone will be returned and the requested action has been started. |
|
62 * @param None. |
|
63 * @return KErrNone if request was started succesfully. |
|
64 * @since S60 3.2 |
|
65 * @pre MCCPEmergencyCall::Dial has been called and call state is MCCPCallObserver::ECCPIdle |
|
66 */ |
|
67 virtual TInt Cancel() = 0; |
|
68 |
|
69 /** |
|
70 * Ends an ongoing call. |
|
71 * @param none |
|
72 * @return KErrNone If request was started succesfully. |
|
73 * @return KErrAlreadyExists If call is already in idle state. |
|
74 * @since S60 3.2 |
|
75 */ |
|
76 virtual TInt HangUp() = 0; |
|
77 |
|
78 /** |
|
79 * Answers to an incoming call. |
|
80 * TODO: remove as unneeded? no answer supported ? |
|
81 * @param none |
|
82 * @return KErrNone If request was started succesfully. |
|
83 * @return KErrNotReady If call is not in ringing or queued state. |
|
84 * @since S60 3.2 |
|
85 */ |
|
86 virtual TInt Answer() = 0; |
|
87 }; |
|
88 |
|
89 #endif // MCCPEMERGENCYCALL_H |
|
90 |