Table of Contents
LDAP4D at A Dog And His Boy

LDAP4D - Public Methods

   

About this section...

These methods are distributed with LDAP4D as modifiable. LDAPu_InitSearchResponse allows the user to modify the number of attributes returned, and the others are examples of using LDAP 4D to communicate with LDAP servers.

LDAPu_InitSearchResponse

Syntax:

LDAPu_InitSearchResponse

Description:

Declarations for arrays used by LDAP_Response_Parse to return attribute values.

Warning:

 

Note:

Modify the array declarations if you think you're going to get more than 40 attribute types returned.

Params:

None

Example:

LDAPu_InitSearchResponse


LDAPu_DoAdd

Syntax:

result:= LDAPu_DoAdd (distinguishedName:T; serverName:T; pAttributeTypes:P; pAttributeValues;P)

Description:

Example method for adding a directory tree entry to an LDAP sever..

Warning:

Only single value attributes can be added.

Note:

Results dependent upon the schema of the target LDAP server. Also, On most LDAP servers the user must have performed a LDAP_BindRequest using the proper authentication to perform adds.

Params:

In/Out

Parameter

Type

 

Example or note

->

distinguishedName

Text

Distinguished name of directory tree entry to be added.

 

->

serverName

Text

Name of LDAP server.

 

->

pAttributeTypes

Pointer

Pointer to a text array of attribute types.

 

->

pAttributeValues

Pointer

Pointer to a text array of attribute values.

 

<-

result

Longint

success or failure

0 = noErr

Example:

$iErr := LDAPu_DoAdd("uid=tswenson, o=dogboy";"ldap.dogboy.com";->aAttributes;->aTypes)
If ($iErr = 0)
  ALERT("Success!")
End If


LDAPu_DoModify

Syntax:

result := LDAPu_DoModify (distinguishedName:T; serverName:T; pAttributeTypes:P; pAttributeValues;P)

Description:

Example method for modifying a directory tree entry.

Warning:

Only single value attributes can be modified.

Note:

Results dependent upon the schema of the target LDAP server. Also, On most LDAP servers the user must have performed a LDAP_BindRequest using the proper authentication to perform modifies.

Params:

In/Out

Parameter

Type

 

Example or note

->

distinguishedName

Text

Distinguished name of directory tree entry to be added.

 

->

serverName

Text

Name of LDAP server.

 

->

pAttributeTypes

Pointer

Pointer to a text array of attribute types.

 

->

pAttributeValues

Pointer

Pointer to a text array of attribute values.

 

<-

result

Longint

success or failure

0 = noErr

Example:

$iErr:=LDAPu_DoModify("uid=tswenson, o=dogboy";"ldap.dogboy.com";->aAttributes;->aTypes)
If ($iErr = 0)
  ALERT("Success!")
End IF

LDAPu_DoSearch

Syntax:

result := LDAPu_DoSearch (distinguishedname:T; serverName:T;searchFilter:TI)

Description:

Example method for searching an LDAP server.

Warning:

Results are dependent upon the schema of the target LDAP server.

Note:

The LDAP search filter is per RFC 2254

Params:

In/Out

Parameter

Type

 

Example or note

->

distinguishedName

Text

Distinguished name - search base.

 

->

serverName

Text

Name of LDAP server.

 

->

searchFilter

Text

LDAP search filter

(cn=swenson)

<-

result

Longint

success or failure

0 = noErr

Example:

$text:=LDAPu_DoSearch("o=dogboy";"ldap.dogboy.com";"(sn=swenson")")
If ($err # 0)
  ALERT("LDAP Open failed")
End IF


COMPILERu_Method_Parms_Public

Syntax:

COMPILERu_Method_Parms_Public

Description:

Compiler declarations for public methods in LDAP 4D.

Warning:

 

Note:

You'll probably only have to ever modify this if you add parms to other public methods,

Params:

None

Example:

COMPILERu_Method_Parms_Public


Back to top