summaryrefslogtreecommitdiff
path: root/support/dktools/wxpqdic.h
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
committerNorbert Preining <norbert@preining.info>2019-09-02 13:46:59 +0900
commite0c6872cf40896c7be36b11dcc744620f10adf1d (patch)
tree60335e10d2f4354b0674ec22d7b53f0f8abee672 /support/dktools/wxpqdic.h
Initial commit
Diffstat (limited to 'support/dktools/wxpqdic.h')
-rw-r--r--support/dktools/wxpqdic.h265
1 files changed, 265 insertions, 0 deletions
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 <dk4conf.h>
+#endif
+
+#ifndef DK4TYPES_H_INCLUDED
+#include <dk4types.h>
+#endif
+
+#ifndef DK4ERROR_H_INCLUDED
+#include <dk4error.h>
+#endif
+
+#ifndef DK4MEM_H_INCLUDED
+#include <dk4mem.h>
+#endif
+
+#ifndef DK4SOCK_H_INCLUDED
+#include <dk4sock.h>
+#endif
+
+#ifndef DK4TIME_H_INCLUDED
+#include <dk4time.h>
+#endif
+
+#ifndef WX_WXPREC_H_INCLUDED
+#include <wx/wxprec.h>
+#define WX_WXPREC_H_INCLUDED 1
+#endif
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#ifndef WX_WX_H_INCLUDED
+#include <wx/wx.h>
+#define WX_WX_H_INCLUDED 1
+#endif
+#endif
+
+#ifndef WX_ARRSTR_H_INCLUDED
+#include <wx/arrstr.h>
+#define WX_ARRSTR_H_INCLUDED 1
+#endif
+
+#ifndef WX_CONFIG_H_INCLUDED
+#include <wx/config.h>
+#define WX_CONFIG_H_INCLUDED 1
+#endif
+
+#ifndef WX_FILENAME_H_INCLUDED
+#include <wx/filename.h>
+#define WX_FILENAME_H_INCLUDED 1
+#endif
+
+#ifndef WX_GBSIZER_H_INCLUDED
+#include <wx/gbsizer.h>
+#define WX_GBSIZER_H_INCLUDED 1
+#endif
+
+#ifndef WX_THREAD_H_INCLUDED
+#include <wx/thread.h>
+#define WX_THREAD_H_INCLUDED 1
+#endif
+
+#ifndef WX_GAUGE_H_INCLUDED
+#include <wx/gauge.h>
+#define WX_GAUGE_H_INCLUDED 1
+#endif
+
+#ifndef WX_HELP_H_INCLUDED
+#include <wx/help.h>
+#define WX_HELP_H_INCLUDED 1
+#endif
+
+#ifndef WX_FS_ZIP_H_INCLUDED
+#include <wx/fs_zip.h>
+#define WX_FS_ZIP_H_INCLUDED 1
+#endif
+
+#ifndef WX_CMDLINE_H_INCLUDED
+#include <wx/cmdline.h>
+#define WX_CMDLINE_H_INCLUDED 1
+#endif
+
+#ifndef WX_DIR_H_INCLUDED
+#include <wx/dir.h>
+#define WX_DIR_H_INCLUDED 1
+#endif
+
+/* __CHANGE__ 018: Add futher wxWidgets header files.
+*/
+
+
+#ifndef DK4WXAPPLICTIONHELPER_H_INCLUDED
+#include <Dk4WxApplicationHelper.h>
+#endif
+
+#ifndef DK4WXFRAME_H_INCLUDED
+#include <Dk4WxFrame.h>
+#endif
+
+#ifndef DK4WXPROGRESSDIALOG_H_INCLUDED
+#include <Dk4WxProgressDialog.h>
+#endif
+
+#ifndef DK4WXHELPCONTROLLER_H_INCLUDED
+#include <Dk4WxHelpController.h>
+#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
+