gwenhywfar 5.10.1
Functions
gui_virtual.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

int GWEN_Gui_CloseDialog (GWEN_DIALOG *dlg)
 
int GWEN_Gui_ExecDialog (GWEN_DIALOG *dlg, uint32_t guiid)
 
int GWEN_Gui_GetFileName (const char *caption, GWEN_GUI_FILENAME_TYPE fnt, uint32_t flags, const char *patterns, GWEN_BUFFER *pathBuffer, uint32_t guiid)
 
int GWEN_Gui_GetSyncIo (const char *url, const char *defaultProto, int defaultPort, GWEN_SYNCIO **pSio)
 
void GWEN_Gui_HideBox (uint32_t id)
 
int GWEN_Gui_InputBox (uint32_t flags, const char *title, const char *text, char *buffer, int minLen, int maxLen, uint32_t guiid)
 
int GWEN_Gui_KeyDataFromText_OpenSSL (const char *text, unsigned char *buffer, unsigned int bufLength)
 
int GWEN_Gui_LogHook (const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s)
 
int GWEN_Gui_MessageBox (uint32_t flags, const char *title, const char *text, const char *b1, const char *b2, const char *b3, uint32_t guiid)
 
int GWEN_Gui_OpenDialog (GWEN_DIALOG *dlg, uint32_t guiid)
 
int GWEN_Gui_Print (const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid)
 
int GWEN_Gui_ProgressAdvance (uint32_t id, uint32_t progress)
 
int GWEN_Gui_ProgressEnd (uint32_t id)
 
int GWEN_Gui_ProgressLog (uint32_t id, GWEN_LOGGER_LEVEL level, const char *text)
 
int GWEN_Gui_ProgressLog2 (uint32_t id, GWEN_LOGGER_LEVEL level, const char *fmt,...)
 
int GWEN_Gui_ProgressSetTotal (uint32_t id, uint64_t total)
 
uint32_t GWEN_Gui_ProgressStart (uint32_t progressFlags, const char *title, const char *text, uint64_t total, uint32_t guiid)
 
int GWEN_Gui_ReadDialogPrefs (const char *groupName, const char *altName, GWEN_DB_NODE **pDb)
 
int GWEN_Gui_RunDialog (GWEN_DIALOG *dlg, int untilEnd)
 
GWEN_GUI_CHECKCERT_FN GWEN_Gui_SetCheckCertFn (GWEN_GUI *gui, GWEN_GUI_CHECKCERT_FN f)
 
GWEN_GUI_CLOSE_DIALOG_FN GWEN_Gui_SetCloseDialogFn (GWEN_GUI *gui, GWEN_GUI_CLOSE_DIALOG_FN f)
 
GWEN_GUI_EXEC_DIALOG_FN GWEN_Gui_SetExecDialogFn (GWEN_GUI *gui, GWEN_GUI_EXEC_DIALOG_FN f)
 
GWEN_GUI_GET_FILENAME_FN GWEN_Gui_SetGetFileNameFn (GWEN_GUI *gui, GWEN_GUI_GET_FILENAME_FN f)
 
GWEN_GUI_GETPASSWORD_FN GWEN_Gui_SetGetPasswordFn (GWEN_GUI *gui, GWEN_GUI_GETPASSWORD_FN f)
 
GWEN_GUI_GETSYNCIO_FN GWEN_Gui_SetGetSyncIoFn (GWEN_GUI *gui, GWEN_GUI_GETSYNCIO_FN f)
 
GWEN_GUI_HIDEBOX_FN GWEN_Gui_SetHideBoxFn (GWEN_GUI *gui, GWEN_GUI_HIDEBOX_FN f)
 
GWEN_GUI_INPUTBOX_FN GWEN_Gui_SetInputBoxFn (GWEN_GUI *gui, GWEN_GUI_INPUTBOX_FN f)
 
GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN GWEN_Gui_SetKeyDataFromTextOpenSslFn (GWEN_GUI *gui, GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN f)
 
GWEN_GUI_LOG_HOOK_FN GWEN_Gui_SetLogHookFn (GWEN_GUI *gui, GWEN_GUI_LOG_HOOK_FN f)
 
GWEN_GUI_MESSAGEBOX_FN GWEN_Gui_SetMessageBoxFn (GWEN_GUI *gui, GWEN_GUI_MESSAGEBOX_FN f)
 
GWEN_GUI_OPEN_DIALOG_FN GWEN_Gui_SetOpenDialogFn (GWEN_GUI *gui, GWEN_GUI_OPEN_DIALOG_FN f)
 
GWEN_GUI_PRINT_FN GWEN_Gui_SetPrintFn (GWEN_GUI *gui, GWEN_GUI_PRINT_FN f)
 
GWEN_GUI_PROGRESS_ADVANCE_FN GWEN_Gui_SetProgressAdvanceFn (GWEN_GUI *gui, GWEN_GUI_PROGRESS_ADVANCE_FN f)
 
