homescreensrv_plat/ai_utilities_api/inc/aipspropertyobserver.h
changeset 0 79c6a41cd166
equal deleted inserted replaced
-1:000000000000 0:79c6a41cd166
       
     1 /*
       
     2 * Copyright (c) 2005-2006 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:  Publish and subscribe parameter observer implementation.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef MAIPSPROPERTYOBSERVER_H
       
    20 #define MAIPSPROPERTYOBSERVER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 
       
    25 // CLASS DECLARATION
       
    26 
       
    27 /**
       
    28 *  It is the interface for handling property change events.
       
    29 *
       
    30 *  @since S60 3.2
       
    31 */
       
    32 class MAiPSPropertyObserver
       
    33     {
       
    34     public:
       
    35 	    
       
    36         /**
       
    37 	 	 * Get the current value of the key.
       
    38 	 	 * 
       
    39 	 	 * @since S60 3.2
       
    40 	 	 * @param aValue refrerence to an integer value of key
       
    41 	 	 * @return integer value of the error.
       
    42 	 	 */
       
    43         virtual TInt Get( TInt& aValue) = 0;
       
    44         
       
    45         /**
       
    46 	 	 * Get the current value of the key.
       
    47 	 	 * 
       
    48 	 	 * @since S60 3.2
       
    49 	     * @param aString reference to an 8-bit descriptor of the key
       
    50 	 	 * @return integer value of the error.
       
    51 	 	 */
       
    52         virtual TInt Get( TDes8& aString ) = 0;
       
    53         
       
    54         /**
       
    55 	 	 * Get the current value of the key.
       
    56 	 	 * 
       
    57 	 	 * @since S60 3.2
       
    58 	 	 * @param aString reference to an 16-bit descriptor of the key
       
    59 	 	 * @return integer value of the error.
       
    60 	 	 */
       
    61         virtual TInt Get( TDes16& aString ) = 0;
       
    62         
       
    63         /**
       
    64 	     * Release the observer
       
    65 	     */
       
    66         virtual void Release() = 0;
       
    67         
       
    68     protected:
       
    69         ~MAiPSPropertyObserver() { }
       
    70     };
       
    71 
       
    72 /**
       
    73  * Helper for calling MAiPSPropertyObserver::Release() with NULL checking.
       
    74  */
       
    75 inline void Release(MAiPSPropertyObserver* obj)
       
    76     {
       
    77     if (obj)
       
    78         {
       
    79         obj->Release();
       
    80         }
       
    81     }
       
    82 
       
    83 #endif      // MAIPSPROPERTYOBSERVER_H
       
    84 
       
    85 // End of File
       
    86