gitauthenticator.h 578 B

123456789101112131415161718192021222324
  1. #ifndef GITAUTHENTICATOR_H
  2. #define GITAUTHENTICATOR_H
  3. #include <QObject>
  4. class GitRemote;
  5. struct git_cred;
  6. class GitAuthenticator : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. int authenticate(GitRemote *remote, git_cred **credentials, const char *usernameFromUrl, unsigned int allowedTypes);
  11. static GitAuthenticator* instance() {
  12. static GitAuthenticator s_instance;
  13. return &s_instance;
  14. }
  15. private:
  16. GitAuthenticator();
  17. int authenticateSsh(GitRemote* remote, git_cred **credentials, const char* usernameFromUrl);
  18. };
  19. #endif // GITAUTHENTICATOR_H