GWEN_GUI_PROGRESS_END_FN GWEN_Gui_SetProgressEndFn (GWEN_GUI *gui, GWEN_GUI_PROGRESS_END_FN f)
 
GWEN_GUI_PROGRESS_LOG_FN GWEN_Gui_SetProgressLogFn (GWEN_GUI *gui, GWEN_GUI_PROGRESS_LOG_FN f)
 
GWEN_GUI_PROGRESS_SETTOTAL_FN GWEN_Gui_SetProgressSetTotalFn (GWEN_GUI *gui, GWEN_GUI_PROGRESS_SETTOTAL_FN f)
 
GWEN_GUI_PROGRESS_START_FN GWEN_Gui_SetProgressStartFn (GWEN_GUI *gui, GWEN_GUI_PROGRESS_START_FN f)
 
GWEN_GUI_READ_DIALOG_PREFS_FN GWEN_Gui_SetReadDialogPrefsFn (GWEN_GUI *gui, GWEN_GUI_READ_DIALOG_PREFS_FN f)
 
GWEN_GUI_RUN_DIALOG_FN GWEN_Gui_SetRunDialogFn (GWEN_GUI *gui, GWEN_GUI_RUN_DIALOG_FN f)
 
GWEN_GUI_SETPASSWORDSTATUS_FN GWEN_Gui_SetSetPasswordStatusFn (GWEN_GUI *gui, GWEN_GUI_SETPASSWORDSTATUS_FN f)
 
GWEN_GUI_SHOWBOX_FN GWEN_Gui_SetShowBoxFn (GWEN_GUI *gui, GWEN_GUI_SHOWBOX_FN f)
 
GWEN_GUI_WAITFORSOCKETS_FN GWEN_Gui_SetWaitForSocketsFn (GWEN_GUI *gui, GWEN_GUI_WAITFORSOCKETS_FN f)
 
GWEN_GUI_WRITE_DIALOG_PREFS_FN GWEN_Gui_SetWriteDialogPrefsFn (GWEN_GUI *gui, GWEN_GUI_WRITE_DIALOG_PREFS_FN f)
 
uint32_t GWEN_Gui_ShowBox (uint32_t flags, const char *title, const char *text, uint32_t guiid)
 
int GWEN_Gui_WaitForSockets (GWEN_SOCKET_LIST2 *readSockets, GWEN_SOCKET_LIST2 *writeSockets, uint32_t guiid, int msecs)
 
int GWEN_Gui_WriteDialogPrefs (const char *groupName, GWEN_DB_NODE *db)
 

Function Documentation

◆ GWEN_Gui_CloseDialog()

int GWEN_Gui_CloseDialog ( GWEN_DIALOG dlg)

Close a dialog. This function should hide the given dialog and release all its resources.

Returns
<0: error code
Parameters
dlgpointer to the dialog object
guiidid as returned by GWEN_Gui_ProgressStart, GWEN_Gui_ShowBox or as can be found via GWEN_Dialog_GetGuiId())

Definition at line 583 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Gui_DialogBased_HideBox(), and GWEN_Gui_DialogBased_ProgressEnd().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_ExecDialog()

int GWEN_Gui_ExecDialog ( GWEN_DIALOG dlg,
uint32_t  guiid 
)

This function shows and executes the given dialog and returns the result. See MOD_GUI_DIALOG for a description of the dialog framework.

Returns
<0: error code, 0: aborted, 1: accepted (e.g. "Ok" pressed)
Parameters
dlgpointer to the dialog object
guiidid as returned by GWEN_Gui_ProgressStart, GWEN_Gui_ShowBox or as can be found via GWEN_Dialog_GetGuiId())

Definition at line 559 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Gui_DialogBased_InputBox(), GWEN_Gui_DialogBased_MessageBox(), test1(), test10(), test3(), test8(), and test9().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_GetFileName()

int GWEN_Gui_GetFileName ( const char *  caption,
GWEN_GUI_FILENAME_TYPE  fnt,
uint32_t  flags,
const char *  patterns,
GWEN_BUFFER pathBuffer,
uint32_t  guiid 
)

This function is used to get the path and name of a single file or folder.

Parameters
captiontitle for the dialog
fnttype of the operation (see GWEN_Gui_FileNameType_OpenFileName and following)
flagscurrently reserved, use 0
patternsmultiple tab-separated entries like in: "All Files (*)\tC++ Sources (*.cpp,*.cc)\tC++ Headers (*.hpp,*.hh,*.h)"
pathBufferupon call this may contain a preselected path/filename, upon return this will contain the selected name
Returns
0 if ok, !=0 on error

Definition at line 608 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Here is the call graph for this function:

◆ GWEN_Gui_GetSyncIo()

