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