epoc32/include/remcon/remconinterfaceif.h
branchSymbian2
changeset 2 2fe1408b6811
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/remcon/remconinterfaceif.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,75 @@
     1.4 +// Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// 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
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +
    1.20 +
    1.21 +/**
    1.22 + @file
    1.23 + @publishedPartner
    1.24 + @released
    1.25 +*/
    1.26 +
    1.27 +#ifndef REMCONINTERFACEIF_H
    1.28 +#define REMCONINTERFACEIF_H
    1.29 +
    1.30 +#include <e32base.h>
    1.31 +#include <remcon/messagetype.h>
    1.32 +
    1.33 +/** 
    1.34 +The UID of the interface between the interface selector and the outer layer 
    1.35 +API. Currently this consists of a single 'new message' method. If in future it 
    1.36 +changes (more methods are added) then a new M class and UID can be defined. 
    1.37 +New outer layer APIs can implement that M class and be used by the interface 
    1.38 +selector, without breaking existing outer layer APIs which still only 
    1.39 +implement this version of the interface.
    1.40 +*/
    1.41 +const TInt KRemConInterfaceIf1 = 0x1020D409;
    1.42 +const TInt KRemConInterfaceIf2 = 0x10285A37;
    1.43 +
    1.44 +/**
    1.45 +Mixin for outer layer interfaces to be notified of incoming messages (commands and responses).
    1.46 +Having received a command, the client is obliged to send a response.
    1.47 +A client can only have one send outstanding at any time.
    1.48 +If commands come in quickly, the client is responsible for queueing its responses to them.
    1.49 +Note that each command delivered to a target involves memory allocated in the server’s heap,
    1.50 +which is only released on client closure or when a response is sent.
    1.51 +*/
    1.52 +class MRemConInterfaceIf
    1.53 +	{
    1.54 +public: 
    1.55 +	/**
    1.56 +	Called when a message comes in for this interface.
    1.57 +	@param aOperationId The interface-specific operation id.
    1.58 +	@param aData Any operation-specific data.
    1.59 +	*/
    1.60 +	virtual void MrcibNewMessage(TUint aOperationId, const TDesC8& aData) = 0;
    1.61 +	};
    1.62 +
    1.63 +/**
    1.64 +Mixin for outer layer interfaces to be notified of incoming messages. 
    1.65 +*/
    1.66 +class MRemConInterfaceIf2
    1.67 +	{
    1.68 +public: 
    1.69 +	/**
    1.70 +	Called when a message comes in for this interface.
    1.71 +	@param aOperationId The interface-specific operation id.
    1.72 +	@param aData Any operation-specific data.
    1.73 +	*/
    1.74 +	virtual void MrcibNewMessage(TUint aOperationId, const TDesC8& aData, TRemConMessageSubType aMessageSubType) = 0;
    1.75 +	};
    1.76 +
    1.77 +	
    1.78 +#endif // REMCONINTERFACEIF_H