Commit a9f1002cd0cdffcfe7e28b7ce1587a42fe4ae9de
1 parent
63a33612
Exists in
master
and in
3 other branches
Adding method to get property description & summary.
Showing
4 changed files
with
68 additions
and
41 deletions
Show diff stats
lib3270.cbp
@@ -146,7 +146,7 @@ | @@ -146,7 +146,7 @@ | ||
146 | <Unit filename="src/core/properties/boolean.c"> | 146 | <Unit filename="src/core/properties/boolean.c"> |
147 | <Option compilerVar="CC" /> | 147 | <Option compilerVar="CC" /> |
148 | </Unit> | 148 | </Unit> |
149 | - <Unit filename="src/core/properties/properties.c"> | 149 | + <Unit filename="src/core/properties/get.c"> |
150 | <Option compilerVar="CC" /> | 150 | <Option compilerVar="CC" /> |
151 | </Unit> | 151 | </Unit> |
152 | <Unit filename="src/core/properties/signed.c"> | 152 | <Unit filename="src/core/properties/signed.c"> |
@@ -0,0 +1,55 @@ | @@ -0,0 +1,55 @@ | ||
1 | +/* | ||
2 | + * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | + * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | + * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270. | ||
5 | + * | ||
6 | + * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | + * | ||
8 | + * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | + * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | + * Free Software Foundation. | ||
11 | + * | ||
12 | + * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | + * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | + * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | + * obter mais detalhes. | ||
16 | + * | ||
17 | + * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | + * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | + * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | + * | ||
21 | + * Este programa está nomeado como - e possui - linhas de código. | ||
22 | + * | ||
23 | + * Contatos: | ||
24 | + * | ||
25 | + * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | + * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
27 | + * | ||
28 | + */ | ||
29 | + | ||
30 | + #include <config.h> | ||
31 | + #include <lib3270-internals.h> | ||
32 | + #include <string.h> | ||
33 | + #include <lib3270.h> | ||
34 | + #include <lib3270/properties.h> | ||
35 | + | ||
36 | + LIB3270_EXPORT const char * lib3270_property_get_description(const LIB3270_PROPERTY * property) { | ||
37 | + | ||
38 | + if(property->description) | ||
39 | + return property->description; | ||
40 | + | ||
41 | + if(property->summary) | ||
42 | + return property->summary; | ||
43 | + | ||
44 | + return property->name; | ||
45 | + | ||
46 | + } | ||
47 | + | ||
48 | + LIB3270_EXPORT const char * lib3270_property_get_summary(const LIB3270_PROPERTY * property) { | ||
49 | + | ||
50 | + if(property->summary) | ||
51 | + return property->summary; | ||
52 | + | ||
53 | + return property->name; | ||
54 | + | ||
55 | + } |
src/core/properties/properties.c
@@ -1,40 +0,0 @@ | @@ -1,40 +0,0 @@ | ||
1 | -/* | ||
2 | - * "Software pw3270, desenvolvido com base nos códigos fontes do WC3270 e X3270 | ||
3 | - * (Paul Mattes Paul.Mattes@usa.net), de emulação de terminal 3270 para acesso a | ||
4 | - * aplicativos mainframe. Registro no INPI sob o nome G3270. Registro no INPI sob o nome G3270. | ||
5 | - * | ||
6 | - * Copyright (C) <2008> <Banco do Brasil S.A.> | ||
7 | - * | ||
8 | - * Este programa é software livre. Você pode redistribuí-lo e/ou modificá-lo sob | ||
9 | - * os termos da GPL v.2 - Licença Pública Geral GNU, conforme publicado pela | ||
10 | - * Free Software Foundation. | ||
11 | - * | ||
12 | - * Este programa é distribuído na expectativa de ser útil, mas SEM QUALQUER | ||
13 | - * GARANTIA; sem mesmo a garantia implícita de COMERCIALIZAÇÃO ou de ADEQUAÇÃO | ||
14 | - * A QUALQUER PROPÓSITO EM PARTICULAR. Consulte a Licença Pública Geral GNU para | ||
15 | - * obter mais detalhes. | ||
16 | - * | ||
17 | - * Você deve ter recebido uma cópia da Licença Pública Geral GNU junto com este | ||
18 | - * programa; se não, escreva para a Free Software Foundation, Inc., 51 Franklin | ||
19 | - * St, Fifth Floor, Boston, MA 02110-1301 USA | ||
20 | - * | ||
21 | - * Este programa está nomeado como - e possui - linhas de código. | ||
22 | - * | ||
23 | - * Contatos: | ||
24 | - * | ||
25 | - * perry.werneck@gmail.com (Alexandre Perry de Souza Werneck) | ||
26 | - * erico.mendonca@gmail.com (Erico Mascarenhas Mendonça) | ||
27 | - * | ||
28 | - */ | ||
29 | - | ||
30 | -/** | ||
31 | - * @brief This module handles the properties get/set methods. | ||
32 | - */ | ||
33 | - | ||
34 | - #include <config.h> | ||
35 | - #include <lib3270-internals.h> | ||
36 | - #include <string.h> | ||
37 | - #include <lib3270.h> | ||
38 | - #include <lib3270/properties.h> | ||
39 | - #include <lib3270/keyboard.h> | ||
40 | - |
src/include/lib3270/properties.h
@@ -165,6 +165,18 @@ | @@ -165,6 +165,18 @@ | ||
165 | */ | 165 | */ |
166 | LIB3270_EXPORT int lib3270_set_oversize(H3270 *hSession, const char *value); | 166 | LIB3270_EXPORT int lib3270_set_oversize(H3270 *hSession, const char *value); |
167 | 167 | ||
168 | + /** | ||
169 | + * @brief Get property description. | ||
170 | + * | ||
171 | + */ | ||
172 | + LIB3270_EXPORT const char * lib3270_property_get_description(const LIB3270_PROPERTY * property); | ||
173 | + | ||
174 | + /** | ||
175 | + * @brief Get property summary. | ||
176 | + * | ||
177 | + */ | ||
178 | + LIB3270_EXPORT const char * lib3270_property_get_summary(const LIB3270_PROPERTY * property); | ||
179 | + | ||
168 | #ifdef __cplusplus | 180 | #ifdef __cplusplus |
169 | } | 181 | } |
170 | #endif | 182 | #endif |