diff options
author | Michael Drake <michael.drake@codethink.co.uk> | 2018-08-13 17:43:41 +0100 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2018-08-15 07:29:58 +0100 |
commit | e41e558c5faeac4c9619362ac441f0e0ac831d25 (patch) | |
tree | 22f66207305a8209d955dc3fae8315610a446a36 /frontends/beos/login.cpp | |
parent | 6144993c8a9e93332c47e9b57da190ad57ac28fb (diff) | |
download | netsurf-e41e558c5faeac4c9619362ac441f0e0ac831d25.tar.gz netsurf-e41e558c5faeac4c9619362ac441f0e0ac831d25.tar.bz2 |
Haiku: Update for new HTTP auth API.
Diffstat (limited to 'frontends/beos/login.cpp')
-rw-r--r-- | frontends/beos/login.cpp | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/frontends/beos/login.cpp b/frontends/beos/login.cpp index 85062987c..b7e20edf5 100644 --- a/frontends/beos/login.cpp +++ b/frontends/beos/login.cpp @@ -44,7 +44,9 @@ extern "C" { class LoginAlert : public BAlert { public: - LoginAlert(nserror (*callback)(bool proceed, void *pw), + LoginAlert(nserror (*callback)(const char *username, + const char *password, + void *pw), void *callbaclpw, nsurl *url, const char *host, @@ -57,7 +59,9 @@ private: nsurl* fUrl; /**< URL being fetched */ BString fHost; /**< Host for user display */ BString fRealm; /**< Authentication realm */ - nserror (*fCallback)(bool proceed, void *pw); + nserror (*fCallback)(const char *username, + const char *password, + void *pw); void *fCallbackPw; BTextControl *fUserControl; @@ -66,13 +70,17 @@ private: static void create_login_window(nsurl *host, lwc_string *realm, const char *fetchurl, - nserror (*cb)(bool proceed, void *pw), void *cbpw); + nserror (*cb)(const char *username, + const char *password, + void *pw), void *cbpw); #define TC_H 25 #define TC_MARGIN 10 -LoginAlert::LoginAlert(nserror (*callback)(bool proceed, void *pw), +LoginAlert::LoginAlert(nserror (*callback)(const char *username, + const char *password, + void *pw), void *callbackpw, nsurl *url, const char *host, @@ -164,8 +172,12 @@ LoginAlert::MessageReceived(BMessage *message) } -extern "C" void gui_401login_open(nsurl *url, const char *realm, - nserror (*cb)(bool proceed, void *pw), void *cbpw) +extern "C" nserror gui_401login_open(nsurl *url, const char *realm, + const char *username, const char *password, + nserror (*cb)(const char *username, + const char *password, + void *pw), + void *cbpw) { lwc_string *host; @@ -174,12 +186,17 @@ extern "C" void gui_401login_open(nsurl *url, const char *realm, create_login_window(url, host, realm, cb, cbpw); free(host); + + return NSERROR_OK; } //void create_login_window(struct browser_window *bw, const char *host, // const char *realm, const char *fetchurl) static void create_login_window(nsurl *url, lwc_string *host, - const char *realm, nserror (*cb)(bool proceed, void *pw), + const char *realm, nserror (*cb)( + const char *username, + const char *password, + void *pw), void *cbpw) { BString r("Secure Area"); |