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