williamr@2: /* williamr@2: * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Interface for channel listener williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: williamr@2: #ifndef SENSRVCHANNELLISTENER_H williamr@2: #define SENSRVCHANNELLISTENER_H williamr@2: williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: /** williamr@2: * Channel listener callback interface to indicate when channels have been added or removed. williamr@2: * williamr@2: * This class is for use with the CSensrvChannelFinder::SetChannelListenerL() method. Clients wishing williamr@2: * to find channels must inherit from this class and provide a reference to an instance of it in williamr@2: * CSensrvChannelFinder::SetChannelListenerL(). williamr@2: * williamr@2: * @see CSensrvChannelFinder::SetChannelListenerL() williamr@2: * @lib sensrvclient.lib williamr@2: * @since S60 5.0 williamr@2: */ williamr@2: class MSensrvChannelListener williamr@2: { williamr@2: public: williamr@2: williamr@2: /** williamr@2: * Callback implemented by a client so that they can be notified when channels are added williamr@2: * or removed from the system when new software is installed or uninstalled. williamr@2: * williamr@2: * Clients providing an implementation for this callback must ensure that the operation does williamr@2: * not leave. If a leave does occur then the behaviour is undefined. williamr@2: * williamr@2: * @since S60 5.0 williamr@2: * @param aDetectedChannel Information for the channel that has been added or removed williamr@2: * @param aChangeType If ESensrvChannelAdded, channel is a newly available channel. williamr@2: * If ESensrvChannelRemoved, channel has been removed and is no longer available. williamr@2: */ williamr@2: virtual void ChannelChangeDetected( const TSensrvChannelInfo& aDetectedChannel, williamr@2: TSensrvChannelChangeType aChangeType ) = 0; williamr@2: williamr@2: /** williamr@2: * Callback implemented by a client so that they can be notified when channel listening williamr@2: * has failed. If the error is fatal the sensor server session has been terminated and williamr@2: * the channel finder is no longer useable. If the error is minor some notifications have williamr@2: * potentially been lost, however listening is still active. williamr@2: * williamr@2: * Clients providing an implementation for this callback must ensure that the operation does williamr@2: * not leave. If a leave does occur then the behaviour is undefined. williamr@2: * williamr@2: * @since S60 5.0 williamr@2: * @param aChannelFinder Reference to the related channelfinder object williamr@2: * @param aError The error severity williamr@2: */ williamr@2: virtual void ChannelDetectionError( CSensrvChannelFinder& aChannelFinder, williamr@2: TSensrvErrorSeverity aError ) = 0; williamr@2: williamr@2: /** williamr@2: * Callback to future proof this API so that additional callbacks can be added in the future williamr@2: * without breaking binary compatibility. williamr@2: * williamr@2: * @since S60 5.0 williamr@2: * @param aInterfaceUid Identifier for the interface to be retrieved williamr@2: * @param aInterface A reference to a pointer for the specified interface. Implementation sets williamr@2: * aInterface to a valid pointer if the M-class identified by aInterfaceUid is supported, otherwise williamr@2: * it is set to NULL on exit. williamr@2: * @leave One of the system-wide error codes williamr@2: */ williamr@2: virtual void GetChannelListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ) = 0; williamr@2: williamr@2: }; williamr@2: williamr@2: williamr@2: williamr@2: #endif //SENSRVCHANNELLISTENER_H williamr@2: williamr@2: // End of File williamr@2: