2 * Copyright (c) 2008 Nokia Corporation and/or its subsidiary(-ies).
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".
9 * Initial Contributors:
10 * Nokia Corporation - initial contribution.
14 * Description: Property listener callback interface
19 #ifndef SENSRVPROPERTYLISTENER_H
20 #define SENSRVPROPERTYLISTENER_H
24 #include <sensrvtypes.h>
25 #include <sensrvproperty.h>
26 #include <sensrvchannel.h>
31 * Property listener callback interface to indicate when a property has changed or when
32 * clients access to setting properties has changed.
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().
38 * @see CSensrvChannel::SetPropertyListenerL()
39 * @lib sensrvclient.lib
42 class MSensrvPropertyListener
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.
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.
53 * @param aChannel Channel associated with the listener
54 * @param aChangedProperty The property that has changed
56 virtual void PropertyChanged( CSensrvChannel& aChannel,
57 const TSensrvProperty& aChangedProperty ) = 0;
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.
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.
69 * @param aChannel Channel associated with the listener
70 * @param aError The error severity
72 virtual void PropertyError( CSensrvChannel& aChannel,
73 TSensrvErrorSeverity aError ) = 0;
76 * Callback implemented by a client so that they can be notified when the clients access for
77 * setting properties has changed.
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.
83 * @param aIndication Indication of the clients access for setting of properties
85 virtual void SetPropertySuccessIndicationChanged(
86 TSetPropertySuccessIndicator aIndication ) = 0;
89 * Callback to future proof this API so that additional callbacks can be added in the future
90 * without breaking binary compatibility.
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.
98 * @leave One of the system-wide error codes
100 virtual void GetPropertyListenerInterfaceL( TUid aInterfaceUid, TAny*& aInterface ) = 0;
104 #endif //SENSRVPROPERTYLISTENER_H