|
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 extension provider class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCCPEXTENSIONPROVIDER_H |
|
20 #define MCCPEXTENSIONPROVIDER_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 class MCCPExtensionObserver; |
|
26 |
|
27 /** |
|
28 * Plug-in extension feature provider. |
|
29 * E.g telephony engine might have plugin features specific to call providers functionality. |
|
30 * Plug-in specific actions can be requested via this class. |
|
31 * Asyncronous results are are returned using MCCPExtensionObserver |
|
32 * |
|
33 * @since S60 3.2 |
|
34 */ |
|
35 class MCCPExtensionProvider |
|
36 { |
|
37 protected: |
|
38 /** |
|
39 * Protected destructor. Object cannot be deleted from plug-in client (CCE). |
|
40 * @since S60 3.2 |
|
41 */ |
|
42 virtual inline ~MCCPExtensionProvider() {}; |
|
43 |
|
44 public: |
|
45 /** |
|
46 * Request a custom command from the plug-in. Result returned via MCCPExtensionObserver. |
|
47 * @since S60 3.2 |
|
48 * @param aRequest Id of request. |
|
49 * @param aData Request data. |
|
50 * @return none |
|
51 */ |
|
52 virtual void RequestCommand( TInt aRequest, |
|
53 TDesC8& aData ) = 0; |
|
54 /** |
|
55 * Cancels request. Result returned via MCCPExtensionObserver. |
|
56 * @since S60 3.2 |
|
57 * @param aReqToCancel Id of request to cancel. |
|
58 * @return none |
|
59 */ |
|
60 virtual void CancelRequest( TInt aReqToCancel ) = 0; |
|
61 |
|
62 /** |
|
63 * Add an observer for extension related events. |
|
64 * Currently CCE will set only one observer. |
|
65 * @since S60 v3.2 |
|
66 * @param aObserver Observer to add. |
|
67 * @return none |
|
68 * @leave system error if observer adding fails |
|
69 */ |
|
70 virtual void AddObserverL( const MCCPExtensionObserver& aObserver ) = 0; |
|
71 |
|
72 /** |
|
73 * Remove an observer. |
|
74 * @since S60 v3.2 |
|
75 * @param aObserver Observer to remove. |
|
76 * @return KErrNone if removed succesfully. |
|
77 * @return KErrNotFound if observer was not found. |
|
78 */ |
|
79 virtual TInt RemoveObserver( const MCCPExtensionObserver& aObserver ) = 0; |
|
80 |
|
81 }; |
|
82 |
|
83 #endif // MCCPEXTENSIONPROVIDER_H |
|
84 |