51
|
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 "Eclipse Public License v1.0"
|
|
5 |
// which accompanies this distribution, and is available
|
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
7 |
//
|
|
8 |
// Initial Contributors:
|
|
9 |
// Nokia Corporation - initial contribution.
|
|
10 |
//
|
|
11 |
// Contributors:
|
|
12 |
//
|
|
13 |
// Description:
|
|
14 |
//
|
|
15 |
|
|
16 |
/**
|
|
17 |
@file
|
|
18 |
@publishedAll
|
|
19 |
@released
|
|
20 |
*/
|
|
21 |
|
|
22 |
#ifndef REMCONINTERFACEIF_H
|
|
23 |
#define REMCONINTERFACEIF_H
|
|
24 |
|
|
25 |
#include <e32base.h>
|
|
26 |
#include <remcon/messagetype.h>
|
|
27 |
|
|
28 |
class TRemConAddress;
|
|
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 |
|
|
40 |
/**
|
|
41 |
Mixin for outer layer interfaces to be notified of incoming messages (commands and responses).
|
|
42 |
Having received a command, the client is obliged to send a response.
|
|
43 |
A client can only have one send outstanding at any time.
|
|
44 |
If commands come in quickly, the client is responsible for queueing its responses to them.
|
|
45 |
Note that each command delivered to a target involves memory allocated in the server’s heap,
|
|
46 |
which is only released on client closure or when a response is sent.
|
|
47 |
*/
|
|
48 |
class MRemConInterfaceIf
|
|
49 |
{
|
|
50 |
public:
|
|
51 |
/**
|
|
52 |
Called when a message comes in for this interface.
|
|
53 |
@param aOperationId The interface-specific operation id.
|
|
54 |
@param aData Any operation-specific data.
|
|
55 |
*/
|
|
56 |
virtual void MrcibNewMessage(TUint aOperationId, const TDesC8& aData) = 0;
|
|
57 |
};
|
|
58 |
|
|
59 |
|
|
60 |
/**
|
|
61 |
The UID of the interface between the interface selector and the outer layer
|
|
62 |
API. Currently this consists of a single 'new message' method. If in future it
|
|
63 |
changes (more methods are added) then a new M class and UID can be defined.
|
|
64 |
New outer layer APIs can implement that M class and be used by the interface
|
|
65 |
selector, without breaking existing outer layer APIs which still only
|
|
66 |
implement this version of the interface.
|
|
67 |
*/
|
|
68 |
const TInt KRemConInterfaceIf2 = 0x10285A37;
|
|
69 |
|
|
70 |
/**
|
|
71 |
Mixin for outer layer interfaces to be notified of incoming messages.
|
|
72 |
*/
|
|
73 |
class MRemConInterfaceIf2
|
|
74 |
{
|
|
75 |
public:
|
|
76 |
/**
|
|
77 |
Called when a message comes in for this interface.
|
|
78 |
@param aOperationId The interface-specific operation id.
|
|
79 |
@param aData Any operation-specific data.
|
|
80 |
@param aMessageSubType The message subtype.
|
|
81 |
*/
|
|
82 |
virtual void MrcibNewMessage(TUint aOperationId, const TDesC8& aData, TRemConMessageSubType aMessageSubType) = 0;
|
|
83 |
};
|
|
84 |
|
|
85 |
|
|
86 |
/**
|
|
87 |
The UID of the interface between the interface selector and the outer layer
|
|
88 |
API. Currently this consists of a single 'new message' method. If in future it
|
|
89 |
changes (more methods are added) then a new M class and UID can be defined.
|
|
90 |
New outer layer APIs can implement that M class and be used by the interface
|
|
91 |
selector, without breaking existing outer layer APIs which still only
|
|
92 |
implement this version of the interface.
|
|
93 |
*/
|
|
94 |
const TInt KRemConInterfaceIf3 = 0x10285DF1;
|
|
95 |
|
|
96 |
/**
|
|
97 |
Mixin for outer layer interfaces to be notified of incoming messages.
|
|
98 |
*/
|
|
99 |
class MRemConInterfaceIf3
|
|
100 |
{
|
|
101 |
public:
|
|
102 |
/**
|
|
103 |
Called when a message comes in for this interface.
|
|
104 |
@param aOperationId The interface-specific operation id.
|
|
105 |
@param aData Any operation-specific data.
|
|
106 |
@param aMessageSubType The message subtype.
|
|
107 |
@param aRemoteAddr The address of the remote that sent the message
|
|
108 |
(includes the bearer UID).
|
|
109 |
*/
|
|
110 |
virtual void MrcibNewMessage(TUint aOperationId, const TDesC8& aData, TRemConMessageSubType aMessageSubType, const TRemConAddress& aRemoteAddr) = 0;
|
|
111 |
};
|
|
112 |
|
|
113 |
|
|
114 |
#endif // REMCONINTERFACEIF_H
|