1
0

main.cpp 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. #include "main.h"
  2. #include "wac_browser_factory.h"
  3. #include "bfc/platform/export.h"
  4. api_service *WASABI_API_SVC = NULL;
  5. api_config *AGAVE_API_CONFIG = NULL;
  6. static wa::Components::WAC_BrowserFactory _wacDownloadFactory;
  7. static wa::Components::WAC_Browser _wac_browser;
  8. void wa::Components::WAC_Browser::RegisterServices( api_service *p_service )
  9. {
  10. WASABI_API_SVC = p_service;
  11. ServiceBuild( AGAVE_API_CONFIG, AgaveConfigGUID );
  12. WASABI_API_SVC->service_register( &_wacDownloadFactory );
  13. }
  14. void wa::Components::WAC_Browser::DeregisterServices( api_service *p_service )
  15. {
  16. p_service->service_deregister( &_wacDownloadFactory );
  17. ServiceRelease( AGAVE_API_CONFIG, AgaveConfigGUID );
  18. }
  19. extern "C" DLLEXPORT ifc_wa5component * GetWinamp5SystemComponent()
  20. {
  21. return &_wac_browser;
  22. }
  23. #ifdef CBCLASS
  24. #undef CBCLASS
  25. #endif
  26. #define CBCLASS wa::Components::WAC_Browser
  27. START_DISPATCH;
  28. VCB( API_WA5COMPONENT_REGISTERSERVICES, RegisterServices )
  29. CB( API_WA5COMPONENT_REGISTERSERVICES_SAFE_MODE, RegisterServicesSafeModeOk )
  30. VCB( API_WA5COMPONENT_DEREEGISTERSERVICES, DeregisterServices )
  31. END_DISPATCH;
  32. #undef CBCLASS