Common Arguments to Directory Operations


Functions

DS_Status DS_CommonArgs_New (DS_CommonArgs **cp)
 Allocate a new DS_CommonArgs structure.
DS_Status DS_CommonArgs_Delete (DS_CommonArgs *cp)
 Delete a DS_CommonArgs structure.
DS_Status DS_CommonArgs_SetBoolParam (DS_CommonArgs *args, int param, unsigned char bool_val)
 Set a boolean parameter in the DS_CommonArgs structure.
DS_Status DS_CommonArgs_GetBoolParam (const DS_CommonArgs *args, int param, unsigned char *bool_val_p)
 Get the value of a boolean parameter in the DS_CommonArgs structure.
DS_Status DS_CommonArgs_SetIntParam (DS_CommonArgs *args, int param, int int_val)
 Set an integer parameter in the DS_CommonArgs structure.
DS_Status DS_CommonArgs_GetIntParam (const DS_CommonArgs *args, int param, int *int_val_p)
 Get the value of an integer parameter in the DS_CommonArgs structure.

Detailed Description

Handling of common arguments to directory operations. This includes service parameters, extension handling, etc.

Supported common arguments include:

For example:

  DS_CommonArgs *ca;
  DS_Status status;
  
  status = DS_CommonArgs_New( &ca );
  status = DS_CommonArgs_SetBoolParam( ca,
                                       DS_SVC_OPT_DONTDEREFALIAS,
                                       1 );
  status = DS_CommonArgs_SetIntParam( ca,
                                      DS_SVC_SIZELIMIT,
                                      20 );

  status = DS_SearchSync( ds, base_dn, "(cn=*)",
                          DSScopeSubtree, NULL,
                          ca,
                          &indication );

  status = DS_CommonArgs_Delete( ca );

Function Documentation

DS_Status DS_CommonArgs_New ( DS_CommonArgs **  cp  ) 

Allocate a new DS_CommonArgs structure.

Parameters:
cp [out] Return pointer. The caller should delete this using DS_CommonArgs_Delete().
Return values:
DS_E_BADPARAM If cp was NULL
DS_E_NOERROR A DS_CommonArgs was returned

DS_Status DS_CommonArgs_Delete ( DS_CommonArgs cp  ) 

Delete a DS_CommonArgs structure.

Parameters:
cp [in] Structure to delete.
Return values:
DS_E_BADPARAM If cp was NULL
DS_E_NOERROR The DS_CommonArgs was deleted

DS_Status DS_CommonArgs_SetBoolParam ( DS_CommonArgs args,
int  param,
unsigned char  bool_val 
)

Set a boolean parameter in the DS_CommonArgs structure.

Parameters:
args [in] Target data structure.
param [in] Parameter identifier.
bool_val [in] Parameter value.
Return values:
DS_E_BADPARAM Either args was NULL, or param was an unrecognized common argument, or does not allow a boolean value
DS_E_NOERROR The DS_CommonArgs was updated

DS_Status DS_CommonArgs_GetBoolParam ( const DS_CommonArgs args,
int  param,
unsigned char *  bool_val_p 
)

Get the value of a boolean parameter in the DS_CommonArgs structure.

Parameters:
args [in] Source data structure.
param [in] Parameter identifier.
bool_val_p [in] Parameter value.
Return values:
DS_E_BADPARAM Either args was NULL, or param was an unrecognized common argument, or does not allow a boolean value
DS_E_NOERROR The boolean value was returned
DS_E_NOTFOUND If the param was not found in args

DS_Status DS_CommonArgs_SetIntParam ( DS_CommonArgs args,
int  param,
int  int_val 
)

Set an integer parameter in the DS_CommonArgs structure.

Parameters:
args [in] Target data structure.
param [in] Parameter identifier.
int_val [in] Parameter value.
Return values:
DS_E_BADPARAM Either args was NULL, or param was an unrecognized common argument, or does not allow an integer value.
DS_E_NOERROR The DS_CommonArgs was updated

DS_Status DS_CommonArgs_GetIntParam ( const DS_CommonArgs args,
int  param,
int *  int_val_p 
)

Get the value of an integer parameter in the DS_CommonArgs structure.

Parameters:
args [in] Source data structure.
param [in] Parameter identifier.
int_val_p [in] Parameter value.
Return values:
DS_E_BADPARAM Either args was NULL, or param was an unrecognized common argument, or does not allow an integer value.
DS_E_NOERROR The integer value was returned
DS_E_NOTFOUND If the param was not found in args

Copyright © 2008 Isode privacy   feedback Subscribe to our rss newsfeed