18 #include <gwenhywfar/inherit.h>
19 #include <gwenhywfar/debug.h>
20 #include <gwenhywfar/gui_be.h>
21 #include <gwenhywfar/i18n.h>
23 #include <gwenhywfar/text.h>
24 #include <gwenhywfar/mdigest.h>
25 #include <gwenhywfar/debug.h>
34 int CppGuiLinker::Print(
GWEN_GUI *gui,
46 return xgui->
print(docTitle, docType, descr, text, guiid);
51 int CppGuiLinker::GetPassword(
GWEN_GUI *gui,
66 return xgui->
getPassword(flags, token, title, text, buffer, minLen, maxLen, guiid);
71 int CppGuiLinker::SetPasswordStatus(
GWEN_GUI *gui,
87 int CppGuiLinker::CheckCert(
GWEN_GUI *gui,
102 int CppGuiLinker::LogHook(
GWEN_GUI *gui,
103 const char *logDomain,
111 return xgui->
logHook(logDomain, priority, s);
116 int CppGuiLinker::ExecDialog(
GWEN_GUI *gui,
130 int CppGuiLinker::OpenDialog(
GWEN_GUI *gui,
139 DBG_ERROR(0,
"CppGuiLinker::OpenDialog");
146 int CppGuiLinker::CloseDialog(
GWEN_GUI *gui,
159 int CppGuiLinker::RunDialog(
GWEN_GUI *gui,
173 int CppGuiLinker::GetFileName(
GWEN_GUI *gui,
177 const char *patterns,
186 return xgui->
getFileName(caption, fnt, flags, patterns, pathBuffer, guiid);
192 void CppGuiLinker::freeData(
void *bp,
void *p) {
195 DBG_NOTICE(0,
"CppGuiLinker: Freeing CppGui");
223 CppGuiLinker::freeData);
255 return _printFn(
_gui, docTitle, docType, descr, text, guiid);
262 std::string CppGui::_getPasswordHash(
const char *token,
const char *pin) {
331 if (i>=minLen && i<=maxLen) {
332 memmove(buffer, s, i+1);
353 std::list<std::string>::iterator it;
356 s=_getPasswordHash(token, buffer);
357 for (it=_badPasswords.begin();
358 it!=_badPasswords.end();
374 "You entered the same PIN twice.\n"
375 "The PIN is marked as bad, do you want\n"
379 "You entered the same PIN twice."
382 "The PIN is marked as <b>bad</b>, "
383 "do you want to use it anyway?"
386 I18N(
"Use my input"),
392 _badPasswords.remove(s);
450 const char *patterns,
464 return _checkCertFn(
_gui, cert, sio, guiid);
466 DBG_ERROR(0,
"No built-in checkcert function?");
487 s=_getPasswordHash(token, pin);
489 std::list<std::string>::iterator it;
491 s=_getPasswordHash(token, pin);
492 for (it=_badPasswords.begin();
493 it!=_badPasswords.end();
501 _badPasswords.push_back(s);