Commit 166cb3b2b377787c858453c53f744bcbe6df8233
1 parent
ae5138b9
Exists in
master
and in
1 other branch
Documenting API.
Showing
1 changed file
with
93 additions
and
6 deletions
Show diff stats
client/src/include/lib3270/ipc.h
... | ... | @@ -70,11 +70,26 @@ |
70 | 70 | |
71 | 71 | #define DEFAULT_TIMEOUT 5 |
72 | 72 | |
73 | + /** | |
74 | + * @brief Get IPC module library version. | |
75 | + * | |
76 | + * @return Constant string with the IPC module library version (It's not the same of lib3270). | |
77 | + * | |
78 | + */ | |
73 | 79 | TN3270_PUBLIC const char * getVersion(); |
80 | + | |
81 | + /** | |
82 | + * @brief Get IPC module library revision. | |
83 | + * | |
84 | + * @return Constant string with the IPC module library revision (It's not the same of lib3270). | |
85 | + * | |
86 | + */ | |
74 | 87 | TN3270_PUBLIC const char * getRevision(); |
75 | 88 | |
76 | 89 | class TN3270_PUBLIC Event { |
77 | 90 | public: |
91 | + | |
92 | + /// @brief Event type. | |
78 | 93 | enum Type : uint8_t { |
79 | 94 | All, ///< @brief All events (undefined). |
80 | 95 | Popup, ///< @brief Popup message. |
... | ... | @@ -87,6 +102,10 @@ |
87 | 102 | Type type; |
88 | 103 | |
89 | 104 | protected: |
105 | + | |
106 | + /// @brief Creates an event. | |
107 | + /// | |
108 | + /// @param Type of the event. | |
90 | 109 | Event(enum Type type); |
91 | 110 | |
92 | 111 | public: |
... | ... | @@ -111,6 +130,7 @@ |
111 | 130 | |
112 | 131 | }; |
113 | 132 | |
133 | + /// @brief TN3270 Program message. | |
114 | 134 | enum ProgramMessage : uint8_t { |
115 | 135 | MESSAGE_NONE = LIB3270_MESSAGE_NONE, ///< @brief No message |
116 | 136 | MESSAGE_SYSWAIT = LIB3270_MESSAGE_SYSWAIT, ///< @brief -- |
... | ... | @@ -145,6 +165,7 @@ |
145 | 165 | CONNECTED_TN3270E = LIB3270_CONNECTED_TN3270E, ///< @brief connected in TN3270E mode, 3270 mode |
146 | 166 | }; |
147 | 167 | |
168 | + /// @brief Security state of the connection with the host. | |
148 | 169 | enum SSLState : uint8_t { |
149 | 170 | SSL_UNSECURE = LIB3270_SSL_UNSECURE, ///< @brief No secure connection |
150 | 171 | SSL_SECURE = LIB3270_SSL_SECURE, ///< @brief Connection secure with CA check |
... | ... | @@ -153,7 +174,7 @@ |
153 | 174 | SSL_UNDEFINED = LIB3270_SSL_UNDEFINED ///< @brief Undefined |
154 | 175 | }; |
155 | 176 | |
156 | - /// @brief PF Keys | |
177 | + /// @brief PF Key | |
157 | 178 | enum PFKey : uint8_t { |
158 | 179 | PF_1, |
159 | 180 | PF_2, |
... | ... | @@ -181,14 +202,14 @@ |
181 | 202 | PF_24 |
182 | 203 | }; |
183 | 204 | |
184 | - /// @brief PF Keys | |
205 | + /// @brief PA Key | |
185 | 206 | enum PAKey : uint8_t { |
186 | 207 | PA_1, |
187 | 208 | PA_2, |
188 | 209 | PA_3 |
189 | 210 | }; |
190 | 211 | |
191 | - /// @brief Actions keys | |
212 | + /// @brief LIB3270 Action. | |
192 | 213 | enum Action : uint8_t { |
193 | 214 | ENTER, ///< @brief Enter key |
194 | 215 | ERASE, |
... | ... | @@ -282,9 +303,51 @@ |
282 | 303 | /// @brief Get contents of field at cursor position. |
283 | 304 | virtual void pop(std::string &text) = 0; |
284 | 305 | |
285 | - /** | |
286 | - * @brief Input string parsing control char. | |
287 | - */ | |
306 | + /// @brief Input string parsing control char. | |
307 | + /// | |
308 | + /// Insert string parsing the action codes prefixed with the defined control character. | |
309 | + /// | |
310 | + /// Value | Action | Description | | |
311 | + /// :----:|:------------|:-----------------------------------------------------------| | |
312 | + /// @@P | - | Print the screen contents (if available) | | |
313 | + /// @@@@ | - | Input the @@ char. | | |
314 | + /// @@E | ENTER | - | | |
315 | + /// @@F | ERASE_EOF | - | | |
316 | + /// @@1 | PF1 | Send the PF1 key. | | |
317 | + /// @@2 | PF2 | Send the PF2 key. | | |
318 | + /// @@3 | PF3 | Send the PF3 key. | | |
319 | + /// @@4 | PF4 | Send the PF4 key. | | |
320 | + /// @@5 | PF5 | Send the PF5 key. | | |
321 | + /// @@6 | PF6 | Send the PF6 key. | | |
322 | + /// @@7 | PF7 | Send the PF7 key. | | |
323 | + /// @@8 | PF8 | Send the PF8 key. | | |
324 | + /// @@9 | PF9 | Send the PF9 key. | | |
325 | + /// @@a | PF10 | Send the PF10 key. | | |
326 | + /// @@b | PF11 | Send the PF11 key. | | |
327 | + /// @@c | PF12 | Send the PF12 key. | | |
328 | + /// @@d | PF13 | Send the PF13 key. | | |
329 | + /// @@e | PF14 | Send the PF14 key. | | |
330 | + /// @@f | PF15 | Send the PF15 key. | | |
331 | + /// @@g | PF16 | Send the PF16 key. | | |
332 | + /// @@h | PF17 | Send the PF17 key. | | |
333 | + /// @@u | PF18 | Send the PF18 key. | | |
334 | + /// @@j | PF19 | Send the PF19 key. | | |
335 | + /// @@k | PF20 | Send the PF20 key. | | |
336 | + /// @@l | PF21 | Send the PF21 key. | | |
337 | + /// @@m | PF22 | Send the PF22 key. | | |
338 | + /// @@n | PF23 | Send the PF23 key. | | |
339 | + /// @@o | PF24 | Send the PF24 key. | | |
340 | + /// @@x | PA1 | Send the PA1 key. | | |
341 | + /// @@y | PA2 | Send the PA2 key. | | |
342 | + /// @@z | PA3 | Send the PA3 key. | | |
343 | + /// @@D | CHAR_DELETE | | | |
344 | + /// @@N | NEWLINE | | | |
345 | + /// @@C | CLEAR | | | |
346 | + /// @@R | KYBD_RESET | | | |
347 | + /// @@< | BACKSPACE | | | |
348 | + /// | |
349 | + /// @return The keyboard lock state. | |
350 | + /// | |
288 | 351 | LIB3270_KEYBOARD_LOCK_STATE input(const std::string &str, const char control_char = '@'); |
289 | 352 | |
290 | 353 | // Properties. |
... | ... | @@ -295,9 +358,16 @@ |
295 | 358 | virtual void setProperty(const char *name, const int value) = 0; |
296 | 359 | virtual void setProperty(const char *name, const char *value) = 0; |
297 | 360 | |
361 | + /// @brief Get the lib3270 version string. | |
298 | 362 | virtual std::string getVersion() const = 0; |
363 | + | |
364 | + /// @brief Get the lib3270 revision string. | |
299 | 365 | virtual std::string getRevision() const = 0; |
366 | + | |
367 | + /// @brief Get the LU name. | |
300 | 368 | virtual std::string getLUName() const = 0; |
369 | + | |
370 | + /// @brief Get the terminal lock state code. | |
301 | 371 | virtual LIB3270_KEYBOARD_LOCK_STATE getKeyboardLockState() const = 0; |
302 | 372 | |
303 | 373 | virtual std::string getHostURL() const = 0; |
... | ... | @@ -594,8 +664,25 @@ |
594 | 664 | |
595 | 665 | } |
596 | 666 | |
667 | + /// @brief Convert the program message to a human readable string. | |
668 | + /// | |
669 | + /// @param programMessage The program message code. | |
670 | + /// | |
671 | + /// @return Description of the program message. | |
597 | 672 | TN3270_PUBLIC const char * toCharString(const TN3270::ProgramMessage programMessage); |
673 | + | |
674 | + /// @brief Convert the connection state to a human readable string. | |
675 | + /// | |
676 | + /// @param connectionState The conection state code. | |
677 | + /// | |
678 | + /// @return Description of the connection state. | |
598 | 679 | TN3270_PUBLIC const char * toCharString(const TN3270::ConnectionState connectionState); |
680 | + | |
681 | + /// @brief Convert the action's description. | |
682 | + /// | |
683 | + /// @param The action code. | |
684 | + /// | |
685 | + /// @return The action description. | |
599 | 686 | TN3270_PUBLIC const char * toCharString(const TN3270::Action action); |
600 | 687 | |
601 | 688 | template <typename T> | ... | ... |