cppgui.hpp
Go to the documentation of this file.
/***************************************************************************
copyright : (C) 2004 by Martin Preuss
email : martin@libchipcard.de
***************************************************************************
* Please see toplevel file COPYING for license details *
***************************************************************************/
#ifndef CPPGUI_HPP
#define CPPGUI_HPP
#include <gwenhywfar/gui_be.h>
#include <gwenhywfar/i18n.h>
//#include <gwenhywfar/db.h>
//#include <gwenhywfar/passwdstore.h>
#define I18N(msg) GWEN_I18N_Translate(PACKAGE, msg)
#define I18S(msg) msg
#include <list>
#include <string>
class CppGui;
#include <gwen-gui-cpp/api.h>
#include <gwen-gui-cpp/cppdialog.hpp>
class CPPGUI_API CppGui {
friend class CppGuiLinker;
private:
GWEN_GUI_CHECKCERT_FN _checkCertFn;
GWEN_GUI_PRINT_FN _printFn;
GWEN_GUI_GETPASSWORD_FN _getPasswordFn;
GWEN_GUI_SETPASSWORDSTATUS_FN _setPasswordStatusFn;
GWEN_GUI_EXEC_DIALOG_FN _execDialogFn;
GWEN_GUI_OPEN_DIALOG_FN _openDialogFn;
GWEN_GUI_CLOSE_DIALOG_FN _closeDialogFn;
GWEN_GUI_RUN_DIALOG_FN _runDialogFn;
GWEN_GUI_GET_FILENAME_FN _getFileNameFn;
public:
CppGui();
virtual ~CppGui();
static CPPGUI_API CppGui *getCppGui();
GWEN_GUI *getCInterface();
void setPasswordDb(GWEN_DB_NODE *dbPasswords, int persistent);
void setPasswordStore(GWEN_PASSWD_STORE *sto);
protected:
GWEN_GUI *_gui;
virtual int print(const char *docTitle,
const char *docType,
const char *descr,
const char *text,
uint32_t guiid);
virtual int getPassword(uint32_t flags,
const char *token,
const char *title,
const char *text,
char *buffer,
int minLen,
int maxLen,
GWEN_GUI_PASSWORD_METHOD methodId,
GWEN_DB_NODE *methodParams,
uint32_t guiid);
virtual int setPasswordStatus(const char *token,
const char *pin,
GWEN_GUI_PASSWORD_STATUS status,
uint32_t guiid);
virtual int checkCert(const GWEN_SSLCERTDESCR *cert,
GWEN_SYNCIO *sio,
uint32_t guiid);
virtual int logHook(const char *logDomain,
GWEN_LOGGER_LEVEL priority, const char *s);
virtual int execDialog(GWEN_DIALOG *dlg, uint32_t guiid);
virtual int openDialog(GWEN_DIALOG *dlg, uint32_t guiid);
virtual int closeDialog(GWEN_DIALOG *dlg);
virtual int runDialog(GWEN_DIALOG *dlg, int untilEnd);
virtual int getFileName(const char *caption,
GWEN_GUI_FILENAME_TYPE fnt,
uint32_t flags,
const char *patterns,
GWEN_BUFFER *pathBuffer,
uint32_t guiid);
int checkCertBuiltIn(const GWEN_SSLCERTDESCR *cert,
GWEN_SYNCIO *sio,
uint32_t guiid);
};
#endif /* CPPGUI_HPP */
CppGui
A C++ binding for the C module GWEN_GUI.
Definition cppgui.hpp:39
CppGui::checkCertBuiltIn
int checkCertBuiltIn(const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *sio, uint32_t guiid)
CppGui::getCInterface
GWEN_GUI * getCInterface()
CppGui::openDialog
virtual int openDialog(GWEN_DIALOG *dlg, uint32_t guiid)
CppGui::setPasswordStore
void setPasswordStore(GWEN_PASSWD_STORE *sto)
CppGui::getPassword
virtual int getPassword(uint32_t flags, const char *token, const char *title, const char *text, char *buffer, int minLen, int maxLen, GWEN_GUI_PASSWORD_METHOD methodId, GWEN_DB_NODE *methodParams, uint32_t guiid)
CppGui::print
virtual int print(const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid)
CppGui::checkCert
virtual int checkCert(const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *sio, uint32_t guiid)
CppGui::CppGui
CppGui()
CppGui::_gui
GWEN_GUI * _gui
Definition cppgui.hpp:67
CppGui::setPasswordDb
void setPasswordDb(GWEN_DB_NODE *dbPasswords, int persistent)
CppGui::closeDialog
virtual int closeDialog(GWEN_DIALOG *dlg)
CppGui::getFileName
virtual int getFileName(const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid)
CppGui::logHook
virtual int logHook(const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s)
CppGui::setPasswordStatus
virtual int setPasswordStatus(const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS status, uint32_t guiid)
CppGui::CppGuiLinker
friend class CppGuiLinker
Definition cppgui.hpp:40
CppGui::~CppGui
virtual ~CppGui()
CppGui::runDialog
virtual int runDialog(GWEN_DIALOG *dlg, int untilEnd)
CppGui::getCppGui
static CPPGUI_API CppGui * getCppGui()
CppGui::execDialog
virtual int execDialog(GWEN_DIALOG *dlg, uint32_t guiid)
cppdialog.hpp
GWEN_DB_NODE
struct GWEN_DB_NODE GWEN_DB_NODE
Definition db.h:228
GWEN_DIALOG
struct GWEN_DIALOG GWEN_DIALOG
Definition dialog.h:54
GWEN_BUFFER
struct GWEN_BUFFER GWEN_BUFFER
A dynamically resizeable text buffer.
Definition buffer.h:38
GWEN_GUI_PASSWORD_METHOD
GWEN_GUI_PASSWORD_METHOD
Definition gui.h:163
GWEN_GUI_FILENAME_TYPE
GWEN_GUI_FILENAME_TYPE
Definition gui.h:949
GWEN_GUI_PASSWORD_STATUS
GWEN_GUI_PASSWORD_STATUS
Definition gui.h:386
GWEN_GUI
struct GWEN_GUI GWEN_GUI
Definition gui.h:176
gui_be.h
GWEN_GUI_EXEC_DIALOG_FN
int GWENHYWFAR_CB(* GWEN_GUI_EXEC_DIALOG_FN)(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid)
Definition gui_be.h:238
GWEN_GUI_SETPASSWORDSTATUS_FN
int GWENHYWFAR_CB(* GWEN_GUI_SETPASSWORDSTATUS_FN)(GWEN_GUI *gui, const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS status, uint32_t guiid)
Definition gui_be.h:166
GWEN_GUI_PRINT_FN
int GWENHYWFAR_CB(* GWEN_GUI_PRINT_FN)(GWEN_GUI *gui, const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid)
Definition gui_be.h:141
GWEN_GUI_GET_FILENAME_FN
int GWENHYWFAR_CB(* GWEN_GUI_GET_FILENAME_FN)(GWEN_GUI *gui, const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid)
Definition gui_be.h:210
GWEN_GUI_CHECKCERT_FN
int GWENHYWFAR_CB(* GWEN_GUI_CHECKCERT_FN)(GWEN_GUI *gui, const GWEN_SSLCERTDESCR *cert, GWEN_SYNCIO *sio, uint32_t guiid)
Definition gui_be.h:204
GWEN_GUI_RUN_DIALOG_FN
int GWENHYWFAR_CB(* GWEN_GUI_RUN_DIALOG_FN)(GWEN_GUI *gui, GWEN_DIALOG *dlg, int timeout)
Definition gui_be.h:249
GWEN_GUI_CLOSE_DIALOG_FN
int GWENHYWFAR_CB(* GWEN_GUI_CLOSE_DIALOG_FN)(GWEN_GUI *gui, GWEN_DIALOG *dlg)
Definition gui_be.h:247
GWEN_GUI_OPEN_DIALOG_FN
int GWENHYWFAR_CB(* GWEN_GUI_OPEN_DIALOG_FN)(GWEN_GUI *gui, GWEN_DIALOG *dlg, uint32_t guiid)
Definition gui_be.h:243
GWEN_GUI_GETPASSWORD_FN
int GWENHYWFAR_CB(* GWEN_GUI_GETPASSWORD_FN)(GWEN_GUI *gui, uint32_t flags, const char *token, const char *title, const char *text, char *buffer, int minLen, int maxLen, GWEN_GUI_PASSWORD_METHOD methodId, GWEN_DB_NODE *methodParams, uint32_t guiid)
Definition gui_be.h:151
api.h
i18n.h
GWEN_LOGGER_LEVEL
GWEN_LOGGER_LEVEL
Definition logger.h:61
GWEN_PASSWD_STORE
struct GWEN_PASSWD_STORE GWEN_PASSWD_STORE
Definition passwdstore.h:37
GWEN_SSLCERTDESCR
struct GWEN_SSLCERTDESCR GWEN_SSLCERTDESCR
Definition ssl_cert_descr.h:167
GWEN_SYNCIO
struct GWEN_SYNCIO GWEN_SYNCIO
Definition syncio.h:40