|
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: CCE extension interface class. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #ifndef MCCEEXTENSIONINTERFACE_H |
|
20 #define MCCEEXTENSIONINTERFACE_H |
|
21 |
|
22 // INCLUDES |
|
23 #include <e32base.h> |
|
24 |
|
25 /** |
|
26 * Plug-in extension feature provider. |
|
27 * E.g telephony engine might have plugin features specific to call providers |
|
28 * functionality. Plug-in specific actions can be requested syncronous or asyncronous via this class. |
|
29 * Async message results are returned using MCCEExtensionObserver |
|
30 * One instance of extension interface is used in CCE. In CCP many (one for every plug-in). One is used |
|
31 * in order to avoid using an array in CCE interface and to notify disapearance of that interface in case |
|
32 * plug-in goes down. |
|
33 * |
|
34 * @since S60 3.2 |
|
35 */ |
|
36 class MCCEExtensionInterface |
|
37 { |
|
38 protected: |
|
39 /** |
|
40 * Protected destructor. Object cannot be deleted from client. |
|
41 * @since S60 3.2 |
|
42 */ |
|
43 virtual ~MCCEExtensionInterface() {}; |
|
44 |
|
45 public: |
|
46 |
|
47 /** |
|
48 * Request a custom command. Results are returned via MCCEExtensionObserver. |
|
49 * Many service-ids may map to same plug-in. |
|
50 * Request-id is used for plug-in internal id of the request. |
|
51 * Replies use also a service-id, but if e.g. one plug-in uses two service-ids 10 and 11 |
|
52 * then request might use 10 and reply use 11. The request id is the id used to determine |
|
53 * what the request and respone relate to. Service-id is used as routing information in CCE and |
|
54 * its client. |
|
55 * @since S60 3.2 |
|
56 * @param aServiceId To which plug-in the event targeted to. |
|
57 * @param aRequestId Id of request. |
|
58 * @param aData Request data. |
|
59 * @return KErrNone Request was started successful. |
|
60 * @return KErrNotFound No extension interface found for given service-id. |
|
61 * @return KErrNotSupported Service-id related plug-in does not support extension interface. |
|
62 * @return Other system wide error code. |
|
63 */ |
|
64 virtual TInt RequestCommand( TUint32 iServiceId, |
|
65 TInt aRequestId, |
|
66 TDesC8& aData ) = 0; |
|
67 /** |
|
68 * Cancels request. See MCCEExtensionInterface::RequestCommand for explanation of service-id |
|
69 * handling. |
|
70 * @since S60 3.2 |
|
71 * @param aServiceId To which plug-in the event targeted to. |
|
72 * @param aRequestId Id of request to cancel. |
|
73 * @return KErrNone Request was started successful. |
|
74 * @return KErrNotFound No extension interface found for given service-id. |
|
75 * @return KErrNotSupported Service-id related plug-in does not support extension interface. |
|
76 * @return Other system wide error code. |
|
77 */ |
|
78 virtual TInt CancelRequest( TUint32 iServiceId, |
|
79 TInt aRequestId ) = 0; |
|
80 }; |
|
81 |
|
82 |
|
83 #endif // MCCEEXTENSIONINTERFACE_H |
|
84 |