src/hbservers/hbthemeserver/hbthemewatcher_symbian_p.h
changeset 30 80e4d18b72f5
parent 3 11d3954df52a
equal deleted inserted replaced
28:b7da29130b0e 30:80e4d18b72f5
    28 
    28 
    29 #include <QString>
    29 #include <QString>
    30 
    30 
    31 #include "hbthemecommon_p.h"
    31 #include "hbthemecommon_p.h"
    32 
    32 
       
    33 #include <QFileSystemWatcher>
    33 #include <e32property.h>
    34 #include <e32property.h>
    34 #include <e32base.h>
    35 #include <e32base.h>
    35 #include <f32file.h>
    36 #include <f32file.h>
    36 
    37 
    37 class HbThemeServerPrivate;
    38 class HbThemeServerPrivate;
    38 
    39 
    39 //**********************************
    40 //**********************************
    40 //CHbThemeWatcher
    41 //HbThemeWatcher
    41 //**********************************
    42 //**********************************
    42 /**
    43 /**
    43 This class is for watching changes in active theme e.g. ejection of the MMC.
    44 This class is for watching changes in active theme e.g. ejection of the MMC.
    44 */
    45 */
    45 class CHbThemeWatcher : public CActive
    46 
       
    47 class HbThemeWatcher : public QObject
    46 {
    48 {
       
    49     Q_OBJECT
    47 public:
    50 public:
    48     static CHbThemeWatcher* NewL(HbThemeServerPrivate& aObserver);
    51     HbThemeWatcher(HbThemeServerPrivate &observer);
    49     ~CHbThemeWatcher();
    52     ~HbThemeWatcher();
    50     void startWatchingL(const QString &file);
       
    51 
    53 
    52 protected: // From CActive
    54     void startWatching(const QString &file);
    53     void RunL();
    55 
    54     void DoCancel();
    56 private slots:
       
    57     void fileChanged(const QString &file);
    55 
    58 
    56 private:
    59 private:
    57     CHbThemeWatcher(HbThemeServerPrivate& aObserver);
    60     QFileSystemWatcher mWatcher;
    58     void ConstructL();    
    61     QString mFile;
    59 
    62     HbThemeServerPrivate &mObserver;
    60 private: // data
       
    61     RFs iFs;
       
    62     QString iFile;
       
    63     HbThemeServerPrivate& iObserver;
       
    64 };
    63 };
    65 
    64     
    66 //**********************************
    65 //**********************************
    67 //CHbThemeChangeNotificationListener
    66 //CHbThemeChangeNotificationListener
    68 //**********************************
    67 //**********************************
    69 /**
    68 /**
    70 This class represents a listener for Pub/Sub events sent from the clients.
    69 This class represents a listener for Pub/Sub events sent from the clients.