author | William Roberts <williamr@symbian.org> |
Wed, 31 Mar 2010 12:33:34 +0100 | |
branch | Symbian3 |
changeset 4 | 837f303aceeb |
parent 2 | 2fe1408b6811 |
permissions | -rw-r--r-- |
williamr@2 | 1 |
/* |
williamr@2 | 2 |
* Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). |
williamr@2 | 3 |
* All rights reserved. |
williamr@2 | 4 |
* This component and the accompanying materials are made available |
williamr@4 | 5 |
* under the terms of "Eclipse Public License v1.0" |
williamr@2 | 6 |
* which accompanies this distribution, and is available |
williamr@4 | 7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html". |
williamr@2 | 8 |
* |
williamr@2 | 9 |
* Initial Contributors: |
williamr@2 | 10 |
* Nokia Corporation - initial contribution. |
williamr@2 | 11 |
* |
williamr@2 | 12 |
* Contributors: |
williamr@2 | 13 |
* |
williamr@2 | 14 |
* Description: Interface for channel listener |
williamr@2 | 15 |
* |
williamr@2 | 16 |
*/ |
williamr@2 | 17 |
|
williamr@2 | 18 |
|
williamr@2 | 19 |
|
williamr@2 | 20 |
#ifndef SENSRVCHANNELLISTENER_H |
williamr@2 | 21 |
#define SENSRVCHANNELLISTENER_H |
williamr@2 | 22 |
|
williamr@2 | 23 |
|
williamr@2 | 24 |
#include <e32base.h> |
williamr@2 | 25 |
#include <sensrvchannelfinder.h> |
williamr@2 | 26 |
#include <sensrvtypes.h> |
williamr@2 | 27 |
#include <sensrvchannelinfo.h> |
williamr@2 | 28 |
|
williamr@2 | 29 |
/** |
williamr@2 | 30 |
* Channel listener callback interface to indicate when channels have been added or removed. |
williamr@2 | 31 |
* |
williamr@2 | 32 |
* This class is for use with the CSensrvChannelFinder::SetChannelListenerL() method. Clients wishing |
williamr@2 | 33 |
* to find channels must inherit from this class and provide a reference to an instance of it in |
williamr@2 | 34 |
* CSensrvChannelFinder::SetChannelListenerL(). |
williamr@2 | 35 |
* |
williamr@2 | 36 |
* @see CSensrvChannelFinder::SetChannelListenerL() |
williamr@2 | 37 |
* @lib sensrvclient.lib |
williamr@2 | 38 |
* @since S60 5.0 |
williamr@2 | 39 |
*/ |
williamr@2 | 40 |
class MSensrvChannelListener |
williamr@2 | 41 |
{ |
williamr@2 | 42 |
public: |
williamr@2 | 43 |
|
williamr@2 | 44 |
/** |
williamr@2 | 45 |
* Callback implemented by a client so that they can be notified when channels are added |
williamr@2 | 46 |
* or removed from the system when new software is installed or uninstalled. |
williamr@2 | 47 |
* |
williamr@2 | 48 |
* Clients providing an implementation for this callback must ensure that the operation does |
williamr@2 | 49 |
* not leave. If a leave does occur then the behaviour is undefined. |
williamr@2 | 50 |
* |
williamr@2 | 51 |
* @since S60 5.0 |
williamr@2 | 52 |
* @param aDetectedChannel Information for the channel that has been added or removed |
williamr@2 | 53 |
* @param aChangeType If ESensrvChannelAdded, channel is a newly available channel. |
williamr@2 | 54 |
* If ESensrvChannelRemoved, channel has been removed and is no longer available. |
williamr@2 | 55 |
*/ |
williamr@2 | 56 |
virtual void ChannelChangeDetected( const TSensrvChannelInfo& aDetectedChannel, |
williamr@2 | 57 |
TSensrvChannelChangeType aChangeType ) = 0; |
williamr@2 | 58 |
|
williamr@2 | 59 |
/** |
williamr@2 | 60 |
* Callback implemented by a client so that they can be notified when channel listening |
williamr@2 | 61 |
* has failed. If the error is fatal the sensor server session has been terminated and |
williamr@2 | 62 |
* the channel finder is no longer useable. If the error is minor some notifications have |
williamr@2 | 63 |
* potentially been lost, however listening is still active. |
williamr@2 | 64 |
* |
williamr@2 | 65 |
* Clients providing an implementation for this callback must ensure that the operation does |
williamr@2 | 66 |
* not leave. If a leave does occur then the behaviour is undefined. |
williamr@2 | 67 |
* |
williamr@2 | 68 |
* @since S60 5.0 |
williamr@2 | 69 |
* @param aChannelFinder Reference to the related channelfinder object |
williamr@2 | 70 |
* @param aError The error severity |
williamr@2 | 71 |
*/ |
williamr@2 | 72 |
virtual void ChannelDetectionError( CSensrvChannelFinder& aChannelFinder, |
williamr@2 | 73 |
TSensrvErrorSeverity aError ) = 0; |
williamr@2 | 74 |
|
williamr@2 | 75 |
/** |
williamr@2 | 76 |
* Callback to future proof this API so that additional callbacks can be added in the future |
williamr@2 | 77 |
* without breaking binary compatibility. |
williamr@2 | 78 |
* |
williamr@2 | 79 |
* @since S60 5.0 |
williamr@2 | 80 |
* @param aInterfaceUid Identifier for the interface to be retrieved |
williamr@2 | 81 |
* @param aInterface A reference to a pointer for the specified interface. Implementation sets |
williamr@2 | 82 |
* aInterface to a valid pointer if the M-class identified by aInterfaceUid is supported, otherwise |
williamr@2 | 83 |
* it is set to NULL on exit. |
williamr@2 | 84 |
* @leave One of the system-wide error codes |
williamr@2 | 85 |
*/ |
williamr@2 | 86 |
virtual void GetChannelListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ) = 0; |
williamr@2 | 87 |
|
williamr@2 | 88 |
}; |
williamr@2 | 89 |
|
williamr@2 | 90 |
|
williamr@2 | 91 |
|
williamr@2 | 92 |
#endif //SENSRVCHANNELLISTENER_H |
williamr@2 | 93 |
|
williamr@2 | 94 |
// End of File |
williamr@2 | 95 |