From e0c6872cf40896c7be36b11dcc744620f10adf1d Mon Sep 17 00:00:00 2001 From: Norbert Preining Date: Mon, 2 Sep 2019 13:46:59 +0900 Subject: Initial commit --- support/dktools/wxpqdic.h | 265 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 265 insertions(+) create mode 100644 support/dktools/wxpqdic.h (limited to 'support/dktools/wxpqdic.h') diff --git a/support/dktools/wxpqdic.h b/support/dktools/wxpqdic.h new file mode 100644 index 0000000000..2cbddeb59d --- /dev/null +++ b/support/dktools/wxpqdic.h @@ -0,0 +1,265 @@ +#ifndef H_INCLUDED_wxpqdic +/** Include file only once. +*/ +#define H_INCLUDED_wxpqdic 1 + +#ifndef DK4CONF_H_INCLUDED +#include +#endif + +#ifndef DK4TYPES_H_INCLUDED +#include +#endif + +#ifndef DK4ERROR_H_INCLUDED +#include +#endif + +#ifndef DK4MEM_H_INCLUDED +#include +#endif + +#ifndef DK4SOCK_H_INCLUDED +#include +#endif + +#ifndef DK4TIME_H_INCLUDED +#include +#endif + +#ifndef WX_WXPREC_H_INCLUDED +#include +#define WX_WXPREC_H_INCLUDED 1 +#endif + +#ifdef __BORLANDC__ +#pragma hdrstop +#endif + +#ifndef WX_PRECOMP +#ifndef WX_WX_H_INCLUDED +#include +#define WX_WX_H_INCLUDED 1 +#endif +#endif + +#ifndef WX_ARRSTR_H_INCLUDED +#include +#define WX_ARRSTR_H_INCLUDED 1 +#endif + +#ifndef WX_CONFIG_H_INCLUDED +#include +#define WX_CONFIG_H_INCLUDED 1 +#endif + +#ifndef WX_FILENAME_H_INCLUDED +#include +#define WX_FILENAME_H_INCLUDED 1 +#endif + +#ifndef WX_GBSIZER_H_INCLUDED +#include +#define WX_GBSIZER_H_INCLUDED 1 +#endif + +#ifndef WX_THREAD_H_INCLUDED +#include +#define WX_THREAD_H_INCLUDED 1 +#endif + +#ifndef WX_GAUGE_H_INCLUDED +#include +#define WX_GAUGE_H_INCLUDED 1 +#endif + +#ifndef WX_HELP_H_INCLUDED +#include +#define WX_HELP_H_INCLUDED 1 +#endif + +#ifndef WX_FS_ZIP_H_INCLUDED +#include +#define WX_FS_ZIP_H_INCLUDED 1 +#endif + +#ifndef WX_CMDLINE_H_INCLUDED +#include +#define WX_CMDLINE_H_INCLUDED 1 +#endif + +#ifndef WX_DIR_H_INCLUDED +#include +#define WX_DIR_H_INCLUDED 1 +#endif + +/* __CHANGE__ 018: Add futher wxWidgets header files. +*/ + + +#ifndef DK4WXAPPLICTIONHELPER_H_INCLUDED +#include +#endif + +#ifndef DK4WXFRAME_H_INCLUDED +#include +#endif + +#ifndef DK4WXPROGRESSDIALOG_H_INCLUDED +#include +#endif + +#ifndef DK4WXHELPCONTROLLER_H_INCLUDED +#include +#endif + +#include "WxpqdicApp.h" + +#include "WxpqdicFrame.h" + +/* __CHANGE__ 018: Add header files for further classes and modules. +*/ + + + +/** IDs for menu items, buttons and other elements. +*/ +enum { + + /** Exit the application. + */ + WxpqdicFrame_Quit = wxID_EXIT , + + /** Main window ID. + */ + WxpqdicFrame_MainWindow = ((wxID_HIGHEST) + 1) , + + /** Show version dialog box. + */ + WxpqdicFrame_Help_About , + + /** Open table of conents for online help. + */ + WxpqdicFrame_Help_Contents , + + /** Update view. + */ + WxpqdicFrame_View_Update , + + /** Timer event to handle. + */ + WxpqdicFrame_Timer +}; + + + +/** Error codes during configuration phase. +*/ +enum { + + /** No error occured. + */ + WXPQDIC_FRAME_ERROR_NONE = 0 , + + /** Failed to parse command line arguments. + */ + WXPQDIC_FRAME_ERROR_PARSE , + + /** Not enough memory. + */ + WXPQDIC_FRAME_ERROR_MEMORY , + + /** String conversion failed for host name. + */ + WXPQDIC_FRAME_ERROR_STRCONV_HOSTNAME , + + /** No host name specified. + */ + WXPQDIC_FRAME_ERROR_HOSTNAME , + + /** String conversion failed for queue name. + */ + WXPQDIC_FRAME_ERROR_STRCONV_QUEUENAME , + + /** Queue name missing. + */ + WXPQDIC_FRAME_ERROR_QUEUENAME , + + /** Port number out of range. + */ + WXPQDIC_FRAME_ERROR_PORT_OOR , + + /** Port number is zero. + */ + WXPQDIC_FRAME_ERROR_PORT_ZERO , + + + /** String conversion failed for user name. + */ + WXPQDIC_FRAME_ERROR_STRCONV_USERNAME , + + /** User name not found. + */ + WXPQDIC_FRAME_ERROR_USERNAME , + + /** Local port number out of range. + */ + WXPQDIC_FRAME_ERROR_LOCALPORT_OOR , + + /** Local port number 0. + */ + WXPQDIC_FRAME_ERROR_LOCALPORT_ZERO , + + /** Bug: Failed to copy string to request. + */ + WXPQDIC_FRAME_ERROR_BUG , + + /** Numeric overflow in size calculation. + */ + WXPQDIC_FRAME_ERROR_SIZE_CALC_OVERFLOW , + + /** Failed to create UDP socket. + */ + WXPQDIC_FRAME_ERROR_SOCKET + +}; + + + +/** States. +*/ +enum { + /** Have response for previous request. + */ + WXPQDIC_STATE_OK = 0 , + + /** Request was sended, no response yet. + */ + WXPQDIC_STATE_SENDED , + + /** Waiting too long for response. + */ + WXPQDIC_STATE_TIMEOUT , + + /** Failed to send request. + */ + WXPQDIC_STATE_SEND_FAILED + +}; + + + +/** Error to show in status text. +*/ +enum { + /** Failed to send request. + */ + WXPQDIC_E_SEND_FAILED = 1 , + + /** No response from server. + */ + WXPQDIC_E_NO_RESPONSE = 2 +}; + +#endif + -- cgit v1.2.3