chxavcallback.h
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:1k
- /************************************************************************
- * chxavcallback.h
- * ---------------
- *
- * Synopsis:
- * Encapsulates single or periodic timer callback
- *
- *
- * (c) 1995-2003 RealNetworks, Inc. Patents pending. All rights reserved.
- *
- ************************************************************************/
- #ifndef _chxavcallback_h_
- #define _chxavcallback_h_
- // Include from this project...
- #include "chxavactivecompletiondispatch.h"
- #include "chxavcommand.h"
- class CHXAvCallback
- {
- public:
- enum CallbackType
- {
- ONCE,
- REPEAT
- };
- CHXAvCallback();
- virtual ~CHXAvCallback();
- void ConstructL(const CHXAvCommand& cmd);
- void Set(TUint msTimeout, CallbackType cbType = ONCE);
- void Stop();
- bool IsPending() const;
- private:
- void OnTimerEvent(TInt status);
- void OnTimerEventCancel(TInt status);
- private:
- CHXAvActiveCmplPtr m_pActiveObject;
- RTimer m_timer;
- CHXAvCommand* m_pAction;
- CallbackType m_cbType;
- TUint m_msTimeout;
- };
- //////////////////////////////////////////
- // return true if callback is pending
- inline
- bool CHXAvCallback::IsPending() const
- {
- return 0 != m_pActiveObject->IsActive();
- }
- #endif // _chxavcallback_h_