Commit a4378593f1e98208f26c7380380414b9deb012d4

Authored by Perry Werneck
1 parent e9ea34ab

Adding "unlock_delay" property.

src/include/lib3270.h
@@ -1151,8 +1151,9 @@ @@ -1151,8 +1151,9 @@
1151 * @param Delay in milliseconds. 1151 * @param Delay in milliseconds.
1152 * 1152 *
1153 */ 1153 */
1154 - LIB3270_EXPORT void lib3270_set_unlock_delay(H3270 *session, unsigned short delay); 1154 + LIB3270_EXPORT void lib3270_set_unlock_delay(H3270 *session, int delay);
1155 1155
  1156 + LIB3270_EXPORT int lib3270_get_unlock_delay(H3270 *session);
1156 1157
1157 /** 1158 /**
1158 * @brief Alloc/Realloc memory buffer. 1159 * @brief Alloc/Realloc memory buffer.
src/lib3270/kybd.c
@@ -2922,11 +2922,19 @@ int kybd_prime(H3270 *hSession) @@ -2922,11 +2922,19 @@ int kybd_prime(H3270 *hSession)
2922 } 2922 }
2923 #endif /*]*/ 2923 #endif /*]*/
2924 2924
2925 -LIB3270_EXPORT void lib3270_set_unlock_delay(H3270 *session, unsigned short delay) 2925 +LIB3270_EXPORT void lib3270_set_unlock_delay(H3270 *session, int delay)
2926 { 2926 {
2927 CHECK_SESSION_HANDLE(session); 2927 CHECK_SESSION_HANDLE(session);
2928 2928
2929 trace("%s(%d)",__FUNCTION__,(int) delay); 2929 trace("%s(%d)",__FUNCTION__,(int) delay);
2930 2930
2931 - session->unlock_delay_ms = delay; 2931 + session->unlock_delay_ms = (unsigned short) delay;
2932 } 2932 }
  2933 +
  2934 +LIB3270_EXPORT int lib3270_get_unlock_delay(H3270 *session)
  2935 +{
  2936 + CHECK_SESSION_HANDLE(session);
  2937 + return (int) session->unlock_delay_ms;
  2938 +
  2939 +}
  2940 +
src/lib3270/properties.c
@@ -129,10 +129,10 @@ @@ -129,10 +129,10 @@
129 }, 129 },
130 130
131 { 131 {
132 - "e", // Property name.  
133 - N_( "" ), // Property description.  
134 - lib3270_in_e, // Get value.  
135 - NULL // Set value. 132 + "e", // Property name.
  133 + N_( "Is terminal in the INITIAL_E state?" ), // Property description.
  134 + lib3270_in_e, // Get value.
  135 + NULL // Set value.
136 }, 136 },
137 137
138 { 138 {
@@ -224,6 +224,12 @@ @@ -224,6 +224,12 @@
224 NULL // Set value. 224 NULL // Set value.
225 }, 225 },
226 226
  227 + {
  228 + "unlock_delay", // Property name.
  229 + N_( "The delay between the host unlocking the keyboard and the actual unlock" ), // Property description.
  230 + lib3270_get_unlock_delay, // Get value.
  231 + lib3270_set_unlock_delay // Set value.
  232 + },
227 233
228 /* 234 /*
229 { 235 {