int GWEN_Gui_GetSyncIo ( const char *  url,
const char *  defaultProto,
int  defaultPort,
GWEN_SYNCIO **  pSio 
)

This function creates a base layer GWEN_SYNCIO. The idea is to allow applications to implement their own PROXY handling.

Parameters
urlurl to which the caller wants to connect to. You should call GWEN_Url_fromString() to get the information required to determine the protocol and destination.
defaultProtodefault protocol name if not specified by the url (e.g. "http", "https", "hbci")
defaultPortdefault port if not specified by the url
pSiopointer to a variable to receive the created GWEN_SYNCIO.

Definition at line 652 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_HttpSession_Init().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_HideBox()

void GWEN_Gui_HideBox ( uint32_t  id)

Hides a message box previously shown by a call to GWEN_Gui_ShowBox.

This function MUST return immediately (non-blocking).

This function is deprecated.

Parameters
idid returned by GWEN_Gui_ShowBox. If 0 then the last message shown is referred to.

Definition at line 393 of file gui_virtual.c.

References GWEN_Gui_GetGui().

Referenced by test_gui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_InputBox()

int GWEN_Gui_InputBox ( uint32_t  flags,
const char *  title,
const char *  text,
char *  buffer,
int  minLen,
int  maxLen,
uint32_t  guiid 
)

Ask the user for input.

This function is blocking.

Parameters
flagsflags, see GWEN_GUI_INPUT_FLAGS_CONFIRM ff.
titletitle of the input box
textText of the box: UTF-8, with both a normal text and a HTML variant of the text in the same string. See text restrictions note above.
bufferbuffer to store the response in. Must have at least room for maxLen bytes
minLenminimal length of input (if 0 then there is no low limit)
maxLensize of the buffer including the trailing NULL character. This means that if you want to ask the user for a PIN of at most 4 characters you need to supply a buffer of at least 5 bytes and provide a 5 as maxLen.
guiidid as returned by GWEN_Gui_ProgressStart or GWEN_Gui_ShowBox)
Returns
Zero on success, less than zero when the user requested abort or there was any error. The special value AB_ERROR_DEFAULT_VALUE should be returned if the flag GWEN_GUI_INPUT_FLAGS_ALLOW_DEFAULT was given and the user has chosen to use the default value (e.g. pressed the "default" button in a GUI). A return value of "1" means the result may be stored by the application. This value is returned when the user ticks the checkbox "Store permanently".

Definition at line 360 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Gui_Internal_GetPassword(), GWEN_PasswordStore_EncryptWriteFile(), GWEN_PasswordStore_ReadDecryptFile(), test11(), test12(), test7(), and test_gui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_KeyDataFromText_OpenSSL()

int GWEN_Gui_KeyDataFromText_OpenSSL ( const char *  text,
unsigned char *  buffer,
unsigned int  bufLength 
)

This function is not officially part of the API but is needed for some ancient OpenHBCI keyfiles. License issues forbid us to link against OpenSSL so we leave it up to the application to implement this function. A converter tool might use this function once to convert an anciant OpenHBCI key file.

Parameters
textphrase to generate a key from
bufferbuffer to write the keydata generated from the given passphrase
bufLengthrsize of that buffer

Definition at line 545 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Crypt_TokenOHBCI__EnsurePassword().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_LogHook()

int GWEN_Gui_LogHook ( const char *  logDomain,
GWEN_LOGGER_LEVEL  priority,
const char *  s 
)

This function is called internally by GWEN_Logger_Log. PLEASE NOTE: If you save the information in a file make sure to ignore messages from the log domain "gwenhywfar" with log level debug or higher, because those might contain sensitive information! Information of that level is not supposed to be saved to a file!

Parameters
logDomainlogdomain of the given log message (e.g. "gwenhywfar")
prioritypriority of the message
sstring to log

Definition at line 508 of file gui_virtual.c.

References GWEN_Gui_GetGui(), and GWEN_LoggerLevel_Debug.

Referenced by GWEN_Logger_Log().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_MessageBox()

int GWEN_Gui_MessageBox ( uint32_t  flags,
const char *  title,
const char *  text,
const char *  b1,
const char *  b2,
const char *  b3,
uint32_t  guiid 
)

Show a message box with optional buttons. The message box may either contain 1, 2 or three buttons. If only one button is wanted then b1 should hold a pointer to the button text (b2 and b3 must be NULL) In two-button mode b1 and b2 must be valid (b3 must be NULL) In three-button-mode b1, b2 and b3 must be valid pointers. The return value tells which button the user pressed:

  • 1: button 1
  • 2: button 2
  • 3: button 3

If the frontend can not determine which button has been pressed (e.g. if no button was pressed but the user rather aborted the dialog by simply closing the box) it should return 0.

This function is blocking.

