Playlist.h
Upload User: tuheem
Upload Date: 2007-05-01
Package Size: 21889k
Code Size: 1k
Development Platform:

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