epoc32/include/sensrvpropertylistener.h
branchSymbian2
changeset 2 2fe1408b6811
parent 0 061f57f2323e
child 4 837f303aceeb
     1.1 --- a/epoc32/include/sensrvpropertylistener.h	Tue Nov 24 13:55:44 2009 +0000
     1.2 +++ b/epoc32/include/sensrvpropertylistener.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -1,1 +1,106 @@
     1.4 -sensrvpropertylistener.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:  Property listener callback interface
    1.19 +*
    1.20 +*/
    1.21 +
    1.22 +
    1.23 +#ifndef SENSRVPROPERTYLISTENER_H
    1.24 +#define SENSRVPROPERTYLISTENER_H
    1.25 +
    1.26 +
    1.27 +#include <e32base.h>
    1.28 +#include <sensrvtypes.h>
    1.29 +#include <sensrvproperty.h>
    1.30 +#include <sensrvchannel.h>
    1.31 +
    1.32 +// CLASS DECLARATIONS
    1.33 +
    1.34 +/**
    1.35 +* Property listener callback interface to indicate when a property has changed or when
    1.36 +* clients access to setting properties has changed.
    1.37 +* 
    1.38 +* This class is for use with the CSensrvChannel::SetPropertyListenerL() method. Clients wishing
    1.39 +* to use property listening must inherit from this class and provide a reference to an instance
    1.40 +* of it in CSensrvChannel::SetPropertyListenerL().
    1.41 +* 
    1.42 +* @see CSensrvChannel::SetPropertyListenerL()
    1.43 +* @lib sensrvclient.lib
    1.44 +* @since S60 5.0
    1.45 +*/
    1.46 +class MSensrvPropertyListener
    1.47 +    {
    1.48 +    public:
    1.49 +    /**
    1.50 +    * Callback implemented by a client so that they can be notified when the value of a
    1.51 +    * property has changed. The client that set the property will not be notified.
    1.52 +    * 
    1.53 +    * Clients providing an implementation for this callback must ensure that the operation does
    1.54 +    * not leave. If a leave does occur then the behaviour is undefined.
    1.55 +    * 
    1.56 +    * @since S60 5.0
    1.57 +    * @param  aChannel Channel associated with the listener
    1.58 +    * @param  aChangedProperty The property that has changed
    1.59 +    */  
    1.60 +    virtual void PropertyChanged( CSensrvChannel& aChannel, 
    1.61 +                                  const TSensrvProperty& aChangedProperty ) = 0;
    1.62 +
    1.63 +    /**
    1.64 +    * Callback implemented by a client so that they can be notified when property listening
    1.65 +    * has failed. If the error is fatal the channel will be closed, the sensor server session
    1.66 +    * has been terminated and the channel object is no longer useable. If the error is minor,
    1.67 +    * some property changes have potentially been missed, 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  aChannel Channel associated with the listener
    1.74 +    * @param  aError The error severity
    1.75 +    */
    1.76 +    virtual void PropertyError( CSensrvChannel& aChannel, 
    1.77 +                                TSensrvErrorSeverity aError ) = 0;
    1.78 +    
    1.79 +    /**
    1.80 +    * Callback implemented by a client so that they can be notified when the clients access for 
    1.81 +    * setting properties has changed.
    1.82 +    * 
    1.83 +    * Clients providing an implementation for this callback must ensure that the operation does
    1.84 +    * not leave. If a leave does occur then the behaviour is undefined.
    1.85 +    * 
    1.86 +    * @since S60 5.0
    1.87 +    * @param  aIndication Indication of the clients access for setting of properties  
    1.88 +    */
    1.89 +    virtual void SetPropertySuccessIndicationChanged( 
    1.90 +                 TSetPropertySuccessIndicator aIndication ) = 0;
    1.91 +        
    1.92 +    /** 
    1.93 +    * Callback to future proof this API so that additional callbacks can be added in the future 
    1.94 +    * without breaking binary compatibility.
    1.95 +    * 
    1.96 +    * @param  aInterfaceUid Identifier for the interface to be retrieved
    1.97 +    * @param  aInterface A reference to a pointer for the specified interface. Implementation sets
    1.98 +    * aInterface to a valid pointer if the M-class identified by aInterfaceUid is supported, otherwise
    1.99 +    * it is set to NULL on exit.
   1.100 +    * 
   1.101 +    * @since S60 5.0
   1.102 +    * @leave  One of the system-wide error codes
   1.103 +    */
   1.104 +	virtual void GetPropertyListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ) = 0;
   1.105 +
   1.106 +    };
   1.107 +    
   1.108 +#endif //SENSRVPROPERTYLISTENER_H
   1.109 +
   1.110 +// End of File