connectivitylayer/isce/isirouter_dll/inc/misichannelrouterif.h
author mikaruus <mika.a.ruuskanen@nokia.com>
Wed, 17 Feb 2010 13:58:55 +0200
changeset 7 fa67e03b87df
parent 0 63b37f68c1ce
permissions -rw-r--r--
New release based on our 2010wk08 release

/*
* Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
* 
* Description: 
*
*/



#ifndef __ISICHANNELROUTERIF_H__
#define __ISICHANNELROUTERIF_H__

#include <e32def.h>     // For TInt, TAny
#include "misiobjectrouterif.h"

class MISIRouterChannelIf;

/*
* Abstract interface for channel to use router services.
*/
class MISIChannelRouterIf : public MISIObjectRouterIf
    {

    public:

        /*
        * Informs router that channel is closed.
        */
        virtual void Disconnect( const TUint8 aObjId ) = 0;

        /*
        * Returns the interface.
        * @return pointer to the interface
        */
        static MISIChannelRouterIf* GetIf();

        /*
        * Informs router that channel is ready to be open.
        * If transceiver is not found sets the open pending.
        * Router shall complete the pending opens when transceiver is ready.
        * @param aUID, clients UID.
        * @param aObjId, reference to write clients object id.
        * @param aCallback, pointer to channel interface.
        */
        virtual void Connect( const TInt32 aUID, TUint8& aObjId, MISIRouterChannelIf* aCallback ) = 0;

        /*
        * Sends a message to router.
        * Responsibility to deallocate the message is transferred router.
        * @param aMessage, messages reference
        * @return, KErrNone if succesfull, KErrNotReady if transceiver is not present.
        */
        virtual TInt Send( TDes8& aMessage, const TUint8 aObjId ) = 0;

    };

#endif /* __ISICHANNELROUTERIF_H__ */