williamr@2: /* williamr@2: * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies). williamr@2: * All rights reserved. williamr@2: * This component and the accompanying materials are made available williamr@4: * under the terms of "Eclipse Public License v1.0" williamr@2: * which accompanies this distribution, and is available williamr@4: * at the URL "http://www.eclipse.org/legal/epl-v10.html". williamr@2: * williamr@2: * Initial Contributors: williamr@2: * Nokia Corporation - initial contribution. williamr@2: * williamr@2: * Contributors: williamr@2: * williamr@2: * Description: Property listener callback interface williamr@2: * williamr@2: */ williamr@2: williamr@2: williamr@2: #ifndef SENSRVPROPERTYLISTENER_H williamr@2: #define SENSRVPROPERTYLISTENER_H williamr@2: williamr@2: williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: #include williamr@2: williamr@2: // CLASS DECLARATIONS williamr@2: williamr@2: /** williamr@2: * Property listener callback interface to indicate when a property has changed or when williamr@2: * clients access to setting properties has changed. williamr@2: * williamr@2: * This class is for use with the CSensrvChannel::SetPropertyListenerL() method. Clients wishing williamr@2: * to use property listening must inherit from this class and provide a reference to an instance williamr@2: * of it in CSensrvChannel::SetPropertyListenerL(). williamr@2: * williamr@2: * @see CSensrvChannel::SetPropertyListenerL() williamr@2: * @lib sensrvclient.lib williamr@2: * @since S60 5.0 williamr@2: */ williamr@2: class MSensrvPropertyListener williamr@2: { williamr@2: public: williamr@2: /** williamr@2: * Callback implemented by a client so that they can be notified when the value of a williamr@2: * property has changed. The client that set the property will not be notified. williamr@2: * williamr@2: * Clients providing an implementation for this callback must ensure that the operation does williamr@2: * not leave. If a leave does occur then the behaviour is undefined. williamr@2: * williamr@2: * @since S60 5.0 williamr@2: * @param aChannel Channel associated with the listener williamr@2: * @param aChangedProperty The property that has changed williamr@2: */ williamr@2: virtual void PropertyChanged( CSensrvChannel& aChannel, williamr@2: const TSensrvProperty& aChangedProperty ) = 0; williamr@2: williamr@2: /** williamr@2: * Callback implemented by a client so that they can be notified when property listening williamr@2: * has failed. If the error is fatal the channel will be closed, the sensor server session williamr@2: * has been terminated and the channel object is no longer useable. If the error is minor, williamr@2: * some property changes have potentially been missed, however listening is still active. williamr@2: * williamr@2: * Clients providing an implementation for this callback must ensure that the operation does williamr@2: * not leave. If a leave does occur then the behaviour is undefined. williamr@2: * williamr@2: * @since S60 5.0 williamr@2: * @param aChannel Channel associated with the listener williamr@2: * @param aError The error severity williamr@2: */ williamr@2: virtual void PropertyError( CSensrvChannel& aChannel, williamr@2: TSensrvErrorSeverity aError ) = 0; williamr@2: williamr@2: /** williamr@2: * Callback implemented by a client so that they can be notified when the clients access for williamr@2: * setting properties has changed. williamr@2: * williamr@2: * Clients providing an implementation for this callback must ensure that the operation does williamr@2: * not leave. If a leave does occur then the behaviour is undefined. williamr@2: * williamr@2: * @since S60 5.0 williamr@2: * @param aIndication Indication of the clients access for setting of properties williamr@2: */ williamr@2: virtual void SetPropertySuccessIndicationChanged( williamr@2: TSetPropertySuccessIndicator aIndication ) = 0; williamr@2: williamr@2: /** williamr@2: * Callback to future proof this API so that additional callbacks can be added in the future williamr@2: * without breaking binary compatibility. williamr@2: * williamr@2: * @param aInterfaceUid Identifier for the interface to be retrieved williamr@2: * @param aInterface A reference to a pointer for the specified interface. Implementation sets williamr@2: * aInterface to a valid pointer if the M-class identified by aInterfaceUid is supported, otherwise williamr@2: * it is set to NULL on exit. williamr@2: * williamr@2: * @since S60 5.0 williamr@2: * @leave One of the system-wide error codes williamr@2: */ williamr@2: virtual void GetPropertyListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ) = 0; williamr@2: williamr@2: }; williamr@2: williamr@2: #endif //SENSRVPROPERTYLISTENER_H williamr@2: williamr@2: // End of File