|
1 /* |
|
2 * Copyright (c) 2008 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef C_ATEXTPLUGINOBSERVER_H |
|
20 #define C_ATEXTPLUGINOBSERVER_H |
|
21 |
|
22 #include <ecom/ecom.h> |
|
23 #include <atextpluginbase.h> |
|
24 |
|
25 class CATExtPluginBase; |
|
26 |
|
27 /** |
|
28 * The interface for AT Extension Plugin to interact with plugins. |
|
29 * |
|
30 * @since S60 v5.0 |
|
31 */ |
|
32 class MATExtPluginObserver |
|
33 { |
|
34 |
|
35 public: |
|
36 |
|
37 /** |
|
38 * Called by extension plugins when there is an unsolicited result code |
|
39 * should be sent to destination. |
|
40 * |
|
41 * Each AT Extension Plugin is responsible to format |
|
42 * result codes properly, e.g. in BT HFP case, the |
|
43 * format should be <cr><lf><result code><cr><lf> |
|
44 * |
|
45 * @since S60 v5.0 |
|
46 * @param aPlugin Plugin from which the URC comes |
|
47 * @param aAT the unsolicited result code to be sent. |
|
48 * @return Symbian error code on error, KErrNone otherwise |
|
49 */ |
|
50 virtual TInt SendUnsolicitedResult( CATExtPluginBase* aPlugin, |
|
51 const TDesC8& aAT ) = 0; |
|
52 |
|
53 /** |
|
54 * Called by Extension Plugins to inform ATEXT that a command |
|
55 * handling has been completed or rejected. |
|
56 * |
|
57 * @since S60 v5.0 |
|
58 * @param aPlugin Plugin from which the completion comes |
|
59 * @param aError Error code for completion |
|
60 * @param aReplyType Reply type for the handled AT command |
|
61 * @return Symbian error code on error, KErrNone otherwise |
|
62 */ |
|
63 virtual TInt HandleCommandCompleted( CATExtPluginBase* aPlugin, |
|
64 TInt aError, |
|
65 TATExtensionReplyType aReplyType ) = 0; |
|
66 |
|
67 /** |
|
68 * Called by concrete extension plugin to inform the array of supported |
|
69 * commands should be returned |
|
70 * |
|
71 * @since S60 5.0 |
|
72 * @param aPlugin Plugin from which the completion comes |
|
73 * @param aCmd Array of supported commands |
|
74 * @return Symbian error code on error, KErrNone otherwise |
|
75 */ |
|
76 virtual TInt GetSupportedCommands( CATExtPluginBase* aPlugin, |
|
77 RPointerArray<HBufC8>& aCmds ) = 0; |
|
78 |
|
79 /** |
|
80 * Called by the destructor of CATExtPluginBase. |
|
81 * A concrete service provider implementation should not touch this. |
|
82 * |
|
83 * @param aPlugin Plugin from which the closing comes |
|
84 * @return Symbian error code on error, KErrNone otherwise |
|
85 */ |
|
86 virtual TInt ATExtPluginClosed( CATExtPluginBase* aPlugin ) = 0; |
|
87 |
|
88 }; |
|
89 |
|
90 #endif // C_ATEXTPLUGINOBSERVER_H |