Returns
the number of the button pressed (1=b1, 2=b2, 3=b3), any other value should be considered an error, including 0)
Parameters
flagsflags, see GWEN_GUI_MSG_FLAGS_TYPE_MASK ff.
titletitle of the message box
textText of the box: UTF-8, with both a normal text and a HTML variant of the text in the same string. See text restrictions note above.
b1text for the first button (required), should be something like "Ok" (see text restrictions note above)
b2text for the optional second button
b3text for the optional third button
guiidid as returned by GWEN_Gui_ProgressStart or GWEN_Gui_ShowBox)

Definition at line 342 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Crypt_Token_InsertCorrectToken(), GWEN_Crypt_Token_InsertToken(), GWEN_Gui_CGui__input(), GWEN_Gui_CheckCertBuiltIn(), GWEN_Gui_Internal_GetPassword(), GWEN_Gui_ShowError(), test2(), and test_gui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_OpenDialog()

int GWEN_Gui_OpenDialog ( GWEN_DIALOG dlg,
uint32_t  guiid 
)

Open a dialog. This function should create all the necessary dialog resources (=windows) and return.

Returns
<0: error code
Parameters
dlgpointer to the dialog object
guiidid as returned by GWEN_Gui_ProgressStart, GWEN_Gui_ShowBox or as can be found via GWEN_Dialog_GetGuiId())

Definition at line 571 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Gui_DialogBased_ShowBox(), and GWEN_Gui_ShowProgress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_Print()

int GWEN_Gui_Print ( const char *  docTitle,
const char *  docType,
const char *  descr,
const char *  text,
uint32_t  guiid 
)

This function makes the application print something.

Parameters
docTitletitle of the document. This might be presented to the user
docTypean unique identifier of the document to be printed. This can be used by the application to separate printer settings for different document types. The name itself has no meaning and can be choosen freely by the caller. However, backends should append their name and a colon to keep this argument unique. This argument should not be translated.
descran optional description about what the document contains. This might be shown to the user (see text restriction notes above).
texttext to be printed (see text restriction notes above).
guiidid as returned by GWEN_Gui_ProgressStart or GWEN_Gui_ShowBox)

Definition at line 492 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Here is the call graph for this function:

◆ GWEN_Gui_ProgressAdvance()

int GWEN_Gui_ProgressAdvance ( uint32_t  id,
uint32_t  progress 
)

Advances the progress bar an application might present to the user and checks whether the user wants to abort the operation currently in progress.

On graphical user interfaces this function should also check for user interaction and/or update the GUI (e.g. by calling qApp->processEvents() when using QT/KDE).

This function MUST return immediately (non-blocking).

Returns
0 if ok, !=0 if the current operation is to be aborted
Parameters
idid assigned by GWEN_Gui_ProgressStart (if 0 then the last started progress dialog is referred to)
progressnew value for progress. A special value is GWEN_GUI_PROGRESS_NONE which means that the progress is unchanged. This might be used as a keepalive call to a GUI.

Definition at line 420 of file gui_virtual.c.

References GWEN_Gui_GetGui().

Referenced by GWEN_Crypt_Token_PluginManager_CheckToken(), GWEN_Gui_WaitForSockets(), GWEN_Sar__UnpackArchive(), GWEN_Sar_AddAndDigestFileReg(), GWEN_Sar_CheckArchive(), GWEN_Sar_ExtractAndDigestFileReg(), GWEN_Sar_Sign(), GWEN_Sar_Verify(), GWEN_SyncIo_Http_RecvBody(), GWEN_SyncIo_Http_RecvBodyToSio(), test2(), test3(), test4(), and test6().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_ProgressEnd()

int GWEN_Gui_ProgressEnd ( uint32_t  id)

Flags the end of the current operation. In graphical user interfaces this call should allow the user to close the progress dialog window.

On graphical user interfaces a call to this function should disable the abort button. It would be best not to close the dialog on receiption of this call but to simply enable a dialog closing (otherwise the user will not be able to see the log messages).

Whether this function is blocking or not depends on the status of the progress dialog and its initial flags. If the dialog needs to stay open for the user to read the log messages etc then this function only needs to return after the user manually closes the dialog.

If there is no reason to keep the dialog open then this function should simply close the dialog window and return immediately.

Parameters
idid assigned by GWEN_Gui_ProgressStart (if 0 then the last started progress dialog is referred to)

Definition at line 480 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Crypt_Token_PluginManager_CheckToken(), GWEN_Gui_WaitForSockets(), GWEN_Sar__UnpackArchive(), GWEN_Sar_AddAndDigestFileReg(), GWEN_Sar_CheckArchive(), GWEN_Sar_ExtractAndDigestFileReg(), GWEN_Sar_Sign(), GWEN_Sar_Verify(), GWEN_SyncIo_Http_RecvBody(), GWEN_SyncIo_Http_RecvBodyToSio(), test2(), test3(), test4(), and test6().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_ProgressLog()

