Table of Contents | Previous | Next | Index

Netscape Directory SDK 3.0 for C Programmer’s Guide
     Chapter 18 Functions

ldap_create_sort_keylist()

Creates an array of LDAPsortkey structures from a string representation of a set of sort keys.

Syntax

#include <ldap.h>
int ldap_create_sort_keylist(LDAPsortkey ***sortKeyList,
   char *string_rep);

Parameters

This function has the following parameters:

sortKeyList

Pointer to an array of LDAPsortkey structures that specify the attribute types or matching rules used for sorting and the order (ascending or descending) in which to sort the results.

string_rep

String representation of a set of sort keys.

Returns

One of the following values:

Description

The ldap_create_sort_keylist() function allows you to create an array of LDAPsortkey structures from a string representation of a set of sort keys. Calling this function creates an array of LDAPsortkey structures that you can pass to the ldap_create_sort_control() function.

The string representation specified by the string_rep argument should specify the name of the attribute that you want to sort by.

For example:

When you are done sorting the results, you should free the array of LDAPsortkey structures by calling the ldap_free_sort_keylist() function.

See Also

ldap_create_sort_control(), ldap_free_sort_keylist().


Table of Contents | Previous | Next | Index

Last Updated: 10/01/98 17:06:23