musichomescreen/musiccontentpublisher/inc/mcpharvesterpublisherobserver.h
changeset 0 ff3acec5bc43
equal deleted inserted replaced
-1:000000000000 0:ff3acec5bc43
       
     1 /*
       
     2 * Copyright (c) 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 "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:  Updates applications and icons in Operator Tile.
       
    15 *
       
    16 */
       
    17 
       
    18 
       
    19 #ifndef C_MCPHARVESTERPUBLISHEROBSERVER_H
       
    20 #define C_MCPHARVESTERPUBLISHEROBSERVER_H 
       
    21 
       
    22 #include <e32base.h>
       
    23 #include <LiwCommon.h>
       
    24 
       
    25 // FORWARD DECLARATIONS
       
    26 class CMusicContentPublisher;
       
    27 class CLiwServiceHandler;
       
    28 // CONSTANTS
       
    29 
       
    30 // CLASS DECLARATION
       
    31 /**
       
    32  */
       
    33 
       
    34 class CMCPHarvesterPublisherObserver : public CBase, public MLiwNotifyCallback
       
    35 	{
       
    36 	public: // Constructors and destructor
       
    37 		/**
       
    38 		 * Two-phased constructor.
       
    39 		 */
       
    40 		static CMCPHarvesterPublisherObserver* NewL( CMusicContentPublisher* aHarvester );
       
    41 
       
    42 		/**
       
    43 		 * Two-phased constructor.
       
    44 		 */
       
    45 		static CMCPHarvesterPublisherObserver* NewLC( CMusicContentPublisher* aHarvester );
       
    46 		
       
    47 		/**
       
    48 		 * Destructor.
       
    49 		 */
       
    50 		virtual ~CMCPHarvesterPublisherObserver();
       
    51 
       
    52 
       
    53 
       
    54 	public:  //from MLiwNotifyCallback
       
    55 	    
       
    56 	    /**
       
    57 	    * Handles notifications caused by an asynchronous Execute*CmdL call
       
    58 	    * or an event.
       
    59 	    *
       
    60 	    * @param aCmdId The service command associated to the event.
       
    61 	    * @param aEventId Occured event, see LiwCommon.hrh.
       
    62 	    * @param aEventParamList Event parameters, if any, as defined per
       
    63 	    *        each event.
       
    64 	    * @param aInParamList Input parameters, if any, given in the
       
    65 	    *        related HandleCommmandL.
       
    66 	    * @return Error code for the callback.
       
    67 	    */
       
    68 	    virtual TInt HandleNotifyL(
       
    69 	        TInt aCmdId,
       
    70 	        TInt aEventId,
       
    71 	        CLiwGenericParamList& aEventParamList,
       
    72 	        const CLiwGenericParamList& aInParamList);
       
    73 	
       
    74 	public:
       
    75 	    
       
    76 	    /**
       
    77 	    * Registers to CPS for add, delete , update and execute notifications
       
    78 	    * @aFilter - filter for input parameter list
       
    79 	    * @return void.
       
    80 	    */
       
    81 	    void RegisterL( CLiwDefaultMap* aFilter );
       
    82 	    
       
    83 	    
       
    84 	private:
       
    85 	    /**
       
    86         * Perform the second phase construction 
       
    87         */      
       
    88         void ConstructL();
       
    89         
       
    90         /**
       
    91 		* Default constructor.
       
    92 		*/
       
    93 		CMCPHarvesterPublisherObserver( CMusicContentPublisher* aHarvester );
       
    94 		
       
    95 		// Prhohibited
       
    96 		CMCPHarvesterPublisherObserver();
       
    97 
       
    98 	    /**
       
    99 	    * Cancel all the registered notifications. 
       
   100 	    * @return void.
       
   101 	    */
       
   102 	    void ReleaseL();
       
   103 	    
       
   104 	    void InitLiwL();
       
   105 	    
       
   106 	    void ReleaseLiw();
       
   107 		
       
   108 	private: // data
       
   109 	        
       
   110 	    // Reference of 
       
   111 	    // Owned
       
   112 	    MLiwInterface* iInterface;
       
   113 	    
       
   114 	    // Reference of 
       
   115 	    // Owned
       
   116 	    CLiwServiceHandler* iLiwHandler;	            
       
   117 	            
       
   118 	    // Reference of the sapi data
       
   119 	    // Not owned
       
   120 	    CMusicContentPublisher* iHarvester;
       
   121 	    
       
   122 	    // Call back error code
       
   123 	    TInt iError;
       
   124     };
       
   125 
       
   126 #endif // C_MCPHARVESTERPUBLISHEROBSERVER_H