int GWEN_Gui_ProgressLog ( uint32_t  id,
GWEN_LOGGER_LEVEL  level,
const char *  text 
)

Adds a log message to the referred process dialog.

This function MUST return immediately (non-blocking).

Parameters
idid assigned by GWEN_Gui_ProgressStart (if 0 then the last started progress dialog is referred to)
levellog level (see GWEN_Gui_LogLevelPanic ff.)
textText of the box: UTF-8, with both a normal text and a HTML variant of the text in the same string. See text restrictions note above.

Definition at line 444 of file gui_virtual.c.

References GWEN_Gui_GetGui().

Referenced by GWEN_Crypt_Token_BeginEnterPin(), GWEN_Crypt_Token_EndEnterPin(), GWEN_Crypt_Token_InsertCorrectToken(), GWEN_Crypt_Token_InsertToken(), GWEN_Crypt_Token_PluginManager_CheckToken(), GWEN_Crypt_TokenFile__ActivateKey(), GWEN_Crypt_TokenFile__CloseFile(), GWEN_Crypt_TokenFile__GenerateKey(), GWEN_Crypt_TokenFile__SetKeyInfo(), GWEN_Crypt_TokenOHBCI__Decode(), GWEN_Crypt_TokenOHBCI__DecryptFile16(), GWEN_Crypt_TokenOHBCI_Plugin_CheckToken(), GWEN_Crypt_TokenOHBCI_Read(), GWEN_Crypt_TokenOHBCI_Write(), GWEN_Gui_ProgressLog2(), GWEN_HttpSession_ConnectionTest(), GWEN_HttpSession_RecvCommand(), GWEN_HttpSession_RecvPacket(), GWEN_HttpSession_RecvPacketToFile(), GWEN_HttpSession_SendPacket(), GWEN_HttpSession_SendStatus(), GWEN_SyncIo_Http_RecvBody(), GWEN_SyncIo_Http_RecvBodyToSio(), GWEN_SyncIo_Tls_Connect(), GWEN_SyncIo_Tls_GetPeerCert(), GWEN_SyncIo_Tls_Prepare(), GWEN_SyncIo_Tls_ShowCipherInfo(), test2(), test3(), test4(), and test6().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_ProgressLog2()

int GWEN_Gui_ProgressLog2 ( uint32_t  id,
GWEN_LOGGER_LEVEL  level,
const char *  text,
  ... 
)

Adds a log message to the referred process dialog and returns immediately.

This is a convenience function to be used with variable number of arguments (like printf). It uses the given arguments to prepare a buffer which is then handed to GWEN_Gui_ProgressLog.

Parameters
idid assigned by GWEN_Gui_ProgressStart (if 0 then the last started progress dialog is referred to)
levellog level (see GWEN_Gui_LogLevelPanic ff.)
textText of the box (possibly including printf format string characters): UTF-8, with both a normal text and a HTML variant of the text in the same string. See text restrictions note above.

Definition at line 458 of file gui_virtual.c.

References DBG_WARN, fmt, GWEN_Gui_ProgressLog(), and GWEN_LOGDOMAIN.

Referenced by _checkPlugin(), GWEN_Crypt_Token_PluginManager_CheckToken(), GWEN_Crypt_TokenFile__ActivateKey(), GWEN_HttpSession__RecvPacket(), GWEN_HttpSession__RecvPacketToSio(), GWEN_HttpSession_SendPacket(), GWEN_HttpSession_SendStatus(), GWEN_MDigest_CheckFileTree(), GWEN_SyncIo_Http_RecvBody(), GWEN_SyncIo_Http_RecvBodyToSio(), GWEN_SyncIo_Socket_Connect(), GWEN_SyncIo_Tls_Connect(), GWEN_SyncIo_Tls_Disconnect(), GWEN_SyncIo_Tls_Prepare(), GWEN_SyncIo_Tls_Read(), GWEN_SyncIo_Tls_ShowCipherInfo(), GWEN_SyncIo_Tls_Write(), and test2().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_ProgressSetTotal()

int GWEN_Gui_ProgressSetTotal ( uint32_t  id,
uint64_t  total 
)

Definition at line 432 of file gui_virtual.c.

References GWEN_Gui_GetGui().

Referenced by GWEN_SyncIo_Http_RecvBody(), and GWEN_SyncIo_Http_RecvBodyToSio().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_ProgressStart()

uint32_t GWEN_Gui_ProgressStart ( uint32_t  progressFlags,
const char *  title,
const char *  text,
uint64_t  total,
uint32_t  guiid 
)

This function is called when a long term operation is started. Theoretically nesting is allowed, however, you should refrain from opening multiple progress dialogs to avoid confusion of the user.

This function must return immediately (i.e. it MUST NOT wait for user interaction).

