contentpublishingsrv/contentharvester/contentharvesterswiplugin/inc/chswiplugin.h
changeset 3 ff572005ac23
parent 0 79c6a41cd166
child 8 d0529222e3f0
equal deleted inserted replaced
2:b7904b40483f 3:ff572005ac23
    19 #define C_CCHSWIPLUGIN_H
    19 #define C_CCHSWIPLUGIN_H
    20 
    20 
    21 #include <contentharvesterplugin.h>
    21 #include <contentharvesterplugin.h>
    22 #include <apgnotif.h>
    22 #include <apgnotif.h>
    23 
    23 
       
    24 #include "chswimassmodeobserver.h"
       
    25 
    24 class MLiwInterface;
    26 class MLiwInterface;
    25 class CLiwGenericParamList;
    27 class CLiwGenericParamList;
       
    28 
       
    29 class CCHSwiUsbHandler;
       
    30 class CCHSwiUsbObserver;
    26 
    31 
    27 /**
    32 /**
    28  *  Active Data plugin for SIS installation events.
    33  *  Active Data plugin for SIS installation events.
    29  *
    34  *
    30  *  @since S60 S60 v3.1
    35  *  @since S60 S60 v3.1
    31  */
    36  */
    32 class CCHSwiPlugin: public CContentHarvesterPlugin,
    37 class CCHSwiPlugin: public CContentHarvesterPlugin,
    33         MApaAppListServObserver
    38         MApaAppListServObserver, MCHSwiMassModeObserver
    34 	{
    39 	{
    35 	
    40 	
    36 public:
    41 public:
    37 	/**
    42 	/**
    38 	 * Two-phased constructor.
    43 	 * Two-phased constructor.
    51 	 * or when the MMC is removed/inserted.
    56 	 * or when the MMC is removed/inserted.
    52 	 */
    57 	 */
    53 	void UpdateL();
    58 	void UpdateL();
    54 	
    59 	
    55 private:
    60 private:
       
    61 	
       
    62 	// from MCHSwiMassModeObserver
       
    63 	void SetMassStorageMode( TBool aMode );
       
    64 	TBool IsMassStorageMode();
       
    65 	void HandleMassStorageModeEndEvent();
       
    66 	void HandleSuccessfulAsynchDriveScan();
       
    67 	
    56     // from MApaAppListServObserver
    68     // from MApaAppListServObserver
    57 
    69 
    58     void HandleAppListEvent( TInt aEvent );    
    70     void HandleAppListEvent( TInt aEvent );    
    59     /**
    71     /**
    60 	 * Performs the second phase construction of a CADatSwi object.
    72 	 * Performs the second phase construction of a CADatSwi object.
    65 	 * Default Constructor.
    77 	 * Default Constructor.
    66 	 * @param aActiveSpace An instance of the Active Space Client.
    78 	 * @param aActiveSpace An instance of the Active Space Client.
    67 	 */
    79 	 */
    68 	CCHSwiPlugin( MLiwInterface* aInterface );
    80 	CCHSwiPlugin( MLiwInterface* aInterface );
    69 	
    81 	
    70 	
    82     /**
    71    /**
    83      * Removes publishers from database when an applicaion 
    72      * This function removes publishers from database when
    84      * is uninstalled or when the MMC is removed.
    73      * an applicaion is uninstalled or when the MMC is removed.
       
    74      */
    85      */
    75 	void UpdateWidgetsL();
    86 	void UpdateWidgetsL();
    76 	
    87 	
    77 	
    88 	/**
       
    89 	 * Removes widgets.
       
    90 	 * @param aWidgets Widgets list.
       
    91 	 */
    78 	void RemoveWidgetsL( CLiwGenericParamList* aWidgets );
    92 	void RemoveWidgetsL( CLiwGenericParamList* aWidgets );
    79 	
    93 	
       
    94 	/** 
       
    95 	 * Removes single widget.
       
    96 	 * @param aType Widget type.
       
    97 	 * @param aContentId Widget UID.
       
    98 	 */
    80 	void RemoveWidgetL( const TDesC& aType, 
    99 	void RemoveWidgetL( const TDesC& aType, 
    81         const TDesC& aContentId );
   100         const TDesC& aContentId );
    82 	
   101 	
    83 
   102 
    84 private:
   103 private:
    85     
   104     
    86     /**
   105     /**
    87      * An interface to Content Publisher Service
   106      * An interface to Content Publisher Service
    88      */
   107      */
    89     MLiwInterface* iCPSInterface;
   108     MLiwInterface* iCPSInterface;
    90 
   109    
    91     
       
    92     /**
   110     /**
    93      * AppArc session.
   111      * AppArc session.
    94      * Own.
   112      * Own.
    95      */     
   113      */     
    96     RApaLsSession iApaLsSession;
   114     RApaLsSession iApaLsSession;
    97     
   115     
    98     CApaAppListNotifier* iNotifier; ///< Change notifier. Own.
   116     /**
       
   117      * File session.
       
   118      */
       
   119     RFs iFs;
       
   120     
       
   121     /**
       
   122      * Change notifier.
       
   123      * Own.
       
   124      */
       
   125     CApaAppListNotifier* iNotifier; 
       
   126     
       
   127     /**
       
   128      * Mass storage mode handler. 
       
   129      * Own.
       
   130      */
       
   131     CCHSwiUsbHandler* iUsbHandler;
       
   132     
       
   133     /**
       
   134      * Disk observer for monitoring status of mass drive. 
       
   135      * Own.
       
   136      */
       
   137     CCHSwiUsbObserver* iUsbObserver;
       
   138     
       
   139     /**
       
   140      * Mass storage mode flag.
       
   141      */
       
   142     TBool iMassStorageMode;
       
   143 	};
    99 
   144 
   100     };
   145 
   101 
   146 
   102 #endif // C_CCHSWIPLUGIN_H
   147 #endif // C_CCHSWIPLUGIN_H
   103