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