gui.h File Reference

#include <gwenhywfar/inherit.h>
#include <gwenhywfar/logger.h>
#include <gwenhywfar/inetsocket.h>
#include <gwenhywfar/ssl_cert_descr.h>
#include <gwenhywfar/iolayer.h>
#include <inttypes.h>

Go to the source code of this file.

Flags

Functions in this group influence the behaviour of GWEN_GUI implementations. These functions operate on a specific GUI object which applications create.

#define GWEN_GUI_FLAGS_ACCEPTVALIDCERTS   0x00000002
#define GWEN_GUI_FLAGS_NONINTERACTIVE   0x00000001
#define GWEN_GUI_FLAGS_REJECTINVALIDCERTS   0x00000004
GWENHYWFAR_API void GWEN_Gui_AddFlags (GWEN_GUI *gui, uint32_t fl)
GWENHYWFAR_API uint32_t GWEN_Gui_GetFlags (const GWEN_GUI *gui)
GWENHYWFAR_API void GWEN_Gui_SetFlags (GWEN_GUI *gui, uint32_t fl)
GWENHYWFAR_API void GWEN_Gui_SubFlags (GWEN_GUI *gui, uint32_t fl)

Defines

#define GWEN_GUI_CHECK_PERIOD   750
#define GWEN_GUI_CPU_TIMEOUT   200
#define GWEN_GUI_DELAY_SECS   2
Flags For GWEN_Gui_InputBox
These flags are given to GWEN_Gui_InputBox to modify its behaviour.

#define GWEN_GUI_INPUT_FLAGS_ALLOW_DEFAULT   0x00000010
#define GWEN_GUI_INPUT_FLAGS_CONFIRM   0x00000001
#define GWEN_GUI_INPUT_FLAGS_NUMERIC   0x00000004
#define GWEN_GUI_INPUT_FLAGS_RETRY   0x00000008
#define GWEN_GUI_INPUT_FLAGS_SHOW   0x00000002
#define GWEN_GUI_INPUT_FLAGS_TAN   0x00000020
Flags For GWEN_Gui_MessageBox
These flags are given to GWEN_Gui_MessageBox to modify its behaviour. You may OR-combine the flags.
Examples:

A note about confirmation buttons: AqBanking has been designed with non-interactive applications in mind. For such an application it is important to know what button-press it has to simulate upon catching of a messagebox callback. This is what the confimation button flags are for. For informative messages the application may simply return the number of the confirmation button and be done.

However, non-interactive applications should return an error (value 0) for messages classified as dangerous (see GWEN_GUI_MSG_FLAGS_SEVERITY_DANGEROUS) to avoid data loss.

#define GWEN_GUI_MSG_FLAGS_CONFIRM_B1   (1<<3)
#define GWEN_GUI_MSG_FLAGS_CONFIRM_B2   (2<<3)
#define GWEN_GUI_MSG_FLAGS_CONFIRM_B3   (3<<3)
#define GWEN_GUI_MSG_FLAGS_CONFIRM_BUTTON(fl)   (((fl)>>3) & 0x3)
#define GWEN_GUI_MSG_FLAGS_SEVERITY_DANGEROUS   (0x1<<5)
#define GWEN_GUI_MSG_FLAGS_SEVERITY_IS_DANGEROUS(fl)
#define GWEN_GUI_MSG_FLAGS_SEVERITY_IS_NORMAL(fl)
#define GWEN_GUI_MSG_FLAGS_SEVERITY_MASK   (0x7<<5)
#define GWEN_GUI_MSG_FLAGS_SEVERITY_NORMAL   (0x0<<5)
#define GWEN_GUI_MSG_FLAGS_TYPE_ERROR   2
#define GWEN_GUI_MSG_FLAGS_TYPE_INFO   0
#define GWEN_GUI_MSG_FLAGS_TYPE_IS_ERROR   ((fl & GWEN_GUI_MSG_FLAGS_TYPE_MASK)==GWEN_GUI_MSG_FLAGS_TYPE_ERROR)
#define GWEN_GUI_MSG_FLAGS_TYPE_IS_INFO(fl)   ((fl & GWEN_GUI_MSG_FLAGS_TYPE_MASK)==GWEN_GUI_MSG_FLAGS_TYPE_INFO)
#define GWEN_GUI_MSG_FLAGS_TYPE_IS_WARN(fl)   ((fl & GWEN_GUI_MSG_FLAGS_TYPE_MASK)==GWEN_GUI_MSG_FLAGS_TYPE_WARN)
#define GWEN_GUI_MSG_FLAGS_TYPE_MASK   0x07
#define GWEN_GUI_MSG_FLAGS_TYPE_WARN   1
Flags For GWEN_Gui_ProgressStart
These flags are given to GWEN_Gui_ProgressStart to modify its behaviour.

