serviceproviders/sapi_mediamanagement/mediamanagementservice/inc/mgclfoperationobserver.h
changeset 5 989d2f495d90
child 10 fc9cf246af83
equal deleted inserted replaced
1:a36b1e19a461 5:989d2f495d90
       
     1 /*
       
     2 * Copyright (c) 2007-2007 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:  This Class is observer for the CLF framework
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef __MGCLFOPERATIONOBSERVER_H
       
    20 #define __MGCLFOPERATIONOBSERVER_H
       
    21 
       
    22 
       
    23 #include <mclfoperationobserver.h>
       
    24 #include <e32base.h>
       
    25 
       
    26 class MCLFItemListModel;
       
    27 class MMgOperationObserver;
       
    28 class CMgService;
       
    29 
       
    30 
       
    31 // CLASS DECLARATION
       
    32 
       
    33 /**
       
    34 *  CClfOperationObserver class is for observing operation events of CLF
       
    35 *  Client application gets notified when asynchronous operations
       
    36 *  are completed.
       
    37 *
       
    38 *  @since  Series60 v3.2
       
    39 */
       
    40 NONSHARABLE_CLASS( CClfOperationObserver ) : public CBase, public MCLFOperationObserver
       
    41     {
       
    42     public:
       
    43 
       
    44 		/**
       
    45  		* Two-phased constructor
       
    46         * @since  Series60 v3.2
       
    47         * @param  void
       
    48         * @return CClfOperationObserver*  Returns the instance of
       
    49         *								  CClfOperationObserver.
       
    50         */
       
    51  
       
    52   		static CClfOperationObserver* NewL();
       
    53 
       
    54         /**
       
    55         * method to get CLF Framework events. This method is
       
    56         * called when an event is received.
       
    57         * @param aOperationEvent Operation event code of the event
       
    58         * @param aError System wide error code if the operation did not
       
    59         *        succeed.
       
    60         */
       
    61         virtual void HandleOperationEventL( TCLFOperationEvent aOperationEvent,
       
    62                                             TInt aError );
       
    63 
       
    64       	/**
       
    65         * Destructor.
       
    66         */
       
    67         virtual ~CClfOperationObserver();
       
    68 
       
    69        	/**
       
    70         * constructor
       
    71         * @since  Series60 v3.2
       
    72         * @param void
       
    73         * @return void
       
    74         */
       
    75         CClfOperationObserver();
       
    76 
       
    77 
       
    78         /**
       
    79         * method to set callback of service class(i.e ServiceObserver)
       
    80         * @since  Series60 v3.2
       
    81         * @param  aServiceObserver observer of the service class
       
    82         * @param  aListModel Iterator of clf which contains the required result
       
    83         * @param  aMGService Instance of service class
       
    84         */
       
    85         void SetMemberVar(TUint  aTransactionID,
       
    86                           MMgOperationObserver* aServiceObserver,
       
    87         				  MCLFItemListModel* aListModel,
       
    88         				  CMgService* aMGService);
       
    89 
       
    90         /**
       
    91         * Cancel the pending asynchronous request
       
    92         * @since  Series60 v3.2
       
    93         * @param  void
       
    94         * @return void
       
    95         */
       
    96         void CancelL();
       
    97 
       
    98 
       
    99 
       
   100 
       
   101    	private:
       
   102 
       
   103         /**
       
   104      	* Store the instance of the callback of service class
       
   105      	*/
       
   106   		MMgOperationObserver* iServiceObserver;
       
   107 
       
   108   		/**
       
   109      	* stores the instance of list model of CLF Framework.
       
   110      	*/
       
   111     	MCLFItemListModel* iListModel;
       
   112 
       
   113     	/**
       
   114      	* stores the instance of service class
       
   115      	*/
       
   116     	CMgService* iMGService;
       
   117     	/**
       
   118      	* stores the TransactionID
       
   119      	*/
       
   120     	TUint  iTransactionID;
       
   121 	};
       
   122 
       
   123 #endif __MGCLFOPERATIONOBSERVER_H