TipcMsgNextUtf8Array


Name

TipcMsgNextUtf8Array — get a field containing an array of UTF8 fields from a message

Synopsis

T_BOOL TipcMsgNextUtf8Array(msg, utf8_array_return, array_size_return) 
T_IPC_MSG msg; 
T_STR **utf8_array_return; 
T_INT4 *array_size_return; 

Arguments

msg — message to get field from

utf8_array_return — storage for UTF8_ARRAY value from field

array_size_return — storage for number of elements in array

Return Values

TRUE if the field was successfully retrieved from the message, FALSE otherwise.

Diagnostics

If TipcMsgNextUtf8Array fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

TipcMsgNextUtf8Array retrieves the value of the current field of a message, which must be a UTF8_ARRAY (array of UTF8 values) field. If TipcMsgNextUtf8Array succeeds, it advances the current field to the next field in the message.

TipcMsgNextUtf8Array converts the field into the data format used by this process, if necessary.

Caution

If TipcMsgNextUtf8Array returns FALSE, it does not store values in utf8_array_return and array_size_return.

Do not modify the value stored in utf8_array_return. It points directly into an internal data structure.

See Also

TipcMsgAppendUtf8Array, TipcMsgAppendUtf8ArrayPtr

Examples

This example reads a UTF8_ARRAY field from a message and prints the values in the array:

T_STR *utf8_array; 
T_STR array_size; 
T_INT4 counter; 
 
if (!TipcMsgNextutf8Array(msg, &utf8_array, &array_size)) { 
  return;  /* error */ 
}  
TutOut("array_size = %d\n", array_size); 
 
for (counter = 0; counter < array_size; counter++) { 
  TutOut("utf8_array[%d] = " T_UTF8_SPEC "\n", counter, 
         utf8_array[counter]); 
} 

TIBCO SmartSockets™ Application Programming Interface
Software Release 6.8, July 2006
Copyright © TIBCO Software Inc. All rights reserved
www.tibco.com