TipcSubjectMatch


Name

TipcSubjectMatch — determine whether two subject names are the same

Synopsis

T_BOOL TipcSubjectMatch(subject1, subject2, match_return) 
T_STR subject1; 
T_STR subject2; 
T_BOOL *match_return; 

Arguments

subject1 — the first subject name to test

subject2 — the second subject name to test

match_return — storage for the match status

Return Values

TRUE if the subject names were compared successfully, FALSE otherwise.

Diagnostics

If TipcSubjectMatch fails, it returns FALSE and sets the global SmartSockets error number to one of:

Description

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.

Caution

If TipcSubjectMatch returns FALSE, it does not store a value in match_return.

See Also

TipcSubjectValid, TipcSubjectGetUnique

Examples

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