TutOptionGetReadOnly


Name

TutOptionGetReadOnly — get the read-only property of an option

Synopsis

T_BOOL TutOptionGetReadOnly(option, read_only_return) 
T_OPTION option; 
T_BOOL *read_only_return; 

Arguments

option — option whose read-only property is to be accessed

read_only_return — pointer to storage location to place read-only property

Return Values

TRUE if able to determine value of the read-only property for option, FALSE otherwise.

Diagnostics

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

Description

TutOptionGetReadOnly retrieves the current state of the read-only property for option. A read-only option is an option whose value cannot be changed.

Caution

None

See Also

TutOptionSetReadOnly, TutOptionLookup

Examples

This example prints whether or not the option is read-only:

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

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