summaryrefslogtreecommitdiff
path: root/support/dktools/dkwxpqdc.h
blob: 12963cf0efb21d8d8bbebe6701f425f464693cdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153

#ifndef DKWXPQDC_H_INCLUDED
#define	DKWXPQDC_H_INCLUDED	1

#ifdef	DK3_USE_WX
#undef	DK3_USE_WX
#endif
/**	Use wxWidgets libraries to build GUI programs.
*/
#define	DK3_USE_WX	1

#include <dk3all.h>
#include <dk3sock.h>
#include <printqds.h>
#if 0
#include <dkt-version.h>
#endif
#include "dk4verswx.h"

/**	Data returned from quota information server.
*/
typedef struct {
  unsigned long	li;	/**< Pages limit. */
  unsigned long	pa;	/**< Pages used from limit. */
  unsigned long	ac;	/**< Pages in personal print account. */
  int		lt;	/**< Limit type: 0=denied, 1=pages, 2=unlimited. */
  int		su;	/**< Summary: 1=can print, 0=no printing. */
  int		ec;	/**< Error code: 0=no error, 1=connect failed. */
} wxpqdic_t;

#include <wx/wxprec.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#ifndef WX_PRECOMP
#include <wx/wx.h>
#endif
#include <wx/config.h>
#include <wx/filename.h>
#include <wx/gbsizer.h>
#include <wx/thread.h>
#include <wx/gauge.h>
#include <wx/help.h>
#include <wx/fs_zip.h>
#include <wx/cmdline.h>
#include <wx/socket.h>

#include "dk3wxs.h"
#include "DkWxAppHelper.h"
#include "DkWxFrame.h"
#include "DkWxCommunicator.h"
#include "DkWxProgressDialog.h"
#include "DkWxHelpController.h"

#include "DkWxPrintqdcApp.h"
#include "DkWxPrintqdcFrame.h"
#include "DkWxPrintqdcThread.h"


/**	@defgroup	wxdkpqdicevents	Event and other IDs. */
/**@{*/

/**	Event ID:	Quit program.
*/
#define	DkWxPrintqdc_Quit	wxID_EXIT

/**	Event ID:	Show about box.
*/
#define	DkWxPrintqdc_About	wxID_ABOUT

/**	Event ID:	Widget ID for main window.
*/
#define	DkWxPrintqdc_MainWindow	(wxID_HIGHEST + 1)

/**	Event ID:	Update view.
*/
#define	DkWxPrintqdc_Update	(DkWxPrintqdc_MainWindow + 1)

/**	Event ID:	Timer event.
*/
#define	DkWxPrintqdc_Timer	(DkWxPrintqdc_Update + 1)

/**	Event ID:	Open help.
*/
#define	DkWxPrintqdc_Help	(DkWxPrintqdc_About + 1)
/**@}*/

/**	@defgroup	wxpqdicerrors	Error codes in wxpqdic. */
/**@{*/

/**	No error occured.
*/
#define	WXPQDIC_ERROR_NONE		0

/**	Failed to set up internal data structures.
*/
#define	WXPQDIC_ERROR_INIT		1

/**	Failed to find user name (not found or too long)!
*/
#define WXPQDIC_ERROR_NO_USER_NAME	2

/**	Host name not configured.
*/
#define	WXPQDIC_ERROR_NO_HOST_NAME	3

/**	Port number not conifgured.
*/
#define	WXPQDIC_ERROR_NO_PORT_NUMBER	4

/**	Queue name not configured.
*/
#define	WXPQDIC_ERROR_NO_QUEUE_NAME	5

/**	Not enough memory.
*/
#define WXPQDIC_ERROR_MEMORY		6

/**	No request configured.
*/
#define	WXPQDIC_ERROR_NO_REQUEST	7

/**	Failed to connect to server.
*/
#define WXPQDIC_ERROR_CONNECT_FAILED	8

/**	Failed to send request to server.
*/
#define WXPQDIC_ERROR_SEND_FAILED	9

/**	Failed to shutdown server socket.
*/
#define	WXPQDIC_ERROR_SHUTDOWN		10

/**	Server did not send a response.
*/
#define WXPQDIC_ERROR_NO_RESPONSE	11

/**	Response from server invalid.
*/
#define WXPQDIC_ERROR_INVALID_RESPONSE	12

/**@}*/



#define	WXPQDI_USER_NAME_SIZE		64

#define	WXPQDI_QUEUE_NAME_SIZE		64

#endif
/* ifndef DKWXPQDC_H_INCLUDED */