Playlist.h
上传用户:hxb_1234
上传日期:2010-03-30
资源大小:8328k
文件大小:1k
源码类别:

VC书籍

开发平台:

Visual C++

  1. /**************************************************************************************
  2.  *                                                                                    *
  3.  *                                                                                    *
  4.  **************************************************************************************/
  5. #ifndef PLAYLIST_H
  6. #define PLAYLIST_H
  7. #include <windows.h>
  8. typedef struct playlist_item_s {
  9. char *filename;
  10. } playlist_item_t;
  11. typedef struct playlist_node_s {
  12. struct playlist_node_s *next;
  13. playlist_item_t         item;
  14. } playlist_node_t;
  15. class Playlist {
  16. private:
  17. DWORD            itemCount;
  18. DWORD            current;
  19. playlist_node_t *playlist;
  20. public:
  21. Playlist();
  22. ~Playlist();
  23. void             Reset();
  24. void             AddItem(char *filename);
  25. void             RemoveItemAt(DWORD i);
  26. void             NextItem();
  27. void             PreviousItem();
  28. DWORD            GetItemCount();
  29. playlist_item_t *GetItemAt(DWORD i);
  30. DWORD            GetCurrentPosition();
  31. playlist_item_t *GetCurrentItem();
  32. void             SetCurrentPosition(DWORD pos);
  33. };
  34. #endif