On Thu, Nov 20, 2008 at 02:42:19AM +0000, Jeremy Henty wrote:
I'm implementing an HTTP AUTH dpi (based on the cookies dpi) and I'd appreciate comments on how I'm doing it.
(Motivation: (a) I'm tired of the irony of having to use Firefox to log on to the FLTK Trac Wiki to update the Dillo page, (b) this will be a useful primer for hacking on the https dpi.)
The problem is that the dpi must prompt the user for a username and password but src/dialog.cc only supports dialogs that present a choice of buttons.
I think I'll have to add a_Dialog_user_passwd() to src/dialog.cc to create a modal dialog, return the clicked button and write the contents of the dialog entries into a struct. Then I can add a wrapper for it to src/dpiapi.c and hook it into a_Capi_ccc(). That will let the dpi query the user.
Is this a good way to do it or is there a smarter way? All comments and advice are welcome.
It looks OK. I wonder why a dpi is deemed necessary for this. Isn't an implementation of a_Dialog_user_passwd() enough to solve it? -- Cheers Jorge.-