corecbi.h 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. #ifndef __WASABI_CORECBI_H
  2. #define __WASABI_CORECBI_H
  3. #include <bfc/wasabi_std.h>
  4. #include <api/syscb/callbacks/corecb.h>
  5. #include <bfc/reentryfilter.h>
  6. // this class does NOT automatically deregister itself when you destruct it
  7. // that is up to you, and obviously, if you fail to do so, you'll crash the
  8. // whole app. and they'll all laugh at you. see class CoreHandle
  9. class NOVTABLE CoreCallbackI : public CoreCallback {
  10. protected:
  11. CoreCallbackI() { } // no instantiating this on its own
  12. public:
  13. virtual int corecb_onStarted() { return 0; }
  14. virtual int corecb_onStopped() { return 0; }
  15. virtual int corecb_onPaused() { return 0; }
  16. virtual int corecb_onUnpaused() { return 0; }
  17. virtual int corecb_onSeeked(int newpos) { return 0; }
  18. virtual int corecb_onVolumeChange(int newvol) { return 0; }
  19. virtual int corecb_onPanChange(int newpan) { return 0; }
  20. virtual int corecb_onEQStatusChange(int newval) { return 0; }
  21. virtual int corecb_onEQPreampChange(int newval) { return 0; }
  22. virtual int corecb_onEQBandChange(int band, int newval) { return 0; }
  23. virtual int corecb_onEQFreqChange(int newval) { return 0; }
  24. virtual int corecb_onEQAutoChange(int newval) { return 0; }
  25. virtual int corecb_onStatusMsg(const wchar_t *text) { return 0; }
  26. virtual int corecb_onWarningMsg(const wchar_t *text) { return 0; }
  27. virtual int corecb_onErrorMsg(const wchar_t *text) { return 0; }
  28. virtual int corecb_onTitleChange(const wchar_t *title) { return 0; }
  29. virtual int corecb_onTitle2Change(const wchar_t *title2) { return 0; }
  30. virtual int corecb_onInfoChange(const wchar_t *info) { return 0; }
  31. virtual int corecb_onBitrateChange(int kbps) { return 0; }
  32. virtual int corecb_onSampleRateChange(int khz) { return 0; }
  33. virtual int corecb_onChannelsChange(int nch) { return 0; }
  34. virtual int corecb_onUrlChange(const wchar_t *url) { return 0; }
  35. virtual int corecb_onLengthChange(int newlength) { return 0; }
  36. virtual int corecb_onNextFile() { return 0; }
  37. virtual int corecb_onNeedNextFile(int fileid) { return 0; }
  38. virtual int corecb_onSetNextFile(const wchar_t *playstring) { return 0; }
  39. virtual int corecb_onErrorOccured(int severity, const wchar_t *text) { return 0; }
  40. // return 1 in this callback to make the current callback chain to abort
  41. virtual int corecb_onAbortCurrentSong() { return 0; }
  42. virtual int corecb_onEndOfDecode() { return 0; }
  43. virtual int corecb_onFileComplete(const wchar_t *playstring) { return 0; }
  44. virtual int corecb_onConvertersChainRebuilt() { return 0; }
  45. virtual int corecb_onMediaFamilyChange(const wchar_t *newfamily) { return 0; }
  46. virtual int ccb_notify(int msg, intptr_t param1=0, intptr_t param2=0);
  47. protected:
  48. RECVS_DISPATCH;
  49. ReentryFilterObject filter;
  50. };
  51. #endif