1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 |
|
17 |
|
18 /** |
|
19 @file |
|
20 @publishedPartner |
|
21 @released |
|
22 */ |
|
23 |
|
24 #ifndef REMCONINTERFACEIF_H |
|
25 #define REMCONINTERFACEIF_H |
|
26 |
|
27 #include <e32base.h> |
|
28 #include <remcon/messagetype.h> |
|
29 |
|
30 /** |
|
31 The UID of the interface between the interface selector and the outer layer |
|
32 API. Currently this consists of a single 'new message' method. If in future it |
|
33 changes (more methods are added) then a new M class and UID can be defined. |
|
34 New outer layer APIs can implement that M class and be used by the interface |
|
35 selector, without breaking existing outer layer APIs which still only |
|
36 implement this version of the interface. |
|
37 */ |
|
38 const TInt KRemConInterfaceIf1 = 0x1020D409; |
|
39 const TInt KRemConInterfaceIf2 = 0x10285A37; |
|
40 |
|
41 /** |
|
42 Mixin for outer layer interfaces to be notified of incoming messages (commands and responses). |
|
43 Having received a command, the client is obliged to send a response. |
|
44 A client can only have one send outstanding at any time. |
|
45 If commands come in quickly, the client is responsible for queueing its responses to them. |
|
46 Note that each command delivered to a target involves memory allocated in the server’s heap, |
|
47 which is only released on client closure or when a response is sent. |
|
48 */ |
|
49 class MRemConInterfaceIf |
|
50 { |
|
51 public: |
|
52 /** |
|
53 Called when a message comes in for this interface. |
|
54 @param aOperationId The interface-specific operation id. |
|
55 @param aData Any operation-specific data. |
|
56 */ |
|
57 virtual void MrcibNewMessage(TUint aOperationId, const TDesC8& aData) = 0; |
|
58 }; |
|
59 |
|
60 /** |
|
61 Mixin for outer layer interfaces to be notified of incoming messages. |
|
62 */ |
|
63 class MRemConInterfaceIf2 |
|
64 { |
|
65 public: |
|
66 /** |
|
67 Called when a message comes in for this interface. |
|
68 @param aOperationId The interface-specific operation id. |
|
69 @param aData Any operation-specific data. |
|
70 */ |
|
71 virtual void MrcibNewMessage(TUint aOperationId, const TDesC8& aData, TRemConMessageSubType aMessageSubType) = 0; |
|
72 }; |
|
73 |
|
74 |
|
75 #endif // REMCONINTERFACEIF_H |
|