chxavfilesystemwatcher.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:2k
- /************************************************************************
- * chxavfilesystemwatcher.h
- * -------------------------
- *
- * Synopsis:
- * Encapsulates active object file system monitoring; watches a directory and
- * its children and executes an event handler when an event under that path
- * occurs
- *
- * Intended to be used by a single class client (multiple client support should
- * be implemented by the event handler)
- *
- * Target:
- * Symbian OS
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- ************************************************************************/
- #ifndef _chxavfilesystemwatcher_h_
- #define _chxavfilesystemwatcher_h_
- // Include from this project...
- #include "chxavactivewatcher.h"
- #include "chxavrefptr.h"
-
- // class CHXAvFileSystemWatcher
- class CHXAvFileSystemWatcher
- : public CHXAvActiveWatcher
- {
- public:
- CHXAvFileSystemWatcher(RFs& fs = CCoeEnv::Static()->FsSession());
- ~CHXAvFileSystemWatcher();
- void ConstructL();
- void SetWatchPathL(const TDesC& path);
- void SetNotifyType(TNotifyType type);
- protected:
- // epActiveWatcher implementation
- void DoIssueRequest(const CHXAvActiveCmplPtr& spActive);
- void DoCancelRequest(const CHXAvActiveCmplPtr& spActive);
- private:
- refptr<HBufC> m_spWatchPath;
- RFs& m_fs;
- TNotifyType m_notifyType;
-
- };
- ////////////////////////////////////////////////////////
- // see f32file.h
- //
- // ENotifyEntry, ENotifyAll, ENotifyFile, ENotifyDir, ENotifyAttributes, ENotifyWrite, ENotifyDisk
- //
- // not sure if we can OR these; ENotifyWrite, ENotifyAttributes may only work if file is given as path
- //
- inline
- void CHXAvFileSystemWatcher::SetNotifyType(TNotifyType type)
- {
- m_notifyType = type;
- }
- #endif // _chxavfilesystemwatcher_h_