TutOptionCreate create a new option
name
option name (not case sensitive)
type
option value type
Returns pointer to new option, NULL
if option already exists.
If TutOptionCreate fails, it returns NULL
and sets the global SmartSockets error number to one of:
TutOptionCreate creates a new SmartSockets option. An option consists of name
and type
, where name
is a string that is not case sensitive, and type
is one of:
SmartSockets options are similar to environment variables used by operating systems, plus they have additional built-in type-checking capabilities. Option change callbacks can be used to notify you when the option’s value changes. See TutOptionChangeCbCreate on page 151 for more information on option change callbacks.
The name
argument must be an identifier.
TutOptionLookup, TutOptionDestroy, TutOptionChangeCbCreate
This example creates a boolean option named bool_opt
:
T_OPTION option;
option = TutOptionCreate("bool_opt", T_OPT_TYPE_BOOLEAN);
if (option == NULL) {
/* error */
}
TIBCO SmartSockets™ Utilities Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |