1
0

loginCommand.h 935 B

123456789101112131415161718192021222324252627282930313233343536
  1. #ifndef NULLSOFT_AUTH_LOGINCOMMAND_HEADER
  2. #define NULLSOFT_AUTH_LOGINCOMMAND_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. #include "./loginResult.h"
  8. class LoginData;
  9. class LoginCredentials;
  10. class __declspec(novtable) LoginCommand
  11. {
  12. protected:
  13. LoginCommand() {}
  14. ~LoginCommand() {}
  15. public:
  16. virtual ULONG AddRef() = 0;
  17. virtual ULONG Release() = 0;
  18. virtual HRESULT GetType(GUID *commandUid) = 0;
  19. virtual HRESULT SetParameter(LPCWSTR pszKey, LPCWSTR pszValue) = 0;
  20. virtual HRESULT IsValid() = 0;
  21. virtual HRESULT IsIdentical(LoginCommand *test) = 0;
  22. virtual HRESULT BeginLogin(LoginData *data, LoginResult::Callback callback, void *user, LoginResult **result) = 0;
  23. virtual HRESULT EndLogin(LoginResult *result, INT *authCode, LoginCredentials **credentials) = 0;
  24. virtual HRESULT RequestAbort(LoginResult *result, BOOL drop) = 0;
  25. };
  26. #endif //NULLSOFT_AUTH_LOGINCOMMAND_HEADER