SpTimer.h 1005 B

12345678910111213141516171819202122232425262728
  1. #pragma once
  2. typedef struct SpTimer SpTimer;
  3. typedef struct SpTimerList SpTimerList;
  4. struct IReleasable;
  5. class SpEntity;
  6. SpTimer *SpTimerCreate(SpTimerList *pList, DWORD dwTimerID, DWORD dwInterval, ITimerListener *pListener);
  7. void SpTimerDestroy(SpTimer *pTimer);
  8. void SpTimerSetUserData(SpTimer *pTimer, IReleasable *pUserData);
  9. void SpTimerGetUserData(SpTimer *pTimer, CSmartPointer<IReleasable> &pUserData);
  10. ErrorCodeEnum SpTimerStart(SpTimer *pTimer);
  11. void SpTimerStop(SpTimer *pTimer);
  12. void SpTimerSetInterval(SpTimer *pTimer, DWORD dwInterval);
  13. DWORD SpTimerGetInterval(SpTimer *pTimer);
  14. SpTimerList *SpTimerListCreate(SpEntity *pEntity);
  15. void SpTimerListDestroy(SpTimerList *);
  16. SpTimer *SpTimerListFind(SpTimerList *pList, DWORD dwTimerID);
  17. void SpTimerListAdd(SpTimerList *pList, SpTimer *pTimer);
  18. void SpTimerListRemove(SpTimerList *pList, SpTimer *pTimer);
  19. void SpTimerListLock(SpTimerList *pList);
  20. void SpTimerListUnlock(SpTimerList *pList);
  21. void SpTimerListStopAll(SpTimerList *pList);