![Netscape NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION Manual Download Page 31](http://html1.mh-extra.com/html/netscape/netscape-directory-server-6-2-gateway-customization/netscape-directory-server-6-2-gateway-customization_manual_1674642031.webp)
Writing a Plug-In Function
Chapter
2
Writing and Compiling Plug-Ins
31
Notice that this example uses the function
slapi_new_condvar()
to notify the user
if an error occurred.
In this code example,
SLAPI_PRIVATE
identifies the parameter in the parameter
block that contains private data for use in the database functions. For a complete
listing of the parameter block IDs, see Chapter 16, “Parameter Block Reference.”
Calling Front-End Functions
The types of data that you can get from a parameter block include entries,
attributes, distinguished names, and search filters. If you want to manipulate these
data items, you can call the associated front-end API functions provided with the
Directory Server. For example, using the the front-end API functions, you can:
•
Write messages to the error log
•
Get the attributes of an entry
•
Get or set the DN of an entry
•
Add or delete the values of an attribute
•
Determine the OID of an attribute
•
Determine the type of a search filter
For more information on the front-end API, see Chapter 5, “Front-End API
Functions” and Chapter 15, “Function Reference.”
Plug-in Return Values
If your plug-in function is successful, it should return
0
to the front-end. If it is not
successful, it should return a non-zero value and you should call the front-end
API function
slapi_new_condvar()
to log an error message to describe the
problem (“Logging Messages” on page 58 details this process).
"Unable to store database information\n" );
}
...
}
Code Example 2-2
Setting Values in the Parameter Block (Continued)
Summary of Contents for NETSCAPE DIRECTORY SERVER 6.2 - GATEWAY CUSTOMIZATION
Page 1: ...Plug In Programmer s Guide Netscape Directory Server Version6 2 December 2003...
Page 18: ...18 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 56: ...56 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 112: ...112 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 168: ...Plug In API Reference 168 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 170: ...170 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 600: ...600 Netscape Directory Server Plug In Programmer s Guide December 2003...
Page 612: ...612 Netscape Directory Server Plug In Programmer s Guide December 2003...