1
0

SPlaylist.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include "api/script/objcontroller.h"
  3. #include "api/script/objects/rootobj.h"
  4. #include "Playlist.h"
  5. class PlaylistScriptController : public ScriptObjectControllerI
  6. {
  7. public:
  8. virtual const wchar_t *getClassName();
  9. virtual const wchar_t *getAncestorClassName();
  10. virtual ScriptObjectController *getAncestorController();
  11. virtual int getNumFunctions();
  12. virtual const function_descriptor_struct *getExportedFunctions();
  13. virtual GUID getClassGuid();
  14. virtual ScriptObject *instantiate();
  15. virtual void destroy( ScriptObject *o );
  16. virtual void *encapsulate( ScriptObject *o );
  17. virtual void deencapsulate( void *o );
  18. private:
  19. static function_descriptor_struct exportedFunction[];
  20. };
  21. class SPlaylist : public RootObjectInstance
  22. {
  23. public:
  24. SPlaylist();
  25. /* ifc_playlist wrapper */
  26. static scriptVar script_vcpu_Clear( SCRIPT_FUNCTION_PARAMS, ScriptObject *o );
  27. static scriptVar script_vcpu_GetNumItems( SCRIPT_FUNCTION_PARAMS, ScriptObject *o );
  28. static scriptVar script_vcpu_GetItem( SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber );
  29. static scriptVar script_vcpu_GetItemTitle( SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber );
  30. static scriptVar script_vcpu_GetItemLength( SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber );
  31. static scriptVar script_vcpu_GetItemExtendedInfo( SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemNumber, scriptVar metadata );
  32. static scriptVar script_vcpu_Reverse( SCRIPT_FUNCTION_PARAMS, ScriptObject *o );
  33. static scriptVar script_vcpu_Swap( SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar position1, scriptVar position2 );
  34. static scriptVar script_vcpu_Randomize( SCRIPT_FUNCTION_PARAMS, ScriptObject *o );
  35. static scriptVar script_vcpu_Remove( SCRIPT_FUNCTION_PARAMS, ScriptObject *o, scriptVar itemIndex );
  36. static scriptVar script_vcpu_SortByTitle( SCRIPT_FUNCTION_PARAMS, ScriptObject *o );
  37. static scriptVar script_vcpu_SortByFilename( SCRIPT_FUNCTION_PARAMS, ScriptObject *o );
  38. /* extra functions */
  39. //private:
  40. Playlist playlist;
  41. };
  42. // {632883FC-159F-4330-B193-CFD62CA47EC1}
  43. static const GUID makiPlaylistGUID =
  44. { 0x632883fc, 0x159f, 0x4330, { 0xb1, 0x93, 0xcf, 0xd6, 0x2c, 0xa4, 0x7e, 0xc1 } };