-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathqtvapi_h.rpgle
185 lines (170 loc) · 9.1 KB
/
qtvapi_h.rpgle
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
/*- +
* Copyright (c) 2006 Scott C. Klement +
* All rights reserved. +
* +
* Redistribution and use in source and binary forms, with or without +
* modification, are permitted provided that the following conditions +
* are met: +
* 1. Redistributions of source code must retain the above copyright +
* notice, this list of conditions and the following disclaimer. +
* 2. Redistributions in binary form must reproduce the above copyright +
* notice, this list of conditions and the following disclaimer in the +
* documentation and/or other materials provided with the distribution. +
* +
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND +
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE +
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +
* SUCH DAMAGE. +
* +
*/ +
/if defined(QTVAPI_H_DEFINED)
/eof
/endif
/define QTVAPI_H_DEFINED
*------------------------------------------------
* Virtual Terminal Handle (used by all APIs)
*------------------------------------------------
D Qtv_Handle_t s 16A based(Template)
*------------------------------------------------
* Supported Terminal Types
*------------------------------------------------
D QTV_5251_11 c const(1)
D QTV_5291_1 c const(2)
D QTV_5292_2 c const(3)
D QTV_5555_B01 c const(4)
D QTV_3196_A1 c const(5)
D QTV_3979_2 c const(6)
D QTV_3180_2 c const(7)
D QTV_3477_FC c const(8)
D QTV_3477_FG c const(9)
D QTV_5555_C01 c const(10)
D QTV_5555_G01 c const(11)
D QTV_5555_G02 c const(12)
D QTV_3486_BA c const(13)
D QTV_3487_HA c const(14)
D QTV_3487_HC c const(15)
*------------------------------------------------
* Open Feedback Information (QtvOpnVT API)
*------------------------------------------------
D Qtv_OpnFdbk_t ds qualified
D based(Template)
D BytesAvail 10I 0
D BytesRtn 10I 0
D Reason 10I 0
D DevName 10A
D 4A
*------------------------------------------------
* Session Initiation Info (QtvOpnVT API)
*
* The "data" part is made up of variable-len
* Qtv_SessRec_t structures.
*------------------------------------------------
D Qtv_SessionInit_t...
D ds qualified
D based(Template)
D RecCount 10I 0
D Data 32763A
D Qtv_SessRec_t ds qualified
D based(Template)
D Key 10I 0
D Len 10I 0
D Data 172A
D Qtv_Auto_SignOn_t...
D ds qualified
D based(Template)
D Len 10I 0
D pwCCSID 10I 0
D pwOffset 10I 0
D pwLen 10I 0
D cSeed 8A
D sSeed 8A
D UsrPrf 10A
D 2A
D Passphrase 128A
*------------------------------------------------
* Data queue info used by QtvRdVt/QtvWrtVt
*------------------------------------------------
D Qtv_DtaRec_t ds qualified
D based(Template)
D Type 10A
D ID 2A
D Handle like(Qtv_Handle_t)
D Reserved 52A
D Key 256A
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* QtvOpnVt(): Open Virtual Terminal
*
* Handle = (output) Handle to new terminal instance
* KbdLang = (input) language of keyboard (blanks=default)
* CharSet = (input) character set (0=Default)
* CodePage = (input) code page (0=Default)
* WrkStnType = (input) Type/Model of workstation (see above)
* QualDtaQ = (input) qualified data queue to which async
* notifications are sent.
* KeyVal = (input) Key to be used with data queue
* KeyValLen = (input) Length of KeyVal parm, or 0=No Key
* ErrorCode = (i/o) Standard API Error code structure
*
* Optional Group 1:
* OpenInfo = (input) Whether PC text-assist is supported
* '0' = Yes, '1' = No
*
* Optional Group 2:
* SessInit = (input) Session initiation info.
*
* Optional Group 3:
* OpnFbk = (i/o) Open Feedback Information
* OpnFbkLen = (input) size of OpnFbk parameter
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D QtvOpnVt PR extpgm('QTVOPNVT')
D Handle like(Qtv_Handle_t)
D KbdLang 3A const
D CharSet 10I 0 const
D CodePage 10I 0 const
D WrkStnType 10I 0 const
D QualDtaQ 20A const
D KeyVal 32767A const options(*varsize)
D KeyValLen 10I 0 const
D ErrorCode 32767A const options(*varsize)
* Opt Grp 1
D OpenInfo 10A const options(*nopass)
* Opt Grp 2
D SessInit like(Qtv_SessionInit_t)
D const options(*nopass)
* Opt Grp 3
D OpnFbk like(Qtv_OpnFdBk_t)
D options(*nopass)
D OpnFbkLen 10I 0 const options(*nopass)
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* QtvRdVt(): Read Virtual Terminal
*
* Handle = (input) Session handle
* ReadInfo = (output) Info about the read operation performed
* Buffer = (output) data sent to terminal
* BufSize = (input) %size() of Buffer variable
* BytesRead = (output) bytes placed in Buffer
* ErrorCode = (i/o) standard API error code structure
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D QtvRdVt PR extpgm('QTVRDVT')
D Handle like(Qtv_Handle_t) const
D ReadInfo 10A
D Buffer 32767A options(*varsize)
D BufSize 10I 0 const
D BytesRead 10I 0
D ErrorCode 32767A const options(*varsize)
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* QtvCloVt(): Close Virtual Terminal
*
* Handle = (input) Session handle
* ErrorCode = (i/o) Standard API error code structure
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
D QtvCloVt PR extpgm('QTVCLOVT')
D Handle like(Qtv_Handle_t) const
D ErrorCode 32767A const options(*varsize)