1
0

svc_device.h 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef _SVC_DEVICE_H
  2. #define _SVC_DEVICE_H
  3. #include <bfc/dispatch.h>
  4. // not done at all :) BU
  5. class NOVTABLE svc_device : public Dispatchable {
  6. public:
  7. const char *getDeviceName();
  8. const char *getDeviceUID(); // some kind of unique per-device id if possible
  9. // return total storage space and
  10. int getDeviceSpace(unsigned int *space, unsigned int *spacefree);
  11. // return (estimated) # of seconds stored/available
  12. int getDeviceTime(unsigned int *time, unsigned int *timefree);
  13. // high-level stuff
  14. // give us a filename we should use if we transfer object to you
  15. // this name will be used as the media conversion pipeline's output
  16. // filename so your transfer filter will kick in... of course something
  17. // like d:\music\blah.mp3 is fine too
  18. int getTargetFilename(const char *playstring, char *fn, int buflen);
  19. // file/directory enumeration
  20. // int opendir(const char *path);
  21. // int readdir(const char *path);
  22. #if 0
  23. // return a handle like C-style open
  24. int openFile(const char *filename, const char *mode);
  25. void closeFile(int handle);
  26. int writeToFile(int handle, const void *data, int length);
  27. int seek(int handle, int
  28. int putFile(const char *filename, const void *data, unsigned int length);
  29. int readFile(const char *filename, void *buffer, unsigned int offset, unsigned int length)=0;
  30. int getFileAttrib(const char *filename, const char *name, char *buf, int len);
  31. int setFileAttrib(const char *filename, const char *name, const char *buf, int len);
  32. #endif
  33. // playlist manipulation
  34. int playlistCreate(const char *playlist_name);
  35. int playlistDelete(const char *playlist_name);
  36. int playlistGetNumItems(const char *playlist_name);
  37. int playlistEnumItem(const char *playlist_name, char *playstring, int len);
  38. int playlistAppendItem(const char *playlist_name, const char *playstring);
  39. int playlistRemoveItem(const char *playlist_name, int position);
  40. };
  41. #endif