voiceui/voiceuivoicerecognition/inc/vuicpropertyhandler.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 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:  Active object for subscribing to Publish & Suscribe properties 
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef VUICPROPERTYHANDLER_H
       
    20 #define VUICPROPERTYHANDLER_H
       
    21 
       
    22 // INCLUDES
       
    23 #include <e32base.h>
       
    24 #include <e32property.h>
       
    25 
       
    26 // FORWARDS
       
    27 class CVoiceRecognitionDialogImpl;
       
    28 
       
    29 // CLASS DECLARATION
       
    30 
       
    31 /**
       
    32 * Active object for subscribing to Publish & Suscribe properties
       
    33 */
       
    34 NONSHARABLE_CLASS( CPropertyHandler ) : public CActive
       
    35     {
       
    36     public:  // Constructors and destructor
       
    37         /**
       
    38         * Symbian two-phased constructor.
       
    39         * @param aCategory Category of the property to watch
       
    40         * @param aKey      Key UID of the property to watch
       
    41         * @param aCallback Callback to get notifications about changes
       
    42         */
       
    43         static CPropertyHandler* NewL( TUid aFirstCategory,
       
    44                                        TUint aFirstKey,
       
    45                                        TUid aSecondCategory,
       
    46                                        TUint aSecondkey);
       
    47 
       
    48         // Destructor
       
    49         virtual ~CPropertyHandler();
       
    50 
       
    51     public:  // New functions
       
    52         
       
    53         /**
       
    54         * Method to handle the deregistration of monitoring accessories
       
    55         * @param 
       
    56         */  
       
    57         void Register( CVoiceRecognitionDialogImpl* aRecogObserver );
       
    58 
       
    59         /**
       
    60         * Method to handle the deregistration of monitoring accessories
       
    61         * @param 
       
    62         */  
       
    63         void DeRegister( CVoiceRecognitionDialogImpl* aRecogObserver );
       
    64 
       
    65     private: // Functions from base classes
       
    66 
       
    67         /**
       
    68         * From CActive.
       
    69         * Handle a change event.
       
    70         */
       
    71         void RunL();
       
    72 
       
    73         /**
       
    74         * From CActive.
       
    75         * Cancel the request to receive events.
       
    76         */
       
    77         void DoCancel();
       
    78 
       
    79     private: // New functions
       
    80 
       
    81         /**
       
    82         * Symbian OS 2nd phase constructor.
       
    83         */
       
    84         void ConstructL( TUid aFirstCategory,
       
    85                          TUint aFirstKey,
       
    86                          TUid aSecondCategory,
       
    87                          TUint aSecondKey );
       
    88 
       
    89         /**
       
    90         * C++ constructor.
       
    91         */
       
    92         CPropertyHandler();
       
    93 
       
    94     private:    // Data
       
    95 
       
    96         RProperty                       iProperty;
       
    97         TCallBack                       iCallback;
       
    98         TBool                           iRequestIssued;
       
    99         CVoiceRecognitionDialogImpl*    iRecogObserver;
       
   100         TUid                            iFirstCategory;
       
   101         TUint                           iFirstKey;
       
   102     };
       
   103 
       
   104 #endif    // VUICPROPERTYHANDLER_H
       
   105 
       
   106 // End of File