#define GWEN_GUI_PROGRESS_ALLOW_EMBED   0x00000010
#define GWEN_GUI_PROGRESS_ALLOW_SUBLEVELS   0x00000008
#define GWEN_GUI_PROGRESS_ALWAYS_SHOW_LOG   0x00000080
#define GWEN_GUI_PROGRESS_DELAY   0x00000001
#define GWEN_GUI_PROGRESS_KEEP_OPEN   0x00000040
#define GWEN_GUI_PROGRESS_SHOW_ABORT   0x00000004
#define GWEN_GUI_PROGRESS_SHOW_LOG   0x00000002
#define GWEN_GUI_PROGRESS_SHOW_PROGRESS   0x00000020
Special Progress Values for GWEN_Gui_ProgressAdvance
#define GWEN_GUI_PROGRESS_NONE   (0xffffffffUL)
#define GWEN_GUI_PROGRESS_ONE   (0xfffffffeUL)
Flags For GWEN_Gui_ShowBox
#define GWEN_GUI_SHOWBOX_FLAGS_BEEP   0x00000001

Typedefs

typedef struct GWEN_GUI GWEN_GUI

Enumerations

enum  GWEN_GUI_PASSWORD_STATUS {
  GWEN_Gui_PasswordStatus_Bad = -1, GWEN_Gui_PasswordStatus_Unknown, GWEN_Gui_PasswordStatus_Ok, GWEN_Gui_PasswordStatus_Used,
  GWEN_Gui_PasswordStatus_Unused, GWEN_Gui_PasswordStatus_Remove
}

Functions

Constructor, Destructor etc
GWENHYWFAR_API void GWEN_Gui_Attach (GWEN_GUI *gui)
GWENHYWFAR_API void GWEN_Gui_free (GWEN_GUI *gui)
GWENHYWFAR_API GWEN_GUIGWEN_Gui_GetGui ()
GWENHYWFAR_API GWEN_GUIGWEN_Gui_new ()
GWENHYWFAR_API void GWEN_Gui_SetGui (GWEN_GUI *gui)
Virtual User Interaction Functions
All text passed to the frontend via one of the following functions is expected to be an UTF-8 string which may contain newlines but no other control characters. Text delivered as argument called text throughout the documentation in this group may contain HTML tags. If it does a non-HTML version must be supplied, too. The text MUST begin with the non-HTML version, so that a frontend not capable of parsing HTML can simply exclude the HTML part by cutting before "<html".

This is an example for HTML and non-HTML text:

 const char *text;

 text="This is the non-HTML text"
      "<html>"
      "And this is the <b>HTML</b> version."
      "</html>"

Frontends capable of parsing HTML (such as the KDE frontend) will extract the HTML information and show only that part of the string.

Other frontends have to extract the non-HTML information and show only that.

GWENHYWFAR_API int GWEN_Gui_CheckCert (const GWEN_SSLCERTDESCR *cert, GWEN_IO_LAYER *io, uint32_t guiid)
GWENHYWFAR_API int GWEN_Gui_GetPassword (uint32_t flags, const char *token, const char *title, const char *text, char *buffer, int minLen, int maxLen, uint32_t guiid)
GWENHYWFAR_API void GWEN_Gui_HideBox (uint32_t id)
GWENHYWFAR_API int GWEN_Gui_InputBox (uint32_t flags, const char *title, const char *text, char *buffer, int minLen, int maxLen, uint32_t guiid)
GWENHYWFAR_API int GWEN_Gui_KeyDataFromText_OpenSSL (const char *text, unsigned char *buffer, unsigned int bufLength)
GWENHYWFAR_API int GWEN_Gui_LogHook (const char *logDomain, GWEN_LOGGER_LEVEL priority, const char *s)
GWENHYWFAR_API 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)
GWENHYWFAR_API int GWEN_Gui_Print (const char *docTitle, const char *docType, const char *descr, const char *text, uint32_t guiid)
GWENHYWFAR_API int GWEN_Gui_ProgressAdvance (uint32_t id, uint32_t progress)
GWENHYWFAR_API int GWEN_Gui_ProgressEnd (uint32_t id)
GWENHYWFAR_API int GWEN_Gui_ProgressLog (uint32_t id, GWEN_LOGGER_LEVEL level, const char *text)
GWENHYWFAR_API uint32_t GWEN_Gui_ProgressStart (uint32_t progressFlags, const char *title, const char *text, uint64_t total, uint32_t guiid)
GWENHYWFAR_API int GWEN_Gui_SetPasswordStatus (const char *token, const char *pin, GWEN_GUI_PASSWORD_STATUS status, uint32_t guiid)
GWENHYWFAR_API uint32_t GWEN_Gui_ShowBox (uint32_t flags, const char *title, const char *text, uint32_t guiid)
GWENHYWFAR_API int GWEN_Gui_WaitForSockets (GWEN_SOCKET_LIST2 *readSockets, GWEN_SOCKET_LIST2 *writeSockets, uint32_t guiid, int msecs)


Generated on Mon Jan 25 12:56:03 2010 for gwenhywfar by  doxygen 1.5.6