Syntax ids are found in the ldap_tmplitem structure element ti_syntaxid, and they can be used to determine how to display the values for the attribute associated with an item. The LDAP_GET_SYN_TYPE() macro can be used to return a general
type from a syntax id. The five general types currently defined are: LDAP_SYN_TYPE_TEXT (for attributes that are most appropriately shown as text), LDAP_SYN_TYPE_IMAGE (for JPEG or FAX format images), LDAP_SYN_TYPE_BOOLEAN (for boolean attributes), LDAP_SYN_TYPE_BUTTON (for attributes whose values are to be retrieved and display only upon request, for example, in response to the press of a button, a JPEG image is retrieved, decoded, and displayed), and LDAP_SYN_TYPE_ACTION (for special purpose actions such as "search
for the entries where this entry is listed in the seeAlso attribute").
The LDAP_GET_SYN_OPTIONS macro can be used to retrieve an unsigned long bitmap that defines options. The only currently defined option is LDAP_SYN_OPT_DEFER, which (if set) implies that the values for the attribute should not be retrieved until requested.
There are sixteen distinct syntax ids currently defined. These generally correspond to one or more X.500 syntaxes.
LDAP_SYN_CASEIGNORESTR is used for text attributes which are simple strings whose case is ignored for comparison purposes.
LDAP_SYN_MULTILINESTR is used for text attributes which consist of multiple lines, for example, postalAddress, homePostalAddress, multilineDescription, or any attributes of syntax caseIgnoreList.
LDAP_SYN_RFC822ADDR is used for case ignore string attributes that are RFC-822 conformant mail addresses, for example, mail.
LDAP_SYN_DN is used for attributes with a Distinguished Name syntax, for example, seeAlso.
LDAP_SYN_BOOLEAN is used for attributes with a boolean syntax.
LDAP_SYN_JPEGIMAGE is used for attributes with a jpeg syntax, for example, jpegPhoto.
LDAP_SYN_JPEGBUTTON is used to provide a button (or equivalent interface element) that can be used to retrieve, decode, and display an attribute of jpeg syntax.
LDAP_SYN_FAXIMAGE is used for attributes with a photo syntax, for example, Photo. These are actually Group 3 Fax (T.4) format images.
LDAP_SYN_FAXBUTTON is used to provide a button (or equivalent interface element) that can be used to retrieve, decode, and display an attribute of photo syntax.
LDAP_SYN_AUDIOBUTTON is used to provide a button (or equivalent interface element) that can be used to retrieve and play an attribute of audio syntax. Audio values are in the "mu law" format, also known as "au" format.
LDAP_SYN_TIME is used for attributes with the UTCTime syntax, for example, lastModifiedTime. The value(s) should be displayed in complete date and time fashion.
LDAP_SYN_DATE is used for attributes with the UTCTime syntax, for example, lastModifiedTime. Only the date portion of the value(s) should be displayed.
LDAP_SYN_LABELEDURL is used for labeledURL attributes.
LDAP_SYN_SEARCHACTION is used to define a search that is used to retrieve related information. If ti_attrname is not NULL, it is assumed to be a boolean attribute which will cause no search to be performed if its value is FALSE. The ti_args structure member will have four strings in it: ti_args[ 0 ] should be the name of an attribute whose values are used to help construct a search filter or "-dn" is the distinguished name of the
entry being displayed should be used, ti_args[ 1 ] should be a filter pattern where any occurrences of "%v" are replaced with the value derived from ti_args[ 0 ], ti_args[ 2 ] should be the name of an additional attribute to retrieve when performing the search, and ti_args[ 3 ] should be a human-consumable name for that attribute. The ti_args[ 2 ]
attribute is typically displayed along with a list of distinguished names when multiple entries are returned by the search.
LDAP_SYN_LINKACTION is used to define a link to another template by name. ti_args[ 0 ] will contain the name of the display template to use. The ldap_name2template() function can be used to obtain
a pointer to the correct ldap_disptmpl structure.
LDAP_SYN_ADDDNACTION and LDAP_SYN_VERIFYDNACTION are reserved as actions but currently undefined.
|