ConnectActivity.cpp 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. #include "ConnectActivity.h"
  2. #include "resource.h"
  3. #include "api.h"
  4. #include <strsafe.h>
  5. BOOL ConnectActivity::GetActive()
  6. {
  7. return TRUE;
  8. }
  9. BOOL ConnectActivity::GetCancelable()
  10. {
  11. return FALSE;
  12. }
  13. HRESULT ConnectActivity::GetProgress(unsigned int *percentCompleted)
  14. {
  15. return E_NOTIMPL;
  16. }
  17. HRESULT ConnectActivity::GetDisplayName(wchar_t *buffer, size_t bufferMax)
  18. {
  19. if (NULL == buffer)
  20. return E_POINTER;
  21. WASABI_API_LNGSTRINGW_BUF(IDS_ACTIVITY_CONNECT, buffer, bufferMax);
  22. return S_OK;
  23. }
  24. HRESULT ConnectActivity::GetStatus(wchar_t *buffer, size_t bufferMax)
  25. {
  26. if (NULL == buffer)
  27. return E_POINTER;
  28. WASABI_API_LNGSTRINGW_BUF(IDS_ACTIVITY_CONNECT_DESC, buffer, bufferMax);
  29. return S_OK;
  30. }
  31. HRESULT ConnectActivity::Cancel(HWND hostWindow)
  32. {
  33. return E_NOTIMPL;
  34. }
  35. #define CBCLASS ConnectActivity
  36. START_DISPATCH;
  37. CB(API_GETACTIVE, GetActive);
  38. CB(API_GETCANCELABLE, GetCancelable);
  39. CB(API_GETPROGRESS, GetProgress);
  40. CB(API_GETDISPLAYNAME, GetDisplayName);
  41. CB(API_GETSTATUS, GetStatus);
  42. CB(API_CANCEL, Cancel);
  43. END_DISPATCH;
  44. #undef CBCLASS