smartinstaller/common/globalqueryobserver.h
branchADM
changeset 48 364021cecc90
equal deleted inserted replaced
47:3f419852be07 48:364021cecc90
       
     1 /*
       
     2 * Copyright (c) 2009-2010 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:
       
    15 *     Declares CGlobalQueryObserver class for application.
       
    16 *
       
    17 *
       
    18 */
       
    19 
       
    20 #ifndef __GLOBALQUERYOBSERVER_H__
       
    21 #define __GLOBALQUERYOBSERVER_H__
       
    22 
       
    23 // INCLUDES
       
    24 #include <e32std.h>
       
    25 #include <e32base.h>
       
    26 
       
    27 /**
       
    28 * CGlobalQueryObserver class
       
    29 */
       
    30 class CGlobalQueryObserver :
       
    31 	public CActive
       
    32 	{
       
    33 public:  // Constructors and destructor
       
    34 	class MGlobalQueryClient
       
    35 		{
       
    36 	public:
       
    37 		virtual void HandleGlobalQueryResponseL(TInt aStatus) = 0;
       
    38 		};
       
    39 	/**
       
    40 	* NewL
       
    41 	* Two-phased constructor.
       
    42 	*/
       
    43 	static CGlobalQueryObserver* NewL(MGlobalQueryClient* aClient, const TBool aIgnoreResponse);
       
    44 
       
    45 	/**
       
    46 	* ~CGlobalQueryObserver
       
    47 	* Destructor.
       
    48 	*/
       
    49 	virtual ~CGlobalQueryObserver();
       
    50 
       
    51 public:     // New function
       
    52 	/**
       
    53 	* Start
       
    54 	* Start the activator.
       
    55 	*/
       
    56 	void Start();
       
    57 
       
    58 private:    // New function
       
    59 	/**
       
    60 	* CGlobalQueryObserver
       
    61 	* C++ default constructor.
       
    62 	*/
       
    63 	CGlobalQueryObserver(MGlobalQueryClient* aClient, const TBool aIgnoreResponse);
       
    64 
       
    65 	/**
       
    66 	* ConstructL
       
    67 	* Symbian default constructor.
       
    68 	*/
       
    69 	void ConstructL();
       
    70 
       
    71 private:    // From CActive
       
    72 	/**
       
    73 	* RunL
       
    74 	* From CActive, handle an event.
       
    75 	*/
       
    76 	void RunL();
       
    77 
       
    78 	/**
       
    79 	* DoCancel
       
    80 	* From CActive, implement the Cancel protocol.
       
    81 	*/
       
    82 	void DoCancel();
       
    83 
       
    84 private: // Data
       
    85 	/**
       
    86 	 * Callback
       
    87 	 */
       
    88 	MGlobalQueryClient* iClient;
       
    89 
       
    90 	/**
       
    91 	 * Set to true to ignore query response.
       
    92 	 */
       
    93 	const TBool iIgnoreResponse;
       
    94 };
       
    95 
       
    96 #endif // __GLOBALQUERYOBSERVER_H__