Main.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. #ifndef NULLSOFT_MAINH
  2. #define NULLSOFT_MAINH
  3. #include "Wire.h"
  4. #include "Downloaded.h"
  5. #define PLUGIN_VERSION_MAJOR 1
  6. #define PLUGIN_VERSION_MINOR 80
  7. #define SERVICE_PODCAST 720
  8. #define SERVICE_SUBSCRIPTION 721
  9. #define SERVICE_DOWNLOADS 722
  10. #define BAD_CHANNEL ((size_t)-1)
  11. #define BAD_ITEM ((size_t)-1)
  12. void SaveChannels(ChannelList &channels);
  13. void SaveAll(bool rss_only=false);
  14. void HookTerminate();
  15. void DestroyLoader(HWND);
  16. void BuildLoader(HWND);
  17. extern int winampVersion;
  18. void addToLibrary(const DownloadedFile& d); // call in winamp main thread only
  19. void addToLibrary_thread(const DownloadedFile& d); // call from any thread
  20. bool AddPodcastData(const DownloadedFile &data);
  21. bool IsPodcastDownloaded(const wchar_t *url);
  22. void CloseDatabase();
  23. #include "resource.h"
  24. #include "../nu/DialogSkinner.h"
  25. #include "../nu/MediaLibraryInterface.h"
  26. #include "../nu/AutoChar.h"
  27. #include "../nu/AutoWide.h"
  28. #include "../nu/AutoLock.h"
  29. #include "..\..\General\gen_ml/menu.h"
  30. #include <windows.h>
  31. #include <shlwapi.h>
  32. extern ATOM VIEWPROP;
  33. extern winampMediaLibraryPlugin plugin;
  34. #include "../Components/wac_downloadManager/wac_downloadManager_api.h"
  35. #define ML_ENQDEF_VAL() (!!GetPrivateProfileInt(L"gen_ml_config", L"enqueuedef", 0, ml_cfg))
  36. #define ML_GROUPBTN_VAL() (!!GetPrivateProfileInt(L"gen_ml_config", L"groupbtn", 1, ml_cfg))
  37. extern wchar_t* ml_cfg;
  38. wchar_t *urlencode(wchar_t *p);
  39. extern HWND current_window;
  40. extern int groupBtn, enqueuedef, customAllowed;
  41. extern viewButtons view;
  42. void SwapPlayEnqueueInMenu(HMENU listMenu);
  43. void SyncMenuWithAccelerators(HWND hwndDlg, HMENU menu);
  44. void Downloads_UpdateButtonText(HWND hwndDlg, int _enqueuedef);
  45. void listbuild(wchar_t **buf, int &buf_size, int &buf_pos, const wchar_t *tbuf);
  46. enum
  47. {
  48. BPM_ECHO_WM_COMMAND=0x1, // send WM_COMMAND and return value
  49. BPM_WM_COMMAND = 0x2, // just send WM_COMMAND
  50. };
  51. BOOL Downloads_ButtonPopupMenu(HWND hwndDlg, int buttonId, HMENU menu, int flags=0);
  52. void UpdateMenuItems(HWND hwndDlg, HMENU menu);
  53. #endif