1
0

SPlaylistsEnumerator.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #pragma once
  2. #include <api/script/objcontroller.h>
  3. #include <api/script/objects/rootobj.h>
  4. #include "Playlists.h"
  5. #include <vector>
  6. class PlaylistsEnumeratorScriptController : public ScriptObjectControllerI
  7. {
  8. public:
  9. const wchar_t *getClassName();
  10. const wchar_t *getAncestorClassName();
  11. ScriptObjectController *getAncestorController();
  12. int getNumFunctions();
  13. const function_descriptor_struct *getExportedFunctions();
  14. GUID getClassGuid();
  15. ScriptObject *instantiate();
  16. void destroy(ScriptObject *o);
  17. void *encapsulate(ScriptObject *o);
  18. void deencapsulate(void *o);
  19. private:
  20. static function_descriptor_struct exportedFunction[];
  21. };
  22. class SPlaylistsEnumerator : public RootObjectInstance
  23. {
  24. public:
  25. SPlaylistsEnumerator();
  26. ~SPlaylistsEnumerator();
  27. void Reserve(size_t count);
  28. void AppendPlaylist(const PlaylistInfo &newPlaylist);
  29. static scriptVar script_vcpu_GetCount(SCRIPT_FUNCTION_PARAMS, ScriptObject *o);
  30. static scriptVar script_vcpu_GetFilename(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber);
  31. static scriptVar script_vcpu_GetTitle(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber);
  32. static scriptVar script_vcpu_GetLength(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber);
  33. static scriptVar script_vcpu_GetNumItems(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber);
  34. static scriptVar script_vcpu_GetGUID(SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber);
  35. private:
  36. std::vector<PlaylistInfo*> info;
  37. };