Initializing the Simple Directory API


Functions

DS_Status DS_Initialize (void)
 Initialize the Simple Directory API.
void DS_InitializeSecurity (const char *path)
 Initialize the security environment.
void DS_UninitializeSecurity (void)
 Disable strong operations and release any resources associated with the security environment.
int DS_Version (void)
 Return the DSAPI library version.

Detailed Description

Functions in this group are used to initialize the API, and check its version.

Function Documentation

DS_Status DS_Initialize ( void   ) 

Initialize the Simple Directory API.

This initializes all the underlying libraries.

If a security environment is required, it needs to be initialized afterwards by calling DS_InitializeSecurity().

Returns:
DSAPI function status code.
Examples:
add.c, anonymous.c, async.c, delete.c, modify.c, read.c, and simple.c.

void DS_InitializeSecurity ( const char *  path  ) 

Initialize the security environment.

The security environment may not be available on all platforms. If it is available and is needed, it needs to be initialized with the location of a filestore directory containing an "x509" subdirectory containing identity, TLS anchors, and CRL information.

On Windows the default location is the "Application Data\Isode" directory inside the current user's "Documents and Settings" directory.

On Unix the default location is the current user's home directory.

Parameters:
path Location of the directory, or NULL to use platform-specific defaults.
Since:
DSAPI_VERSION 2003

void DS_UninitializeSecurity ( void   ) 

Disable strong operations and release any resources associated with the security environment.

This function can be used to signal that no further use will be made of X509 functionality, and provides the underlying libraries with the opportunity to clean up any data structures or temporary files which are consequently no longer required.

The function may be called when a program is about to terminate, or in the event that DS_InitializeSecurity is to be called with a new set of parameters.

After calling this function, no further attempts should be made to perform strong binds or signed operations without first making another suitable call to DS_InitializeSecurity. If any strong sessions are active when this function is called, then the behaviour of any subsequent operations on those sessions is unpredictable.

Since:
DSAPI_VERSION 2013

int DS_Version ( void   ) 

Return the DSAPI library version.

This could be compared with the value of DSAPI_VERSION to check what functions are available at runtime.

Returns:
the version of the DSAPI implemented by the library, which is calculated as (major_version * 100) + minor_version.
Different major versions indicate incompatible APIs and ABIs. Different minor versions indicate additional functions are available, but the API and ABI are otherwise backwards compatible. So for example an application built against version 2000 will run correctly with a runtime library of version 2005, whereas an application built using features of version 2005 will not work against a runtime of version 2000.

Copyright © 2008 Isode privacy   feedback Subscribe to our rss newsfeed