On graphical user interfaces such a dialog should contain a widget for the text presented here, a progress bar, a text widget to collect the log messages received via GWEN_Gui_ProgressLog and a button to allow the user to abort the current operation monitored by this dialog window.

Between a call to this function and one to GWEN_Gui_ProgressEnd the user should not be allowed to close the dialog window.

This function MUST return immediately (non-blocking).

Returns
id to be used with the other GWEN_Gui_Progress functions.
Parameters
titletitle of the dialog
textText of the box: UTF-8, with both a normal text and a HTML variant of the text in the same string. See text restrictions note above.
totaltotal number of steps of the operation started (i.e. value which represents 100%)
guiidid as returned by GWEN_Gui_ProgressStart or GWEN_Gui_ShowBox)

Definition at line 404 of file gui_virtual.c.

References GWEN_Gui_GetGui().

Referenced by GWEN_Crypt_Token_PluginManager_CheckToken(), GWEN_Gui_WaitForSockets(), GWEN_Sar__UnpackArchive(), GWEN_Sar_AddAndDigestFileReg(), GWEN_Sar_CheckArchive(), GWEN_Sar_ExtractAndDigestFileReg(), GWEN_Sar_Sign(), GWEN_Sar_Verify(), GWEN_SyncIo_Http_RecvBody(), GWEN_SyncIo_Http_RecvBodyToSio(), test2(), test3(), test4(), and test6().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_ReadDialogPrefs()

int GWEN_Gui_ReadDialogPrefs ( const char *  groupName,
const char *  altName,
GWEN_DB_NODE **  pDb 
)

Let the application read a GWEN_DB. This function is used by the platform-independent dialogs to read GUI settings (e.g. width, height etc).

This is implemented by AB_Gui, an extension of the GWEN_GUI in AqBanking using AqBanking's shared configuration module to load/save dialog settings.

Returns
0 on success, error code on error
Parameters
groupNamename of the db to load
altNamealternative name in case there is no group of the name groupName
pDbpointer to receive the GWEN_DB read

Definition at line 625 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Dialog_new().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_RunDialog()

int GWEN_Gui_RunDialog ( GWEN_DIALOG dlg,
int  untilEnd 
)

Run a dialog. This function should run the given dialog and return when the user is done with it.

Returns
<0: error code, 0: aborted, 1: accepted (e.g. "Ok" pressed)
Parameters
dlgpointer to the dialog object
untilEndif not zero, the dialog should run until completely finished (e.g. "OK" pressed)

Definition at line 595 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Gui_DialogBased_ProgressAdvance(), GWEN_Gui_DialogBased_ProgressEnd(), GWEN_Gui_DialogBased_ProgressLog(), GWEN_Gui_DialogBased_ProgressSetTotal(), and GWEN_Gui_ShowProgress().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_SetCheckCertFn()

GWEN_GUI_CHECKCERT_FN GWEN_Gui_SetCheckCertFn ( GWEN_GUI gui,
GWEN_GUI_CHECKCERT_FN  f 
)

Definition at line 208 of file gui_virtual.c.

