TutOptionGetRequired


Name

TutOptionGetRequired — get the required property of an option

Synopsis

T_BOOL TutOptionGetRequired(option, required_return) 
T_OPTION option; 
T_BOOL *required_return; 

Arguments

option — option whose required property is to be accessed

required_return — pointer to storage location to place required property

Return Values

TRUE if able to determine value of the required state for option, FALSE otherwise.

Diagnostics

If TutOptionGetRequired fails, it returns FALSE and sets the global SmartSockets error number to:

Description

TutOptionGetRequired retrieves the current state of the required property for option. A required option is an option that cannot be unset.

Caution

None

See Also

TutOptionSetRequired, TutOptionLookup

Examples

This example prints whether the option is required:

T_OPTION opt; 
T_BOOL required; 
 
opt = TutOptionLookup("any_option"); 
if (opt == NULL) { 
  /* error */ 
} 
if (!TutOptionGetRequired(opt, &required)) { 
  /* error */ 
} 
TutOut("Option any_option is %s REQUIRED\n",  
        required ? "" : "NOT"); 

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