PreviousNext

C Naming Conventions

In the DCE implementation of XDS and XOM APIs, all object identifiers start with the letters ds, DS, MH, or OMP. Note that the interface reserves all identifiers starting with the letters dsP and omP for internal use by implementations of the interface. It also reserves all identifiers starting with the letters dsX, DSX, omX, and OMX for vendor-specific extensions of the interface. Applications programmers should not use any identifier starting with these letters.

The C identifiers for interface elements are formed by using the following conventions:

· XDS API function names are specified entirely in lowercase letters and are prefixed by ds_ (for example, ds_read( )).

· XOM API function names are specified entirely in lowercase letters and are prefixed by om_ (for example, om_get( )).

· C function parameters are derived from the parameter and result names and are specified entirely in lowercase letters. In addition, the names of results have _return added as a suffix (for example, operation_status_return).

· OM class names are specified entirely in uppercase letters and are prefixed by DS_C_ and MH_C_ (for example, DS_C_AVA).

· OM attribute names are specified entirely in uppercase letters, and are prefixed by DS_ and MH_ (for example, DS_RDNS).

· OM syntax names are specified entirely in uppercase letters and are prefixed by OM_S_ (for example, OM_S_PRINTABLE_STRING).

· Directory class names are specified entirely in uppercase letters and are prefixed by DS_O (for example, DS_O_ORG_PERSON).

· Directory attribute names are specified entirely in uppercase letters and are prefixed by DS_A (for example, DS_A_COUNTRY_NAME).

· Errors are treated as a special case. Constants that are the possible values of the OM attribute DS_PROBLEM of a subclass of the OM class DS_C_ERROR are specified entirely in uppercase letters and are prefixed by DS_E_ (for example, DS_E_BAD_CLASS).

· The constants in the Value Length and Value Number columns of the OM class definition tables are also assigned identifiers. Where the upper limit in one of these columns is not 1, it is given a name that consists of the OM attribute name, prefixed by DS_VL_ for value length, or DS_VN_ for value number.

· The sequence of octets for each object identifier is also assigned an identifier for internal use by certain OM macros. These identifiers are all uppercase letters and are prefixed by OMP_O_.

The tables below summarize the XDS and XOM naming conventions.


C Naming Conventions for XDS

Item Prefix
Reserved for implementers dsP
Reserved for interface extensions dsX
Reserved for interface extensions DSX
XDS functions ds
Error problem values DS_E
OM class names DS_C_, MH_C
OM attribute names DS_, MH
OM value length limits DS_VL
OM value number limits DS_VN
Other constants DS_, MH
Attribute type DS_A
Object class DS_O_

C Naming Conventions for XOM

Element Type Prefix
Data type OM
Data value OM
Data value (class) OM_C
Data value (syntax) OM_S
Data value component (structure member) None
Function om
Function parameter None
Function result None
Macro OM
Reserved for use by implementers OMP
Reserved for use by implementers omP
Reserved for proprietary extension omX
Reserved for proprietary extension OMX