epoc32/include/sensrvpropertylistener.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 "Eclipse Public License v1.0"
     6 * which accompanies this distribution, and is available
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
     8 *
     9 * Initial Contributors:
    10 * Nokia Corporation - initial contribution.
    11 *
    12 * Contributors:
    13 *
    14 * Description:  Property listener callback interface
    15 *
    16 */
    17 
    18 
    19 #ifndef SENSRVPROPERTYLISTENER_H
    20 #define SENSRVPROPERTYLISTENER_H
    21 
    22 
    23 #include <e32base.h>
    24 #include <sensrvtypes.h>
    25 #include <sensrvproperty.h>
    26 #include <sensrvchannel.h>
    27 
    28 // CLASS DECLARATIONS
    29 
    30 /**
    31 * Property listener callback interface to indicate when a property has changed or when
    32 * clients access to setting properties has changed.
    33 * 
    34 * This class is for use with the CSensrvChannel::SetPropertyListenerL() method. Clients wishing
    35 * to use property listening must inherit from this class and provide a reference to an instance
    36 * of it in CSensrvChannel::SetPropertyListenerL().
    37 * 
    38 * @see CSensrvChannel::SetPropertyListenerL()
    39 * @lib sensrvclient.lib
    40 * @since S60 5.0
    41 */
    42 class MSensrvPropertyListener
    43     {
    44     public:
    45     /**
    46     * Callback implemented by a client so that they can be notified when the value of a
    47     * property has changed. The client that set the property will not be notified.
    48     * 
    49     * Clients providing an implementation for this callback must ensure that the operation does
    50     * not leave. If a leave does occur then the behaviour is undefined.
    51     * 
    52     * @since S60 5.0
    53     * @param  aChannel Channel associated with the listener
    54     * @param  aChangedProperty The property that has changed
    55     */  
    56     virtual void PropertyChanged( CSensrvChannel& aChannel, 
    57                                   const TSensrvProperty& aChangedProperty ) = 0;
    58 
    59     /**
    60     * Callback implemented by a client so that they can be notified when property listening
    61     * has failed. If the error is fatal the channel will be closed, the sensor server session
    62     * has been terminated and the channel object is no longer useable. If the error is minor,
    63     * some property changes have potentially been missed, 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  aChannel Channel associated with the listener
    70     * @param  aError The error severity
    71     */
    72     virtual void PropertyError( CSensrvChannel& aChannel, 
    73                                 TSensrvErrorSeverity aError ) = 0;
    74     
    75     /**
    76     * Callback implemented by a client so that they can be notified when the clients access for 
    77     * setting properties has changed.
    78     * 
    79     * Clients providing an implementation for this callback must ensure that the operation does
    80     * not leave. If a leave does occur then the behaviour is undefined.
    81     * 
    82     * @since S60 5.0
    83     * @param  aIndication Indication of the clients access for setting of properties  
    84     */
    85     virtual void SetPropertySuccessIndicationChanged( 
    86                  TSetPropertySuccessIndicator aIndication ) = 0;
    87         
    88     /** 
    89     * Callback to future proof this API so that additional callbacks can be added in the future 
    90     * without breaking binary compatibility.
    91     * 
    92     * @param  aInterfaceUid Identifier for the interface to be retrieved
    93     * @param  aInterface A reference to a pointer for the specified interface. Implementation sets
    94     * aInterface to a valid pointer if the M-class identified by aInterfaceUid is supported, otherwise
    95     * it is set to NULL on exit.
    96     * 
    97     * @since S60 5.0
    98     * @leave  One of the system-wide error codes
    99     */
   100 	virtual void GetPropertyListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ) = 0;
   101 
   102     };
   103     
   104 #endif //SENSRVPROPERTYLISTENER_H
   105 
   106 // End of File