chxavactivewatcher.h
来自「symbian 下的helix player源代码」· C头文件 代码 · 共 92 行
H
92 行
/************************************************************************
* chxavactivewatcher.h
* --------------------
*
* Synopsis:
*
* base class for classes that request active object
* event notification from system services
*
*
*
* (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
*
************************************************************************/
#ifndef _chxavactivewatcher_h_
#define _chxavactivewatcher_h_
// Include from this project...
#include "chxavcommand.h"
#include "chxavactivecompletiondispatch.h"
#include "chxavcallback.h"
// class CHXAvActiveWatcher
class CHXAvActiveWatcher
{
protected:
// ctor and dtor
CHXAvActiveWatcher();
virtual ~CHXAvActiveWatcher();
void BaseConstructL(TInt activePriority = CActive::EPriorityStandard);
private:
// disallow assignment and copy
CHXAvActiveWatcher(const CHXAvActiveWatcher& rhs);
CHXAvActiveWatcher& operator=(const CHXAvActiveWatcher& rhs);
public:
// methods
void SetEventActionL(const CHXAvCommand& cmd);
void SetNotificationDelay(TUint msDelay);
void WatchForNextEvent();
void StartWatching();
void StopWatching();
bool IsWatching() const;
protected:
// implementation
virtual void OnEvent(TInt status);
virtual void OnCancelWatch(TInt status);
virtual void ForwardEvent();
virtual void DoIssueRequest(const CHXAvActiveCmplPtr& spActive) = 0;
virtual void DoCancelRequest(const CHXAvActiveCmplPtr& spActive) = 0;
private:
// data
CHXAvActiveCmplPtr m_spWatchObject;
bool m_bKeepWatching;
CHXAvCommandPtr m_spEventHandler;
CHXAvCallback m_cbFowardEvent;
TUint m_msForwardEventDelay;
};
////////////////////////////////////////////
// set the handler action to execute upon filesystem event
inline
void CHXAvActiveWatcher::SetEventActionL(const CHXAvCommand& cmd)
{
m_spEventHandler = cmd.CloneL();
}
////////////////////////////////////////////
//
inline
bool CHXAvActiveWatcher::IsWatching() const
{
return m_spWatchObject->IsActive() || m_cbFowardEvent.IsPending();
}
////////////////////////////////////////////
//
inline
void CHXAvActiveWatcher::SetNotificationDelay(TUint msDelay)
{
m_msForwardEventDelay = msDelay;
}
#endif // _chxavactivewatcher_h_
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?