From 5c7347232554f280efffb336c4d4fae8009235bb Mon Sep 17 00:00:00 2001 From: Perry Werneck Date: Mon, 12 Nov 2018 09:08:39 -0200 Subject: [PATCH] Removendo includes da lib3270 do projeto do aplicativo. --- .gitignore | 1 + configure.ac | 3 ++- src/include/lib3270/X11keysym.h | 217 ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/include/lib3270/action_table.h | 91 ------------------------------------------------------------------------------------------- src/include/lib3270/actions.h | 58 ---------------------------------------------------------- src/include/lib3270/charset.h | 74 -------------------------------------------------------------------------- src/include/lib3270/filetransfer.h | 194 -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- src/include/lib3270/html.h | 53 ----------------------------------------------------- src/include/lib3270/internals.h | 48 ------------------------------------------------ src/include/lib3270/log.h | 80 -------------------------------------------------------------------------------- src/include/lib3270/macros.h | 36 ------------------------------------ src/include/lib3270/popup.h | 76 ---------------------------------------------------------------------------- src/include/lib3270/selection.h | 153 --------------------------------------------------------------------------------------------------------------------------------------------------------- src/include/lib3270/session.h | 96 ------------------------------------------------------------------------------------------------ src/include/lib3270/trace.h | 95 ----------------------------------------------------------------------------------------------- 15 files changed, 3 insertions(+), 1272 deletions(-) delete mode 100644 src/include/lib3270/X11keysym.h delete mode 100644 src/include/lib3270/action_table.h delete mode 100644 src/include/lib3270/actions.h delete mode 100644 src/include/lib3270/charset.h delete mode 100644 src/include/lib3270/filetransfer.h delete mode 100644 src/include/lib3270/html.h delete mode 100644 src/include/lib3270/internals.h delete mode 100644 src/include/lib3270/log.h delete mode 100644 src/include/lib3270/macros.h delete mode 100644 src/include/lib3270/popup.h delete mode 100644 src/include/lib3270/selection.h delete mode 100644 src/include/lib3270/session.h delete mode 100644 src/include/lib3270/trace.h diff --git a/.gitignore b/.gitignore index 0a5c8a3..9aaeb04 100644 --- a/.gitignore +++ b/.gitignore @@ -48,3 +48,4 @@ resources.rc makeruntime.sh scripts locale +*.xz diff --git a/configure.ac b/configure.ac index 37c3e78..bacbaeb 100644 --- a/configure.ac +++ b/configure.ac @@ -401,8 +401,9 @@ dnl --------------------------------------------------------------------------- AC_ARG_WITH([libname], [AS_HELP_STRING([--with-libname], [Setup library name])], [ app_cv_libname="$withval" ],[ app_cv_libname="3270" ]) +AC_SUBST(LIB3270_LIBPATH,$ac_pwd/modules/lib3270/src/include) -AC_SUBST(LIB3270_CFLAGS,-I$ac_pwd/src/include) +AC_SUBST(LIB3270_CFLAGS,-I$ac_pwd/modules/lib3270/src/include) AC_SUBST(LIB3270_LIBS,-l$app_cv_libname) AC_SUBST(PW3270_LIBS,-l$PACKAGE_TARNAME) diff --git a/src/include/lib3270/X11keysym.h b/src/include/lib3270/X11keysym.h deleted file mode 100644 index 7c086ef..0000000 --- a/src/include/lib3270/X11keysym.h +++ /dev/null @@ -1,217 +0,0 @@ -/* - * Copyright 1999 by Paul Mattes. - * Permission to use, copy, modify, and distribute this software and its - * documentation for any purpose and without fee is hereby granted, - * provided that the above copyright notice appear in all copies and that - * both that copyright notice and this permission notice appear in - * supporting documentation. - * - * c3270, s3270 and tcl3270 are distributed in the hope that they will - * be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the file LICENSE - * for more details. - */ - -/* X11 keysyms used by c3270, s3270 and tcl3270 */ - -#if !defined(_x11_keysym_h) /*[*/ -#define _x11_keysym_h 1 - -/* Latin-1 Keysyms */ -#define XK_space 0x020 -#define XK_exclam 0x021 -#define XK_quotedbl 0x022 -#define XK_numbersign 0x023 -#define XK_dollar 0x024 -#define XK_percent 0x025 -#define XK_ampersand 0x026 -#define XK_apostrophe 0x027 -#define XK_quoteright 0x027 -#define XK_parenleft 0x028 -#define XK_parenright 0x029 -#define XK_asterisk 0x02a -#define XK_plus 0x02b -#define XK_comma 0x02c -#define XK_minus 0x02d -#define XK_period 0x02e -#define XK_slash 0x02f -#define XK_0 0x030 -#define XK_1 0x031 -#define XK_2 0x032 -#define XK_3 0x033 -#define XK_4 0x034 -#define XK_5 0x035 -#define XK_6 0x036 -#define XK_7 0x037 -#define XK_8 0x038 -#define XK_9 0x039 -#define XK_colon 0x03a -#define XK_semicolon 0x03b -#define XK_less 0x03c -#define XK_equal 0x03d -#define XK_greater 0x03e -#define XK_question 0x03f -#define XK_at 0x040 -#define XK_A 0x041 -#define XK_B 0x042 -#define XK_C 0x043 -#define XK_D 0x044 -#define XK_E 0x045 -#define XK_F 0x046 -#define XK_G 0x047 -#define XK_H 0x048 -#define XK_I 0x049 -#define XK_J 0x04a -#define XK_K 0x04b -#define XK_L 0x04c -#define XK_M 0x04d -#define XK_N 0x04e -#define XK_O 0x04f -#define XK_P 0x050 -#define XK_Q 0x051 -#define XK_R 0x052 -#define XK_S 0x053 -#define XK_T 0x054 -#define XK_U 0x055 -#define XK_V 0x056 -#define XK_W 0x057 -#define XK_X 0x058 -#define XK_Y 0x059 -#define XK_Z 0x05a -#define XK_bracketleft 0x05b -#define XK_backslash 0x05c -#define XK_bracketright 0x05d -#define XK_asciicircum 0x05e -#define XK_underscore 0x05f -#define XK_grave 0x060 -#define XK_quoteleft 0x060 -#define XK_a 0x061 -#define XK_b 0x062 -#define XK_c 0x063 -#define XK_d 0x064 -#define XK_e 0x065 -#define XK_f 0x066 -#define XK_g 0x067 -#define XK_h 0x068 -#define XK_i 0x069 -#define XK_j 0x06a -#define XK_k 0x06b -#define XK_l 0x06c -#define XK_m 0x06d -#define XK_n 0x06e -#define XK_o 0x06f -#define XK_p 0x070 -#define XK_q 0x071 -#define XK_r 0x072 -#define XK_s 0x073 -#define XK_t 0x074 -#define XK_u 0x075 -#define XK_v 0x076 -#define XK_w 0x077 -#define XK_x 0x078 -#define XK_y 0x079 -#define XK_z 0x07a -#define XK_braceleft 0x07b -#define XK_bar 0x07c -#define XK_braceright 0x07d -#define XK_asciitilde 0x07e -#define XK_nobreakspace 0x0a0 -#define XK_exclamdown 0x0a1 -#define XK_cent 0x0a2 -#define XK_sterling 0x0a3 -#define XK_currency 0x0a4 -#define XK_yen 0x0a5 -#define XK_brokenbar 0x0a6 -#define XK_section 0x0a7 -#define XK_diaeresis 0x0a8 -#define XK_copyright 0x0a9 -#define XK_ordfeminine 0x0aa -#define XK_guillemotleft 0x0ab -#define XK_notsign 0x0ac -#define XK_hyphen 0x0ad -#define XK_registered 0x0ae -#define XK_macron 0x0af -#define XK_degree 0x0b0 -#define XK_plusminus 0x0b1 -#define XK_twosuperior 0x0b2 -#define XK_threesuperior 0x0b3 -#define XK_acute 0x0b4 -#define XK_mu 0x0b5 -#define XK_paragraph 0x0b6 -#define XK_periodcentered 0x0b7 -#define XK_cedilla 0x0b8 -#define XK_onesuperior 0x0b9 -#define XK_masculine 0x0ba -#define XK_guillemotright 0x0bb -#define XK_onequarter 0x0bc -#define XK_onehalf 0x0bd -#define XK_threequarters 0x0be -#define XK_questiondown 0x0bf -#define XK_Agrave 0x0c0 -#define XK_Aacute 0x0c1 -#define XK_Acircumflex 0x0c2 -#define XK_Atilde 0x0c3 -#define XK_Adiaeresis 0x0c4 -#define XK_Aring 0x0c5 -#define XK_AE 0x0c6 -#define XK_Ccedilla 0x0c7 -#define XK_Egrave 0x0c8 -#define XK_Eacute 0x0c9 -#define XK_Ecircumflex 0x0ca -#define XK_Ediaeresis 0x0cb -#define XK_Igrave 0x0cc -#define XK_Iacute 0x0cd -#define XK_Icircumflex 0x0ce -#define XK_Idiaeresis 0x0cf -#define XK_ETH 0x0d0 -#define XK_Eth 0x0d0 -#define XK_Ntilde 0x0d1 -#define XK_Ograve 0x0d2 -#define XK_Oacute 0x0d3 -#define XK_Ocircumflex 0x0d4 -#define XK_Otilde 0x0d5 -#define XK_Odiaeresis 0x0d6 -#define XK_multiply 0x0d7 -#define XK_Ooblique 0x0d8 -#define XK_Ugrave 0x0d9 -#define XK_Uacute 0x0da -#define XK_Ucircumflex 0x0db -#define XK_Udiaeresis 0x0dc -#define XK_Yacute 0x0dd -#define XK_THORN 0x0de -#define XK_Thorn 0x0de -#define XK_ssharp 0x0df -#define XK_agrave 0x0e0 -#define XK_aacute 0x0e1 -#define XK_acircumflex 0x0e2 -#define XK_atilde 0x0e3 -#define XK_adiaeresis 0x0e4 -#define XK_aring 0x0e5 -#define XK_ae 0x0e6 -#define XK_ccedilla 0x0e7 -#define XK_egrave 0x0e8 -#define XK_eacute 0x0e9 -#define XK_ecircumflex 0x0ea -#define XK_ediaeresis 0x0eb -#define XK_igrave 0x0ec -#define XK_iacute 0x0ed -#define XK_icircumflex 0x0ee -#define XK_idiaeresis 0x0ef -#define XK_eth 0x0f0 -#define XK_ntilde 0x0f1 -#define XK_ograve 0x0f2 -#define XK_oacute 0x0f3 -#define XK_ocircumflex 0x0f4 -#define XK_otilde 0x0f5 -#define XK_odiaeresis 0x0f6 -#define XK_division 0x0f7 -#define XK_oslash 0x0f8 -#define XK_ugrave 0x0f9 -#define XK_uacute 0x0fa -#define XK_ucircumflex 0x0fb -#define XK_udiaeresis 0x0fc -#define XK_yacute 0x0fd -#define XK_thorn 0x0fe -#define XK_ydiaeresis 0x0ff - -#endif /*]*/ diff --git a/src/include/lib3270/action_table.h b/src/include/lib3270/action_table.h deleted file mode 100644 index 3c0b1f5..0000000 --- a/src/include/lib3270/action_table.h +++ /dev/null @@ -1,91 +0,0 @@ -/* - * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como actions.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * - */ - - /* - * Action call table. - * - * Usually this definitions are used to declare lib3270's action table but, - * if you redefine the creation macros it can be used to build a callback - * table for g_object_connect calls. - * - */ - - /* Keyboard actions */ - DECLARE_LIB3270_KEY_ACTION( enter ) - - DECLARE_LIB3270_FKEY_ACTION( pfkey ) - DECLARE_LIB3270_FKEY_ACTION( pakey ) - - /* Cursor movement */ - DECLARE_LIB3270_CURSOR_ACTION( up ) - DECLARE_LIB3270_CURSOR_ACTION( down ) - DECLARE_LIB3270_CURSOR_ACTION( left ) - DECLARE_LIB3270_CURSOR_ACTION( right ) - DECLARE_LIB3270_CURSOR_ACTION( newline ) - - /* Misc actions */ - DECLARE_LIB3270_ACTION( kybdreset ) - DECLARE_LIB3270_ACTION( clear ) - DECLARE_LIB3270_ACTION( eraseinput ) - - DECLARE_LIB3270_ACTION( select_field ) - DECLARE_LIB3270_ACTION( select_all ) - DECLARE_LIB3270_ACTION( unselect ) - DECLARE_LIB3270_ACTION( reselect ) - - DECLARE_LIB3270_ACTION( firstfield ) - DECLARE_LIB3270_ACTION( eraseeof ) - DECLARE_LIB3270_ACTION( eraseeol ) - DECLARE_LIB3270_ACTION( erase ) - DECLARE_LIB3270_ACTION( delete ) - DECLARE_LIB3270_ACTION( dup ) - DECLARE_LIB3270_ACTION( fieldmark ) - - DECLARE_LIB3270_ACTION( backspace ) - DECLARE_LIB3270_ACTION( previousword ) - DECLARE_LIB3270_ACTION( nextword ) - DECLARE_LIB3270_ACTION( fieldend ) - - DECLARE_LIB3270_ACTION( nextfield ) - DECLARE_LIB3270_ACTION( previousfield ) - - DECLARE_LIB3270_ACTION( attn ) - DECLARE_LIB3270_ACTION( break ) - DECLARE_LIB3270_ACTION( pastenext ) - - DECLARE_LIB3270_ACTION( deleteword ) - DECLARE_LIB3270_ACTION( deletefield ) - DECLARE_LIB3270_ACTION( sysreq ) - - DECLARE_LIB3270_ACTION( testpattern ) - DECLARE_LIB3270_ACTION( charsettable ) - - diff --git a/src/include/lib3270/actions.h b/src/include/lib3270/actions.h deleted file mode 100644 index ce16be4..0000000 --- a/src/include/lib3270/actions.h +++ /dev/null @@ -1,58 +0,0 @@ -/* - * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como actions.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) - * - */ - -#ifdef __cplusplus - extern "C" { -#endif - - // Standard actions - #define DECLARE_LIB3270_ACTION( name ) LIB3270_EXPORT int lib3270_ ## name (H3270 *hSession); - #define LIB3270_ACTION( name ) LIB3270_EXPORT int lib3270_ ## name (H3270 *hSession) - - // Single key actions - #define DECLARE_LIB3270_KEY_ACTION( name ) LIB3270_EXPORT int lib3270_ ## name (H3270 *hSession); - #define LIB3270_KEY_ACTION( name ) LIB3270_EXPORT int lib3270_ ## name (H3270 *hSession) - - // Cursor actions - #define DECLARE_LIB3270_CURSOR_ACTION( name ) LIB3270_EXPORT int lib3270_cursor_ ## name (H3270 *hSession); - #define LIB3270_CURSOR_ACTION( name ) LIB3270_EXPORT int lib3270_cursor_ ## name (H3270 *hSession) - - // PF & PA key actions - #define DECLARE_LIB3270_FKEY_ACTION( name ) LIB3270_EXPORT int lib3270_ ## name (H3270 *hSession, int key); - #define LIB3270_FKEY_ACTION( name ) LIB3270_EXPORT int lib3270_ ## name (H3270 *hSession, int key) - - // Load action table entries - #include - -#ifdef __cplusplus - } -#endif diff --git a/src/include/lib3270/charset.h b/src/include/lib3270/charset.h deleted file mode 100644 index d555886..0000000 --- a/src/include/lib3270/charset.h +++ /dev/null @@ -1,74 +0,0 @@ -/* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como charset.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * - */ - -#ifndef LIB3270_CHARSET_H_INCLUDED - - #define LIB3270_CHARSET_H_INCLUDED 1 - -#ifdef __cplusplus - extern "C" { -#endif - - struct lib3270_charset - { - char * host; - char * display; - unsigned long cgcsgid; - - // Translation tables - unsigned short ebc2asc[256]; - unsigned short asc2ebc[256]; - - unsigned short asc2uc[256]; - - }; - - typedef enum - { - CS_ONLY, - FT_ONLY, - BOTH - } lib3270_remap_scope; - - LIB3270_EXPORT int lib3270_set_host_charset(H3270 *hSession, const char *name); - LIB3270_EXPORT const char * lib3270_get_host_charset(H3270 *hSession); - LIB3270_EXPORT void lib3270_reset_charset(H3270 *hSession, const char * host, const char * display, unsigned long cgcsgid); - - LIB3270_EXPORT void lib3270_remap_char(H3270 *hSession, unsigned short ebc, unsigned short iso, lib3270_remap_scope scope, unsigned char one_way); - LIB3270_EXPORT const char * lib3270_ebc2asc(H3270 *hSession, unsigned char *buffer, int sz); - LIB3270_EXPORT const char * lib3270_asc2ebc(H3270 *hSession, unsigned char *buffer, int sz); - - -#ifdef __cplusplus - } -#endif - -#endif // LIB3270_CHARSET_H_INCLUDED diff --git a/src/include/lib3270/filetransfer.h b/src/include/lib3270/filetransfer.h deleted file mode 100644 index 9b0a3ae..0000000 --- a/src/include/lib3270/filetransfer.h +++ /dev/null @@ -1,194 +0,0 @@ -/* - * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como filetransfer.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) - * - */ - -#ifndef LIB3270_FILETRANSFER_INCLUDED - - #define LIB3270_FILETRANSFER_INCLUDED 1 - #include - #include - #include - - typedef enum _lib3270_FT_OPTION - { - LIB3270_FT_OPTION_SEND = 0x0000, - - LIB3270_FT_OPTION_RECEIVE = 0x0001, - LIB3270_FT_OPTION_ASCII = 0x0002, ///< @brief Convert to ascii - LIB3270_FT_OPTION_CRLF = 0x0004, ///< @brief Add crlf to each line - LIB3270_FT_OPTION_APPEND = 0x0008, - LIB3270_FT_OPTION_REMAP = 0x0010, ///< @brief Remap ASCII<->EBCDIC - LIB3270_FT_OPTION_UNIX = 0x0020, ///< @brief Unix text file - - LIB3270_FT_RECORD_FORMAT_DEFAULT = 0x0000, - LIB3270_FT_RECORD_FORMAT_FIXED = 0x0100, - LIB3270_FT_RECORD_FORMAT_VARIABLE = 0x0200, - LIB3270_FT_RECORD_FORMAT_UNDEFINED = 0x0300, - - LIB3270_FT_ALLOCATION_UNITS_DEFAULT = 0x0000, - LIB3270_FT_ALLOCATION_UNITS_TRACKS = 0x1000, - LIB3270_FT_ALLOCATION_UNITS_CYLINDERS = 0x2000, - LIB3270_FT_ALLOCATION_UNITS_AVBLOCK = 0x3000 - - } LIB3270_FT_OPTION; - - #define LIB3270_FT_ALLOCATION_UNITS_MASK LIB3270_FT_ALLOCATION_UNITS_AVBLOCK - #define LIB3270_FT_RECORD_FORMAT_MASK LIB3270_FT_RECORD_FORMAT_UNDEFINED - - typedef enum _lib3270_ft_value - { - - LIB3270_FT_VALUE_LRECL, - LIB3270_FT_VALUE_BLKSIZE, - LIB3270_FT_VALUE_PRIMSPACE, - LIB3270_FT_VALUE_SECSPACE, - LIB3270_FT_VALUE_DFT, - - LIB3270_FT_VALUE_COUNT - - } LIB3270_FT_VALUE; - - typedef enum _lib3270_ft_state - { - LIB3270_FT_STATE_NONE, /**< No transfer in progress */ - LIB3270_FT_STATE_AWAIT_ACK, /**< IND$FILE sent, awaiting acknowledgement message */ - LIB3270_FT_STATE_RUNNING, /**< Ack received, data flowing */ - LIB3270_FT_STATE_ABORT_WAIT, /**< Awaiting chance to send an abort */ - LIB3270_FT_STATE_ABORT_SENT /**< Abort sent; awaiting response */ - } LIB3270_FT_STATE; - - #define LIB3270_XLATE_NBUF 4 - - struct lib3270_ft_callbacks - { - void (*complete)(H3270 *hSession, unsigned long length,double kbytes_sec,const char *msg, void *userdata); - void (*failed)(H3270 *hSession, unsigned long length,double kbytes_sec,const char *msg, void *userdata); - void (*message)(H3270 *hSession, const char *msg, void *userdata); - void (*update)(H3270 *hSession, unsigned long current, unsigned long length, double kbytes_sec, void *userdata); - void (*running)(H3270 *hSession, int is_cut, void *userdata); - void (*aborting)(H3270 *hSession, void *userdata); - void (*state_changed)(H3270 *hSession, LIB3270_FT_STATE state, const char *text, void *userdata); - }; - - /** - * @brief File transfer data. - * - */ - struct _h3270ft - { - struct lib3270_ft_callbacks cbk; ///< @brief Callback table - Always the first one. - - int ft_last_cr : 1; ///< @brief CR was last char in local file - int remap_flag : 1; ///< @brief Remap ASCII<->EBCDIC - int cr_flag : 1; ///< @brief Add crlf to each line - int unix_text : 1; ///< @brief Following the convention for UNIX text files. - int message_flag : 1; ///< @brief Open Request for msg received - int ascii_flag : 1; ///< @brief Convert to ascii - int ft_is_cut : 1; ///< @brief File transfer is CUT-style - int dft_eof : 1; - - - H3270 * host; - void * user_data; ///< @brief File transfer dialog handle - FILE * local_file; ///< @brief File descriptor for local file - unsigned long length; ///< @brief File length - - LIB3270_FT_STATE state; - LIB3270_FT_OPTION flags; - - int lrecl; - int blksize; - int primspace; - int secspace; - int dft; - - unsigned long ft_length; ///< Length of transfer - - struct timeval starting_time; ///< Starting time - - const char * local; ///< Local filename - const char * remote; ///< Remote filename - - // ft_dft.c - char * abort_string; - unsigned long recnum; - unsigned char * dft_savebuf; - int dft_savebuf_len; - int dft_savebuf_max; - - // ft_cut.c - int quadrant; - unsigned long expanded_length; - char * saved_errmsg; - int xlate_buffered; ///< buffer count - int xlate_buf_ix; ///< buffer index - unsigned char xlate_buf[LIB3270_XLATE_NBUF]; ///< buffer - - // Charset - struct lib3270_charset charset; - - }; - - - - /** - * Create a new file transfer session. - * - * @param session - * @param flags - * @param local - * @param remote - * @param lrecl - * @param blksize - * @param primspace - * @param secspace - * @param dft - * @param msg Pointer to receive message text. - * - * @return Filetransfer callback table - * - */ - LIB3270_EXPORT H3270FT * lib3270_ft_new(H3270 *hSession, LIB3270_FT_OPTION flags, const char *local, const char *remote, int lrecl, int blksize, int primspace, int secspace, int dft, const char **msg); - - LIB3270_EXPORT int lib3270_ft_start(H3270 *hSession); - LIB3270_EXPORT int lib3270_ft_destroy(H3270 *hSession); - - LIB3270_EXPORT int lib3270_ft_cancel(H3270 *hSession, int force); - - LIB3270_EXPORT void lib3270_ft_set_user_data(H3270 *h, void *ptr); - LIB3270_EXPORT void * lib3270_ft_get_user_data(H3270 *h); - - LIB3270_EXPORT LIB3270_FT_STATE lib3270_get_ft_state(H3270 *session); - - LIB3270_EXPORT struct lib3270_ft_callbacks * lib3270_get_ft_callbacks(H3270 *session, unsigned short sz); - - -#endif // LIB3270_FILETRANSFER_INCLUDED diff --git a/src/include/lib3270/html.h b/src/include/lib3270/html.h deleted file mode 100644 index d4c5072..0000000 --- a/src/include/lib3270/html.h +++ /dev/null @@ -1,53 +0,0 @@ -/* - * "Software G3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como html.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * - */ - -#ifndef LIB3270_HTML_H_INCLUDED - - #define LIB3270_HTML_H_INCLUDED 1 - -#ifdef __cplusplus - extern "C" { -#endif - - typedef enum _lib3270_html_option - { - LIB3270_HTML_OPTION_ALL = 0x0001, - LIB3270_HTML_OPTION_HEADERS = 0x0002, - LIB3270_HTML_OPTION_FORM = 0x0004, - - } LIB3270_HTML_OPTION; - - - LIB3270_EXPORT char * lib3270_get_as_html(H3270 *session, LIB3270_HTML_OPTION option); - -#ifdef __cplusplus - } -#endif - -#endif // LIB3270_HTML_H_INCLUDED - diff --git a/src/include/lib3270/internals.h b/src/include/lib3270/internals.h deleted file mode 100644 index 135c366..0000000 --- a/src/include/lib3270/internals.h +++ /dev/null @@ -1,48 +0,0 @@ -/* - * "Software G3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como internals.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * - */ - -#ifndef LIB3270_INTERNALS_H_INCLUDED - - #define LIB3270_INTERNALS_H_INCLUDED 1 - -#ifdef __cplusplus - extern "C" { -#endif - - LIB3270_EXPORT void lib3270_data_recv(H3270 *hSession, size_t nr, const unsigned char *netrbuf); - LIB3270_EXPORT void lib3270_set_disconnected(H3270 *hSession); - LIB3270_EXPORT void lib3270_set_connected(H3270 *hSession); - LIB3270_EXPORT void lib3270_setup_session(H3270 *session); - - -#ifdef __cplusplus - } -#endif - -#endif // LIB3270_HTML_H_INCLUDED - diff --git a/src/include/lib3270/log.h b/src/include/lib3270/log.h deleted file mode 100644 index 7a69ea2..0000000 --- a/src/include/lib3270/log.h +++ /dev/null @@ -1,80 +0,0 @@ -/* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como log.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * - */ - - #ifndef LIB3270_LOG_H_INCLUDED - - #include - - #define LIB3270_LOG_H_INCLUDED 1 - - #ifdef ANDROID - - #include - - #define DEBUG 1 - - #define lib3270_write_log(s,m,f,...) __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, f "\n", __VA_ARGS__ ) - #define lib3270_write_rc(s,m,r,f,...) __android_log_print(ANDROID_LOG_VERBOSE, PACKAGE_NAME, f "\n", __VA_ARGS__ ) - #define lib3270_write_va_log(s,m,f,a) __android_log_vprint(ANDROID_LOG_VERBOSE, PACKAGE_NAME, f "\n", a) - - // #define trace( fmt, ... ) __android_log_print(ANDROID_LOG_DEBUG, PACKAGE_NAME, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); - #define trace(x, ...) // __VA_ARGS__ - - #else - - #ifdef __cplusplus - extern "C" { - #endif - - LIB3270_EXPORT void lib3270_set_log_handler(void (*loghandler)(H3270 *, const char *, int, const char *, va_list)); - LIB3270_EXPORT int lib3270_write_log(H3270 *session, const char *module, const char *fmt, ...) LIB3270_GNUC_FORMAT(3,4); - LIB3270_EXPORT int lib3270_write_rc(H3270 *session, const char *module, int rc, const char *fmt, ...) LIB3270_GNUC_FORMAT(4,5); - LIB3270_EXPORT void lib3270_write_va_log(H3270 *session, const char *module, const char *fmt, va_list arg); - - #ifdef DEBUG - #include - #undef trace - #define trace( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr); - #define debug( fmt, ... ) fprintf(stderr, "%s(%d) " fmt "\n", __FILE__, __LINE__, __VA_ARGS__ ); fflush(stderr); - #else - #undef trace - #define trace(x, ...) // __VA_ARGS__ - #define debug(x, ...) // __VA_ARGS__ - #endif - - #ifdef __cplusplus - } - #endif - - #endif // ANDROID - - - #endif // LIB3270_LOG_H_INCLUDED - - diff --git a/src/include/lib3270/macros.h b/src/include/lib3270/macros.h deleted file mode 100644 index 7af7523..0000000 --- a/src/include/lib3270/macros.h +++ /dev/null @@ -1,36 +0,0 @@ -/* - * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como macros.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * macmiranda@bb.com.br (Marco Aurélio Caldas Miranda) - * - */ - - #define LIB3270_MACRO( name ) LIB3270_EXPORT char * lib3270_macro_ ## name (H3270 *hSession, int argc, const char **argv) - - LIB3270_EXPORT char * lib3270_run_macro(H3270 *session, const char **argv); - diff --git a/src/include/lib3270/popup.h b/src/include/lib3270/popup.h deleted file mode 100644 index 644dd3f..0000000 --- a/src/include/lib3270/popup.h +++ /dev/null @@ -1,76 +0,0 @@ -/* - * "Software PW3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como api.h e possui 444 linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas de Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * - */ - -#ifndef LIB3270_POPUP_INCLUDED - - #define LIB3270_POPUP_INCLUDED 1 - -#ifdef __cplusplus - extern "C" { -#endif - - /** - * Notification message types. - * - */ - typedef enum _LIB3270_NOTIFY - { - LIB3270_NOTIFY_INFO, /**< Simple information dialog */ - LIB3270_NOTIFY_WARNING, - LIB3270_NOTIFY_ERROR, - LIB3270_NOTIFY_CRITICAL, /**< Critical error, user can abort application */ - - LIB3270_NOTIFY_USER /**< Reserved, always the last one */ - } LIB3270_NOTIFY; - - LIB3270_EXPORT void lib3270_set_popup_handler(int (*popup_handler)(H3270 *, void *, LIB3270_NOTIFY, const char *, const char *, const char *, va_list)); - - /** - * Pop up an error dialog, based on an error number. - * - * @param hSession Session handle - * @param errn Error number (errno). - * @param fmt Message format - * @param ... Arguments for message - */ - LIB3270_EXPORT void lib3270_popup_an_errno(H3270 *hSession, int errn, const char *fmt, ...); - - LIB3270_EXPORT void lib3270_popup_dialog(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, ...); - - LIB3270_EXPORT void lib3270_popup_va(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *fmt, va_list); - -#ifdef __cplusplus - } -#endif - -#endif // LIB3270_POPUP_INCLUDED - - diff --git a/src/include/lib3270/selection.h b/src/include/lib3270/selection.h deleted file mode 100644 index e90ae34..0000000 --- a/src/include/lib3270/selection.h +++ /dev/null @@ -1,153 +0,0 @@ -/* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como selection.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * licinio@bb.com.br (Licínio Luis Branco) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * - */ - - #ifndef LIB3270_SELECTION_H_INCLUDED - - #define LIB3270_SELECTION_H_INCLUDED 1 - - LIB3270_EXPORT int lib3270_unselect(H3270 *session); - LIB3270_EXPORT void lib3270_select_to(H3270 *session, int baddr); - LIB3270_EXPORT int lib3270_select_word_at(H3270 *session, int baddr); - LIB3270_EXPORT int lib3270_select_field_at(H3270 *session, int baddr); - LIB3270_EXPORT int lib3270_select_field(H3270 *session); - LIB3270_EXPORT int lib3270_select_all(H3270 *session); - - /** - * "Paste" supplied string. - * - * @param h Session handle. - * @param str String to paste. - * - * @see lib3270_pastenext. - * - * @return Non 0 if there's more to paste with lib3270_pastenext - * - */ - LIB3270_EXPORT int lib3270_paste(H3270 *h, const unsigned char *str); - - /** - * Paste remaining string. - * - * @param h Session handle. - * - * @see lib3270_paste. - * - * @return Non 0 if there's more to paste. - * - */ - LIB3270_EXPORT int lib3270_pastenext(H3270 *h); - - /** - * Move selected box 1 char in the selected direction. - * - * @param h Session handle. - * @param dir Direction to move - * - * @return 0 if the movement can be done, non zero if failed. - */ - LIB3270_EXPORT int lib3270_move_selection(H3270 *h, LIB3270_DIRECTION dir); - - /** - * Move selected box. - * - * @param h Session handle. - * @param from Address of origin position inside the selected buffer. - * @param to Address of the new origin position. - * - * @return The new origin position. - * - */ - LIB3270_EXPORT int lib3270_move_selected_area(H3270 *h, int from, int to); - - /** - * Drag selected region. - * - * Move or resize selected box according to the selection flags. - * - * @param h Session handle. - * @param flag Selection flag. - * @param origin Reference position (got from mouse button down or other move action). - * @param baddr New position. - * - * @return The new reference position. - * - */ - LIB3270_EXPORT int lib3270_drag_selection(H3270 *h, unsigned char flag, int origin, int baddr); - - /** - * Gets the selected range of characters in the screen - * - * @param h Session handle. - * @param start return location for start of selection, as a character offset. - * @param end return location for end of selection, as a character offset. - * - * @return Non 0 if selection is non-empty - * - */ - LIB3270_EXPORT int lib3270_get_selection_bounds(H3270 *hSession, int *start, int *end); - - /** - * Get bitmasked flag for the current selection. - * - * Calculate flags to help drawing of the correct mouse pointer over a selection. - * - * @param h Session handle. - * @param baddr Position. - * - * @return bitmask for mouse pointer. - */ - LIB3270_EXPORT unsigned char lib3270_get_selection_flags(H3270 *h, int baddr); - - /** - * Get a string from required region. - * - * @param h Session handle. - * @param start_pos First char to get. - * @param end_pos Last char to get. - * @param all zero to get only selected chars. - * - * @return String with selected region (release it with free() - * - */ - LIB3270_EXPORT char * lib3270_get_region(H3270 *h, int start_pos, int end_pos, unsigned char all); - - - /** - * Selects a range of characters in the screen. - * - * @param h Session handle. - * @param start_offset Start offset. - * @param end_offset : End offset. - * - */ - LIB3270_EXPORT int lib3270_select_region(H3270 *h, int start, int end); - - #endif // LIB3270_SELECTION_H_INCLUDED diff --git a/src/include/lib3270/session.h b/src/include/lib3270/session.h deleted file mode 100644 index 0fe758e..0000000 --- a/src/include/lib3270/session.h +++ /dev/null @@ -1,96 +0,0 @@ -/* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como session.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * - */ - - #ifndef LIB3270_SESSION_H_INCLUDED - - #define LIB3270_SESSION_H_INCLUDED 1 - - #ifdef WIN32 - #include - #include - #include - #else - #include - #endif // WIN32 - - #include - - struct lib3270_session_callbacks - { - int (*write)(H3270 *hSession, unsigned const char *buf, int len); - void (*disconnect)(H3270 *hSession); - - void (*configure)(H3270 *session, unsigned short rows, unsigned short cols); - void (*update)(H3270 *session, int baddr, unsigned char c, unsigned short attr, unsigned char cursor); - void (*changed)(H3270 *session, int offset, int len); - void (*display)(H3270 *session); - void (*set_width)(H3270 *session, int width); - - void (*update_cursor)(H3270 *session, unsigned short row, unsigned short col, unsigned char c, unsigned short attr); - void (*update_oia)(H3270 *session, LIB3270_FLAG id, unsigned char on); - void (*update_toggle)(H3270 *session, LIB3270_TOGGLE ix, unsigned char value, LIB3270_TOGGLE_TYPE reason, const char *name); - void (*update_luname)(H3270 *session, const char *name); - void (*update_status)(H3270 *session, LIB3270_MESSAGE id); - void (*update_connect)(H3270 *session, unsigned char connected); - void (*update_model)(H3270 *session, const char *name, int model, int rows, int cols); - void (*update_selection)(H3270 *session, int start, int end); - void (*update_ssl)(H3270 *session, LIB3270_SSL_STATE state); - - void (*set_timer)(H3270 *session, unsigned char on); - void (*erase)(H3270 *session); - void (*suspend)(H3270 *session); - void (*resume)(H3270 *session); - void (*cursor)(H3270 *session, LIB3270_POINTER id); - void (*set_selection)(H3270 *session, unsigned char on); - void (*ctlr_done)(H3270 *session); - void (*autostart)(H3270 *session); - int (*print)(H3270 *session); - - void (*message)(H3270 *session, LIB3270_NOTIFY id , const char *title, const char *message, const char *text); - - }; - - /** - * Register application Handlers. - * - * @param cbk Structure with the application I/O handles to set. - * - * @return 0 if ok, error code if not. - * - */ - int LIB3270_EXPORT lib3270_set_session_callbacks(const struct lib3270_callbacks *cbk); - - LIB3270_EXPORT int lib3270_getpeername(H3270 *hSession, struct sockaddr *addr, socklen_t *addrlen); - LIB3270_EXPORT int lib3270_getsockname(H3270 *hSession, struct sockaddr *addr, socklen_t *addrlen); - - LIB3270_EXPORT struct lib3270_session_callbacks * lib3270_get_session_callbacks(H3270 *session, unsigned short sz); - -#endif // LIB3270_SESSION_H_INCLUDED - - diff --git a/src/include/lib3270/trace.h b/src/include/lib3270/trace.h deleted file mode 100644 index 576c01a..0000000 --- a/src/include/lib3270/trace.h +++ /dev/null @@ -1,95 +0,0 @@ -/* - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a - * aplicativos mainframe. Registro no INPI sob o nome G3270. - * - * Copyright (C) <2008> - * - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela - * Free Software Foundation. - * - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para - * obter mais detalhes. - * - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin - * St, Fifth Floor, Boston, MA 02110-1301 USA - * - * Este programa está nomeado como session.h e possui - linhas de código. - * - * Contatos: - * - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) - * kraucer@bb.com.br (Kraucer Fernandes Mazuco) - * - */ - -#ifndef LIB3270_TRACE_H_INCLUDED - - #define LIB3270_TRACE_H_INCLUDED 1 - -#ifdef __cplusplus - extern "C" { -#endif - -#ifdef _WIN32 - #define LIB3270_AS_PRINTF(a,b) /* __attribute__((format(printf, a, b))) */ -#else - #define LIB3270_AS_PRINTF(a,b) __attribute__((format(printf, a, b))) -#endif - - typedef void (*LIB3270_TRACE_HANDLER)(H3270 *, const char *, va_list); - - - /** - * Set trace handle callback. - * - * @param handle Callback to write in trace file or show trace window (NULL send all trace to stdout/syslog). - * @param data User data to pass to the trace handler. - * - * @return Current trace handler - */ - LIB3270_EXPORT LIB3270_TRACE_HANDLER lib3270_set_trace_handler( LIB3270_TRACE_HANDLER handler); - - /** - * Write on trace file. - * - * Write text on trace file, if DStrace is enabled. - * - * @param fmt String format. - * @param ... Arguments. - * - */ - LIB3270_EXPORT void lib3270_write_dstrace(H3270 *session, const char *fmt, ...) LIB3270_AS_PRINTF(2,3); - - /** - * Write on trace file. - * - * Write text on trace file, if network trace is enabled. - * - * @param fmt String format. - * @param ... Arguments. - * - */ - LIB3270_EXPORT void lib3270_write_nettrace(H3270 *session, const char *fmt, ...) LIB3270_AS_PRINTF(2,3); - - /** - * Write on trace file. - * - * Write text on trace file, if event is enabled. - * - * @param fmt String format. - * @param ... Arguments. - * - */ - LIB3270_EXPORT void lib3270_trace_event(H3270 *session, const char *fmt, ...) LIB3270_AS_PRINTF(2,3); - -#ifdef __cplusplus - } -#endif - -#endif // LIB3270_TRACE_H_INCLUDED -- libgit2 0.21.2