Common Arguments to Directory Operations

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

Functions

DS_Status DS_CommonArgs_New (DS_CommonArgs **cp)
 Allocate a new DS_CommonArgs structure. More...
 
DS_Status DS_CommonArgs_Delete (DS_CommonArgs *cp)
 Delete a DS_CommonArgs structure. More...
 
DS_Status DS_CommonArgs_SetBoolParam (DS_CommonArgs *args, int param, unsigned char bool_val)
 Set a boolean parameter in the DS_CommonArgs structure. More...
 
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. More...
 
DS_Status DS_CommonArgs_SetIntParam (DS_CommonArgs *args, int param, int int_val)
 Set an integer parameter in the DS_CommonArgs structure. More...
 
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. More...
 
DS_Status DS_CommonArgs_SetBytesParam (DS_CommonArgs *args, int param, unsigned char *bytes, int bytes_len)
 Set an octet string parameter in the DS_CommonArgs structure. More...
 
DS_Status DS_CommonArgs_GetBytesParam (const DS_CommonArgs *args, int param, unsigned char **bytes, int *bytes_len)
 Get the value of an integer parameter in the DS_CommonArgs structure. More...
 

Detailed Description

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

Supported common arguments include:

For example:

DS_Status status;
status = DS_CommonArgs_New( &ca );
1 );
20 );
status = DS_SearchSync( ds, base_dn, "(cn=*)",
ca,
&indication );
status = DS_CommonArgs_Delete( ca );

Function Documentation

◆ DS_CommonArgs_New()

DS_Status DS_CommonArgs_New ( DS_CommonArgs **  cp)

Allocate a new DS_CommonArgs structure.

Parameters
[out]cpReturn pointer. The caller should delete this using DS_CommonArgs_Delete().
Return values
DS_E_BADPARAMIf cp was NULL
DS_E_NOERRORA DS_CommonArgs was returned

◆ DS_CommonArgs_Delete()

DS_Status DS_CommonArgs_Delete ( DS_CommonArgs cp)

Delete a DS_CommonArgs structure.

Parameters
[in]cpStructure to delete.
Return values
DS_E_BADPARAMIf cp was NULL
DS_E_NOERRORThe DS_CommonArgs was deleted

◆ DS_CommonArgs_SetBoolParam()

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

Set a boolean parameter in the DS_CommonArgs structure.

Parameters
[in]argsTarget data structure.
[in]paramParameter identifier.
[in]bool_valParameter value.
Return values
DS_E_BADPARAMEither args was NULL, or param was an unrecognized common argument, or does not allow a boolean value
DS_E_NOERRORThe DS_CommonArgs was updated

◆ DS_CommonArgs_GetBoolParam()

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
[in]argsSource data structure.
[in]paramParameter identifier.
[in]bool_val_pParameter value.
Return values
DS_E_BADPARAMEither args was NULL, or param was an unrecognized common argument, or does not allow a boolean value
DS_E_NOERRORThe boolean value was returned
DS_E_NOTFOUNDIf the param was not found in args

◆ DS_CommonArgs_SetIntParam()

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

Set an integer parameter in the DS_CommonArgs structure.

Parameters
[in]argsTarget data structure.
[in]paramParameter identifier.
[in]int_valParameter value.
Return values
DS_E_BADPARAMEither args was NULL, or param was an unrecognized common argument, or does not allow an integer value.
DS_E_NOERRORThe DS_CommonArgs was updated

◆ DS_CommonArgs_GetIntParam()

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
[in]argsSource data structure.
[in]paramParameter identifier.
[in]int_val_pParameter value.
Return values
DS_E_BADPARAMEither args was NULL, or param was an unrecognized common argument, or does not allow an integer value.
DS_E_NOERRORThe integer value was returned
DS_E_NOTFOUNDIf the param was not found in args

◆ DS_CommonArgs_SetBytesParam()

DS_Status DS_CommonArgs_SetBytesParam ( DS_CommonArgs args,
int  param,
unsigned char *  bytes,
int  bytes_len 
)

Set an octet string parameter in the DS_CommonArgs structure.

Parameters
[in]argsTarget data structure.
[in]paramParameter identifier.
[in]bytesParameter value.
[in]bytes_lenLength of value.
Return values
DS_E_BADPARAMEither args was NULL, or param was an unrecognized common argument, or does not allow an integer value.
DS_E_NOERRORThe DS_CommonArgs was updated

◆ DS_CommonArgs_GetBytesParam()

DS_Status DS_CommonArgs_GetBytesParam ( const DS_CommonArgs args,
int  param,
unsigned char **  bytes,
int *  bytes_len 
)

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

Parameters
[in]argsSource data structure.
[in]paramParameter identifier.
[in]bytes_pParameter value.
[in]bytes_len_pLength of parameter value.
Return values
DS_E_BADPARAMEither args was NULL, or param was an unrecognized common argument, or does not allow an integer value.
DS_E_NOERRORThe integer value was returned
DS_E_NOTFOUNDIf the param was not found in args
struct DS_CommonArgs DS_CommonArgs
Definition: dsapi_types.h:158
DS_Status
Definition: dsapi_const.h:66
DS_Status DS_CommonArgs_Delete(DS_CommonArgs *cp)
Delete a DS_CommonArgs structure.
DS_Status DS_SearchSync(DS_Session *session, const DS_DN *base_dn, const char *filter, DSSearchScope search_scope, const char *attr_selection[], DS_CommonArgs *common_args, DS_Indication **indication_p)
Perform a synchronous directory search operation.
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_New(DS_CommonArgs **cp)
Allocate a new DS_CommonArgs structure.
@ DSScopeSubtree
Definition: dsapi_types.h:183
DS_Status DS_CommonArgs_SetBoolParam(DS_CommonArgs *args, int param, unsigned char bool_val)
Set a boolean parameter in the DS_CommonArgs structure.
#define DS_SVC_SIZELIMIT
Definition: dsapi_const.h:354
#define DS_SVC_OPT_DONTDEREFALIAS
Definition: dsapi_const.h:337

All rights reserved © 2002 - 2024 Isode Ltd.