1.1 --- a/epoc32/include/sensrvchannellistener.h Tue Nov 24 13:55:44 2009 +0000
1.2 +++ b/epoc32/include/sensrvchannellistener.h Tue Mar 16 16:12:26 2010 +0000
1.3 @@ -1,1 +1,95 @@
1.4 -sensrvchannellistener.h
1.5 +/*
1.6 +* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
1.7 +* All rights reserved.
1.8 +* This component and the accompanying materials are made available
1.9 +* 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.10 +* which accompanies this distribution, and is available
1.11 +* at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
1.12 +*
1.13 +* Initial Contributors:
1.14 +* Nokia Corporation - initial contribution.
1.15 +*
1.16 +* Contributors:
1.17 +*
1.18 +* Description: Interface for channel listener
1.19 +*
1.20 +*/
1.21 +
1.22 +
1.23 +
1.24 +#ifndef SENSRVCHANNELLISTENER_H
1.25 +#define SENSRVCHANNELLISTENER_H
1.26 +
1.27 +
1.28 +#include <e32base.h>
1.29 +#include <sensrvchannelfinder.h>
1.30 +#include <sensrvtypes.h>
1.31 +#include <sensrvchannelinfo.h>
1.32 +
1.33 +/**
1.34 +* Channel listener callback interface to indicate when channels have been added or removed.
1.35 +*
1.36 +* This class is for use with the CSensrvChannelFinder::SetChannelListenerL() method. Clients wishing
1.37 +* to find channels must inherit from this class and provide a reference to an instance of it in
1.38 +* CSensrvChannelFinder::SetChannelListenerL().
1.39 +*
1.40 +* @see CSensrvChannelFinder::SetChannelListenerL()
1.41 +* @lib sensrvclient.lib
1.42 +* @since S60 5.0
1.43 +*/
1.44 +class MSensrvChannelListener
1.45 + {
1.46 + public:
1.47 +
1.48 + /**
1.49 + * Callback implemented by a client so that they can be notified when channels are added
1.50 + * or removed from the system when new software is installed or uninstalled.
1.51 + *
1.52 + * Clients providing an implementation for this callback must ensure that the operation does
1.53 + * not leave. If a leave does occur then the behaviour is undefined.
1.54 + *
1.55 + * @since S60 5.0
1.56 + * @param aDetectedChannel Information for the channel that has been added or removed
1.57 + * @param aChangeType If ESensrvChannelAdded, channel is a newly available channel.
1.58 + * If ESensrvChannelRemoved, channel has been removed and is no longer available.
1.59 + */
1.60 + virtual void ChannelChangeDetected( const TSensrvChannelInfo& aDetectedChannel,
1.61 + TSensrvChannelChangeType aChangeType ) = 0;
1.62 +
1.63 + /**
1.64 + * Callback implemented by a client so that they can be notified when channel listening
1.65 + * has failed. If the error is fatal the sensor server session has been terminated and
1.66 + * the channel finder is no longer useable. If the error is minor some notifications have
1.67 + * potentially been lost, however listening is still active.
1.68 + *
1.69 + * Clients providing an implementation for this callback must ensure that the operation does
1.70 + * not leave. If a leave does occur then the behaviour is undefined.
1.71 + *
1.72 + * @since S60 5.0
1.73 + * @param aChannelFinder Reference to the related channelfinder object
1.74 + * @param aError The error severity
1.75 + */
1.76 + virtual void ChannelDetectionError( CSensrvChannelFinder& aChannelFinder,
1.77 + TSensrvErrorSeverity aError ) = 0;
1.78 +
1.79 + /**
1.80 + * Callback to future proof this API so that additional callbacks can be added in the future
1.81 + * without breaking binary compatibility.
1.82 + *
1.83 + * @since S60 5.0
1.84 + * @param aInterfaceUid Identifier for the interface to be retrieved
1.85 + * @param aInterface A reference to a pointer for the specified interface. Implementation sets
1.86 + * aInterface to a valid pointer if the M-class identified by aInterfaceUid is supported, otherwise
1.87 + * it is set to NULL on exit.
1.88 + * @leave One of the system-wide error codes
1.89 + */
1.90 + virtual void GetChannelListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ) = 0;
1.91 +
1.92 + };
1.93 +
1.94 +
1.95 +
1.96 +#endif //SENSRVCHANNELLISTENER_H
1.97 +
1.98 +// End of File
1.99 +