sapi_sysinfo/inc/sysinfoobserver.h
changeset 0 14df0fbfcc4e
equal deleted inserted replaced
-1:000000000000 0:14df0fbfcc4e
       
     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 the License "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:  CSysInfoObserver class for handling async requests
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __SYSINFOOBSERVER_H__
       
    20 #define __SYSINFOOBSERVER_H__
       
    21 
       
    22 #include <e32base.h>
       
    23 #include "sysinfoservice.h"
       
    24 #include "sysrequest.h"
       
    25 
       
    26 //FORWARD DECLARATION
       
    27 class CLiwGenericParamList;
       
    28 class CSysInfoInterface;
       
    29 
       
    30 /**
       
    31 * CSysInfoObserver
       
    32 * This class acts as an observer for all asynchronous requests. After the request
       
    33 * is completed, it checks for error and packs it in output param list. If there
       
    34 * is no error, then the iterator is also packed into the output param list.
       
    35 */
       
    36 // CLASS DECLARATION
       
    37 NONSHARABLE_CLASS(CSysInfoObserver): public CBase, public ISystemObserver
       
    38     {
       
    39     public: // New methods
       
    40 
       
    41     /**
       
    42     * NewL.
       
    43     * Two-phased constructor.
       
    44     * Create a CSysInfoObserver object.
       
    45     * @param aLmIface The CSysInfoInterface instance.
       
    46     * @return A pointer to the newly created instance of CSysInfoObserver.
       
    47     */
       
    48     static CSysInfoObserver* NewL( CSysInfoInterface* aSysInfoIf );
       
    49 
       
    50     /**
       
    51     * ~CSysInfoObserver
       
    52     * Destructor.
       
    53     */
       
    54     ~CSysInfoObserver() {}
       
    55 
       
    56     public:// from ISystemObserver
       
    57 
       
    58     /**
       
    59     * HandleResponseL ()
       
    60     * Delegates asycn response to client by calling 
       
    61     * MLiwNotifyCallback::HandleNotifyL().
       
    62     */		
       
    63     void HandleResponseL(const TDesC& aEntity,const TDesC& aKey, 
       
    64                             CSysData* aOutput, TInt32 aTransID, 
       
    65                             TSysRequest::TRequestType aType, TInt aError);
       
    66 
       
    67     private: // Constructors
       
    68 
       
    69     /**
       
    70     * CSysInfoObserver.
       
    71     * C++ default constructor.
       
    72     * @param aSysInfoIf The CSysInfoInterface instance.
       
    73     */
       
    74     CSysInfoObserver( CSysInfoInterface* aSysInfoIf );
       
    75 
       
    76     private: //Data        
       
    77 
       
    78     /**
       
    79     * iSysInfoIf
       
    80     * Handle to CSysInfoInterface instance.
       
    81     */
       
    82     CSysInfoInterface* iSysInfoIf;
       
    83     };
       
    84 
       
    85 #endif // __SYSINFOOBSERVER_H__
       
    86 
       
    87 // End of File