diff options
author | Jean-Francois Mauguit <jfmauguit@mac.com> | 2024-09-24 09:03:25 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-09-24 09:03:25 -0400 |
commit | bab614c421ed7ae329d26bf028c4a3b1d2450f5a (patch) | |
tree | 12f17f78986871dd2cfb0a56e5e93b545c1ae0d0 /Src/playlist/api__playlist.h | |
parent | 4bde6044fddf053f31795b9eaccdd2a5a527d21f (diff) | |
parent | 20d28e80a5c861a9d5f449ea911ab75b4f37ad0d (diff) | |
download | winamp-bab614c421ed7ae329d26bf028c4a3b1d2450f5a.tar.gz |
Merge pull request #5 from WinampDesktop/community
Merge to main
Diffstat (limited to 'Src/playlist/api__playlist.h')
-rw-r--r-- | Src/playlist/api__playlist.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/Src/playlist/api__playlist.h b/Src/playlist/api__playlist.h new file mode 100644 index 00000000..eae25572 --- /dev/null +++ b/Src/playlist/api__playlist.h @@ -0,0 +1,58 @@ +#ifndef NULLSOFT_PLAYLIST_API_H +#define NULLSOFT_PLAYLIST_API_H + +#include <api/service/api_service.h> + +#include <api/application/api_application.h> +#define WASABI_API_APP applicationApi + +#include <api/syscb/api_syscb.h> +#define WASABI_API_SYSCB sysCallbackApi + +#ifndef ML_PLG_EXPORTS +#include "../Agave/Config/api_config.h" +#endif + +#include <api/script/api_maki.h> +#define WASABI_API_MAKI makiApi + +#include "../Winamp/JSAPI2_api_security.h" +extern JSAPI2::api_security *jsapi2_security; +#define AGAVE_API_JSAPI2_SECURITY jsapi2_security + +#include "../Winamp/api_stats.h" +extern api_stats *statsApi; +#define AGAVE_API_STATS statsApi + +#include <api/service/waservicefactory.h> + +template <class api_t> +class QuickService +{ +public: + QuickService( GUID p_serviceGUID ) + { + _sf = WASABI_API_SVC->service_getServiceByGuid( p_serviceGUID ); + if ( _sf ) + _api = (api_t *)_sf->getInterface(); + } + ~QuickService() + { + _sf->releaseInterface( _api ); + _api = 0; + } + bool OK() + { + return _api != 0; + } + api_t *operator ->() + { + return _api; + } + waServiceFactory *_sf = NULL; + api_t *_api = 0; +}; + +#include "../Agave/Language/api_language.h" + +#endif // !NULLSOFT_PLAYLIST_API_H
\ No newline at end of file |