Complete Contents
Getting Started
Chapter 1 Understanding Server Plug-Ins
Chapter 2 Writing and Compiling Plug-Ins
Chapter 3 Calling the Front-End API Functions
Chapter 4 Quick Start
Chapter 5 Writing Database Plug-Ins
Chapter 6 Writing Pre/Post-Operation Plug-Ins
Chapter 7 Defining Functions for LDAP Operations
Chapter 8 Defining Functions for Database Operations
Chapter 9 Defining Functions for Authentication
Chapter 10 Writing Entry Store/Fetch Plug-Ins
Chapter 11 Writing Extended Operation Plug-Ins
Chapter 12 Writing Matching Rule Plug-Ins
Chapter 13 Data Type and Structure Reference
Chapter 14 Function Reference
Chapter 15 Parameter Reference
Glossary
Previous Next Contents Bookshelf Function List



 slapi_entry2str()
Generates a description of an entry as a string.

Syntax

#include "slapi-plugin.h"
char *slapi_entry2str( Slapi_Entry *e, int *len );

Parameters

The function has the following parameters:
e

Entry that you want to generate a description for.
len

Length of the string returned by this function.

Returns

The description of the entry as a string.

Description

This function returns the LDIF string representation of the entry or NULL if an error occurs. The string has the following format:

dn: <dn>\n

[<attr>: <value>\n]*

For example:

dn: uid=jrent2, ou=People, o=airius.com

cn: Judy Rentz

sn: Rentz

...

When you no longer need to use the string, you should free it from memory by calling the slapi_ch_free() function.

To convert a string description in this format to an entry of the Slapi_Entry data type, call the slapi_str2entry() function.

Example

[To be added]

See Also

slapi_str2entry().

 

© Copyright 1998 Netscape Communications Corporation