TipcSubjectMatch determine whether two subject names are the same
T_BOOL TipcSubjectMatch(subject1
,subject2
,match_return
) T_STRsubject1
; T_STRsubject2
; T_BOOL *match_return
;
subject1
the first subject name to test
subject2
the second subject name to test
match_return
storage for the match status
TRUE
if the subject names were compared successfully, FALSE
otherwise.
If TipcSubjectMatch fails, it returns FALSE
and sets the global SmartSockets error number to one of:
TipcSubjectMatch compares two subject names for equality and stores the result in match_return
. Subjects are case insensitive, so the subject names may be in any case. For example, /TIBCO
and /tibco
match.
The subject names must be absolute (they must begin with a forward slash, '/
') or TipcSubjectMatch returns FALSE
and sets the global error code to T_ERR_VAL_INVALID.
For more information on subjects, see the TIBCO SmartSockets User’s Guide.
If TipcSubjectMatch returns FALSE
, it does not store a value in match_return
.
TipcSubjectValid, TipcSubjectGetUnique
This example compares two subject names for equivalency:
T_STR subject1 = "/stocks/t*"; T_STR subject2 = "/stocks/talr"; T_BOOL match;/*
* This will result in a match.
*/
if (!TipcSubjectMatch(subject1, subject2, &match)) {
return
; /* error */
}
TIBCO SmartSockets™ Application Programming Interface Software Release 6.8, July 2006 Copyright © TIBCO Software Inc. All rights reserved www.tibco.com |