loginProvider.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. #ifndef NULLSOFT_AUTH_LOGINPROVIDER_HEADER
  2. #define NULLSOFT_AUTH_LOGINPROVIDER_HEADER
  3. #if defined(_MSC_VER) && (_MSC_VER >= 1020)
  4. #pragma once
  5. #endif
  6. #include <wtypes.h>
  7. class LoginTemplate;
  8. class LoginCommand;
  9. class LoginProvider
  10. {
  11. protected:
  12. LoginProvider(const GUID *providerUid);
  13. virtual ~LoginProvider();
  14. public:
  15. static HRESULT CreateInstance(const GUID *providerUid, LoginProvider **instance);
  16. public:
  17. ULONG AddRef();
  18. ULONG Release();
  19. HRESULT IsIdentical(LoginProvider *test);
  20. HRESULT IsValid();
  21. // get
  22. HRESULT GetId(GUID *pId);
  23. HRESULT GetName(LPWSTR pszBuffer, UINT cchBufferMax);
  24. HRESULT GetDescription(LPWSTR pszBuffer, UINT cchBufferMax);
  25. HRESULT GetImagePath(LPWSTR pszBuffer, UINT cchBufferMax);
  26. HRESULT GetTosLink(LPWSTR pszBuffer, UINT cchBufferMax);
  27. HRESULT GetPrivacyLink(LPWSTR pszBuffer, UINT cchBufferMax);
  28. HRESULT GetHelpLink(LPWSTR pszBuffer, UINT cchBufferMax);
  29. HRESULT GetTemplate(LoginTemplate **ppTemplate);
  30. HRESULT GetCommand(LoginCommand **ppCommand);
  31. // set
  32. HRESULT SetName(LPCWSTR pszName);
  33. HRESULT SetDescription(LPCWSTR pszDescription);
  34. HRESULT SetImagePath(LPCWSTR pszImagePath);
  35. HRESULT SetTosLink(LPCWSTR pszUrl);
  36. HRESULT SetPrivacyLink(LPCWSTR pszUrl);
  37. HRESULT SetHelpLink(LPCWSTR pszUrl);
  38. HRESULT SetTemplate(LoginTemplate *pTemplate);
  39. HRESULT SetCommand(LoginCommand *pCommand);
  40. protected:
  41. ULONG ref;
  42. GUID id;
  43. LPWSTR name;
  44. LPWSTR description;
  45. LPWSTR imagePath;
  46. LPWSTR tosUrl;
  47. LPWSTR privacyUrl;
  48. LPWSTR helpUrl;
  49. LoginTemplate *pageTemplate;
  50. LoginCommand *command;
  51. };
  52. #endif //NULLSOFT_AUTH_LOGINPROVIDER_HEADER