Create a ToolTalk pattern and initialize its attributes. The value of attributes must be a list of alternating keyword/values, where keywords are symbols that name valid pattern attributes or lists of valid attributes. For example:
(make-tooltalk-pattern '(category TT_OBSERVE scope TT_SESSION op ("operation1" "operation2") args ("arg1" 12345 (TT_INOUT "arg3" "string"))))Attribute names are the same as those supported by
add-tooltalk-pattern-attribute, plus'args.Values must always be strings, integers, or symbols that represent ToolTalk constants or lists of same. When a list of values is provided all of the list elements are added to the attribute. In the example above, messages whose ‘op’ attribute is ‘"operation1"’ or ‘"operation2"’ would match the pattern.
The value of args should be a list of pattern arguments where each pattern argument has the following form:
‘(mode [value [type]])’ or just ‘value’Where mode is one of
TT_IN,TT_OUT, orTT_INOUTand type is a string. If type isn't specified thenintis used if value is a number; otherwisestringis used. If type isstringthen value is converted to a string (if it isn't a string already) withprin1-to-string. If only a value is specified then mode defaults toTT_IN. If mode isTT_OUTthen value and type don't need to be specified. You can find out more about the semantics and uses of ToolTalk pattern arguments in chapter 3 of the ToolTalk Programmer's Guide.
SXEmacs will begin receiving messages that match this pattern.
SXEmacs will stop receiving messages that match this pattern.
Add one value to the indicated pattern attribute. The names of attributes are the same as the ToolTalk accessors used to set them less the ‘tooltalk_pattern_’ prefix and the ‘_add’ suffix. For example, the name of the attribute for the ‘tt_pattern_disposition_add’ attribute is
disposition. Thecategoryattribute is handled specially, since a pattern can only be a member of one category (TT_OBSERVEorTT_HANDLE).Callbacks are handled slightly differently than in the C ToolTalk API. The value of callback should be the name of a function of one argument. It will be called each time the pattern matches an incoming message.
Add one fully-specified argument to a ToolTalk pattern. mode must be one of
TT_IN,TT_INOUT, orTT_OUT. vtype must be a string. value can be an integer, string ornil. If value is an integer then an integer argument (‘tt_pattern_iarg_add’) is added; otherwise a string argument is added. At present there's no way to add a binary data argument.
Create a new ToolTalk pattern and initialize its session attribute to be the default session.