Referenced by CppGui::CppGui(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetCloseDialogFn()

GWEN_GUI_CLOSE_DIALOG_FN GWEN_Gui_SetCloseDialogFn ( GWEN_GUI gui,
GWEN_GUI_CLOSE_DIALOG_FN  f 
)

Definition at line 247 of file gui_virtual.c.

Referenced by Cocoa_Gui_new(), CppGui::CppGui(), Gtk2_Gui_new(), Gtk3_Gui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetExecDialogFn()

GWEN_GUI_EXEC_DIALOG_FN GWEN_Gui_SetExecDialogFn ( GWEN_GUI gui,
GWEN_GUI_EXEC_DIALOG_FN  f 
)

Definition at line 221 of file gui_virtual.c.

Referenced by Cocoa_Gui_new(), CppGui::CppGui(), Gtk2_Gui_new(), Gtk3_Gui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetGetFileNameFn()

GWEN_GUI_GET_FILENAME_FN GWEN_Gui_SetGetFileNameFn ( GWEN_GUI gui,
GWEN_GUI_GET_FILENAME_FN  f 
)

Definition at line 299 of file gui_virtual.c.

Referenced by Cocoa_Gui_new(), CppGui::CppGui(), Gtk2_Gui_new(), Gtk3_Gui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetGetPasswordFn()

GWEN_GUI_GETPASSWORD_FN GWEN_Gui_SetGetPasswordFn ( GWEN_GUI gui,
GWEN_GUI_GETPASSWORD_FN  f 
)

Definition at line 154 of file gui_virtual.c.

Referenced by CppGui::CppGui(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetGetSyncIoFn()

GWEN_GUI_GETSYNCIO_FN GWEN_Gui_SetGetSyncIoFn ( GWEN_GUI gui,
GWEN_GUI_GETSYNCIO_FN  f 
)

Definition at line 312 of file gui_virtual.c.

Referenced by GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetHideBoxFn()

GWEN_GUI_HIDEBOX_FN GWEN_Gui_SetHideBoxFn ( GWEN_GUI gui,
GWEN_GUI_HIDEBOX_FN  f 
)

Definition at line 68 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetInputBoxFn()

GWEN_GUI_INPUTBOX_FN GWEN_Gui_SetInputBoxFn ( GWEN_GUI gui,
GWEN_GUI_INPUTBOX_FN  f 
)

Definition at line 42 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetKeyDataFromTextOpenSslFn()

GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN GWEN_Gui_SetKeyDataFromTextOpenSslFn ( GWEN_GUI gui,
GWEN_GUI_KEYDATAFROMTEXT_OPENSSL_FN  f 
)

Definition at line 325 of file gui_virtual.c.

Referenced by GWEN_NoGui_new(), and main().

Here is the caller graph for this function:

◆ GWEN_Gui_SetLogHookFn()

GWEN_GUI_LOG_HOOK_FN GWEN_Gui_SetLogHookFn ( GWEN_GUI gui,
GWEN_GUI_LOG_HOOK_FN  f 
)

Definition at line 180 of file gui_virtual.c.

Referenced by CppGui::CppGui(), GWEN_NoGui_new(), TestGui_Extend(), and TestGui_Unextend().

Here is the caller graph for this function:

◆ GWEN_Gui_SetMessageBoxFn()

GWEN_GUI_MESSAGEBOX_FN GWEN_Gui_SetMessageBoxFn ( GWEN_GUI gui,
GWEN_GUI_MESSAGEBOX_FN  f 
)

Definition at line 29 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetOpenDialogFn()

GWEN_GUI_OPEN_DIALOG_FN GWEN_Gui_SetOpenDialogFn ( GWEN_GUI gui,
GWEN_GUI_OPEN_DIALOG_FN  f 
)

Definition at line 234 of file gui_virtual.c.

Referenced by Cocoa_Gui_new(), CppGui::CppGui(), Gtk2_Gui_new(), Gtk3_Gui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetPrintFn()

GWEN_GUI_PRINT_FN GWEN_Gui_SetPrintFn ( GWEN_GUI gui,
GWEN_GUI_PRINT_FN  f 
)

Definition at line 141 of file gui_virtual.c.

Referenced by CppGui::CppGui(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetProgressAdvanceFn()

GWEN_GUI_PROGRESS_ADVANCE_FN GWEN_Gui_SetProgressAdvanceFn ( GWEN_GUI gui,
GWEN_GUI_PROGRESS_ADVANCE_FN  f 
)

Definition at line 93 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetProgressEndFn()

GWEN_GUI_PROGRESS_END_FN GWEN_Gui_SetProgressEndFn ( GWEN_GUI gui,
GWEN_GUI_PROGRESS_END_FN  f 
)

Definition at line 129 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetProgressLogFn()

GWEN_GUI_PROGRESS_LOG_FN GWEN_Gui_SetProgressLogFn ( GWEN_GUI gui,
GWEN_GUI_PROGRESS_LOG_FN  f 
)

Definition at line 117 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetProgressSetTotalFn()

GWEN_GUI_PROGRESS_SETTOTAL_FN GWEN_Gui_SetProgressSetTotalFn ( GWEN_GUI gui,
GWEN_GUI_PROGRESS_SETTOTAL_FN  f 
)

Definition at line 105 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetProgressStartFn()

GWEN_GUI_PROGRESS_START_FN GWEN_Gui_SetProgressStartFn ( GWEN_GUI gui,
GWEN_GUI_PROGRESS_START_FN  f 
)

Definition at line 81 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetReadDialogPrefsFn()

GWEN_GUI_READ_DIALOG_PREFS_FN GWEN_Gui_SetReadDialogPrefsFn ( GWEN_GUI gui,
GWEN_GUI_READ_DIALOG_PREFS_FN  f 
)

Definition at line 273 of file gui_virtual.c.

Referenced by GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetRunDialogFn()

GWEN_GUI_RUN_DIALOG_FN GWEN_Gui_SetRunDialogFn ( GWEN_GUI gui,
GWEN_GUI_RUN_DIALOG_FN  f 
)

Definition at line 260 of file gui_virtual.c.

Referenced by Cocoa_Gui_new(), CppGui::CppGui(), Gtk2_Gui_new(), Gtk3_Gui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetSetPasswordStatusFn()

GWEN_GUI_SETPASSWORDSTATUS_FN GWEN_Gui_SetSetPasswordStatusFn ( GWEN_GUI gui,
GWEN_GUI_SETPASSWORDSTATUS_FN  f 
)

Definition at line 167 of file gui_virtual.c.

Referenced by CppGui::CppGui(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetShowBoxFn()

GWEN_GUI_SHOWBOX_FN GWEN_Gui_SetShowBoxFn ( GWEN_GUI gui,
GWEN_GUI_SHOWBOX_FN  f 
)

Definition at line 55 of file gui_virtual.c.

Referenced by GWEN_Gui_CGui_new(), and GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetWaitForSocketsFn()

GWEN_GUI_WAITFORSOCKETS_FN GWEN_Gui_SetWaitForSocketsFn ( GWEN_GUI gui,
GWEN_GUI_WAITFORSOCKETS_FN  f 
)

Definition at line 194 of file gui_virtual.c.

Referenced by GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_SetWriteDialogPrefsFn()

GWEN_GUI_WRITE_DIALOG_PREFS_FN GWEN_Gui_SetWriteDialogPrefsFn ( GWEN_GUI gui,
GWEN_GUI_WRITE_DIALOG_PREFS_FN  f 
)

Definition at line 286 of file gui_virtual.c.

Referenced by GWEN_NoGui_new().

Here is the caller graph for this function:

◆ GWEN_Gui_ShowBox()

uint32_t GWEN_Gui_ShowBox ( uint32_t  flags,
const char *  title,
const char *  text,
uint32_t  guiid 
)

Shows a box with the given text. This function should return immediately, it should especially NOT wait for user input. This is used to show very important notices the user should see but which don't need user interaction. The message box will be removed later via GWEN_Gui_HideBox. It is ok to allow the user to prematurely close the box.

It is required for every call to this function to be followed later by a corresponding call to GWEN_Gui_HideBox.

This function MUST return immediately (non-blocking).

This function is deprecated (please use GWEN_Gui_ProgressLog() or others).

Returns
returns an id to be presented to GWEN_Gui_HideBox.
Parameters
flagsflags, see GWEN_GUI_SHOWBOX_FLAGS_BEEP ff
titletitle of the box
textText of the box: UTF-8, with both a normal text and a HTML variant of the text in the same string. See text restrictions note above.
guiidid as returned by GWEN_Gui_ProgressStart or GWEN_Gui_ShowBox)

Definition at line 378 of file gui_virtual.c.

References GWEN_Gui_GetGui().

Referenced by test_gui().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_WaitForSockets()

int GWEN_Gui_WaitForSockets ( GWEN_SOCKET_LIST2 readSockets,
GWEN_SOCKET_LIST2 writeSockets,
uint32_t  guiid,
int  msecs 
)

This function waits for activity on the given sockets. it is called by GWEN_Io_Manager_Wait(). The default implementation uses GWEN_Socket_Select() for this purpose.

Parameters
readSocketslist of sockets to wait for to become readable
writeSocketslist of sockets to wait for to become writeable
guiidid as returned by GWEN_Gui_ProgressStart or GWEN_Gui_ShowBox)
msecstime in milliseconds to wait for at max

Definition at line 667 of file gui_virtual.c.

References DBG_DEBUG, GWEN_ERROR_TIMEOUT, GWEN_ERROR_USER_ABORTED, GWEN_GUI_CPU_TIMEOUT, GWEN_Gui_GetGui(), GWEN_GUI_PROGRESS_ALLOW_EMBED, GWEN_GUI_PROGRESS_DELAY, GWEN_GUI_PROGRESS_SHOW_ABORT, GWEN_GUI_PROGRESS_SHOW_PROGRESS, GWEN_Gui_ProgressAdvance(), GWEN_Gui_ProgressEnd(), GWEN_Gui_ProgressStart(), GWEN_LOGDOMAIN, GWEN_Socket_List2_First(), GWEN_Socket_List2Iterator_Data(), GWEN_Socket_List2Iterator_free(), GWEN_Socket_List2Iterator_Next(), GWEN_Socket_Select(), GWEN_SocketSet_AddSocket(), GWEN_SocketSet_free(), GWEN_SocketSet_GetSocketCount(), GWEN_SocketSet_new(), GWEN_TIMEOUT_FOREVER, GWEN_TIMEOUT_NONE, I18N, and NULL.

Referenced by GWEN_SyncIo_Socket_Read(), and GWEN_SyncIo_Socket_Write().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GWEN_Gui_WriteDialogPrefs()

int GWEN_Gui_WriteDialogPrefs ( const char *  groupName,
GWEN_DB_NODE db 
)

Let the application write a GWEN_DB. This function is used by the platform-independent dialogs to write GUI settings (e.g. width, height etc).

Returns
0 on success, error code on error
Parameters
groupNamename of the db to save
pDbpointer to receive the GWEN_DB read

Definition at line 639 of file gui_virtual.c.

References GWEN_ERROR_NOT_IMPLEMENTED, and GWEN_Gui_GetGui().

Referenced by GWEN_Dialog_free().

Here is the call graph for this function:
Here is the caller graph for this function: