'LibPst'
pst2ldif.cpp File Reference
#include <set>
#include <vector>
#include <string>
#include "define.h"
#include "lzfu.h"
Include dependency graph for pst2ldif.cpp:

Go to the source code of this file.

Data Structures

struct  ltstr
 

Typedefs

typedef set< const char *, ltstrstring_set
 

Functions

void usage (void)
 
void version (void)
 
char * check_filename (char *fname)
 
void print_ldif_single (const char *attr, const char *value)
 
void print_ldif_single (const char *attr, pst_string value)
 
void print_ldif_address (const char *attr, int nvalues, pst_string value,...)
 
void print_ldif_dn (const char *attr, pst_string value, const char *base)
 
void print_ldif_multi (const char *dn, pst_string value)
 
void print_ldif_two (const char *attr, pst_string value1, pst_string value2)
 
void print_escaped_dn (const char *value)
 
void build_cn (char *cn, size_t len, int nvalues, pst_string value,...)
 
static void free_strings (string_set &s)
 
static const char * register_string (string_set &s, const char *name)
 
static const char * register_string (const char *name)
 
static const char * unique_string (const char *name)
 
static void process (pst_desc_tree *d_ptr)
 
int main (int argc, char *const *argv)
 

Variables

char * prog_name
 
pst_file pstfile
 
bool old_schema = false
 
char * ldap_base = NULL
 
int ldif_extra_line_count = 0
 
vector< string > ldap_class
 
vector< string > ldif_extra_line
 
static string_set all_strings
 

Typedef Documentation

◆ string_set

typedef set<const char *, ltstr> string_set

Definition at line 52 of file pst2ldif.cpp.

Function Documentation

◆ build_cn()

void build_cn ( char *  cn,
size_t  len,
int  nvalues,
pst_string  value,
  ... 
)

Definition at line 529 of file pst2ldif.cpp.

References pst_string::str.

Referenced by process().

◆ check_filename()

void check_filename ( char *  fname)

Definition at line 707 of file pst2ldif.cpp.

◆ free_strings()

static void free_strings ( string_set s)
static

Definition at line 61 of file pst2ldif.cpp.

Referenced by main().

◆ main()

◆ print_escaped_dn()

void print_escaped_dn ( const char *  value)

Definition at line 738 of file pst2ldif.cpp.

Referenced by print_ldif_dn().

◆ print_ldif_address()

void print_ldif_address ( const char *  attr,
int  nvalues,
pst_string  value,
  ... 
)

Definition at line 419 of file pst2ldif.cpp.

References DEBUG_ENT, DEBUG_RET, print_ldif_single(), and pst_string::str.

Referenced by process().

Here is the call graph for this function:

◆ print_ldif_dn()

void print_ldif_dn ( const char *  attr,
pst_string  value,
const char *  base 
)

Definition at line 721 of file pst2ldif.cpp.

References print_escaped_dn(), and pst_string::str.

Referenced by process().

Here is the call graph for this function:

◆ print_ldif_multi()

void print_ldif_multi ( const char *  dn,
pst_string  value 
)

Definition at line 492 of file pst2ldif.cpp.

References print_ldif_single(), and pst_string::str.

Referenced by process().

Here is the call graph for this function:

◆ print_ldif_single() [1/2]

void print_ldif_single ( const char *  attr,
const char *  value 
)

Definition at line 367 of file pst2ldif.cpp.

References pst_base64_encode().

Referenced by main(), print_ldif_address(), print_ldif_multi(), print_ldif_single(), print_ldif_two(), and process().

Here is the call graph for this function:

◆ print_ldif_single() [2/2]

void print_ldif_single ( const char *  attr,
pst_string  value 
)

Definition at line 358 of file pst2ldif.cpp.

References print_ldif_single(), and pst_string::str.

Here is the call graph for this function:

◆ print_ldif_two()

void print_ldif_two ( const char *  attr,
pst_string  value1,
pst_string  value2 
)

Definition at line 504 of file pst2ldif.cpp.

References print_ldif_single(), and pst_string::str.

Referenced by process().

Here is the call graph for this function:

◆ process()

static void process ( pst_desc_tree d_ptr)
static

Definition at line 111 of file pst2ldif.cpp.

References pst_item_contact::address1, pst_item_contact::address1a, pst_item_contact::address2, pst_item_contact::address2a, pst_item_contact::address3, pst_item_contact::address3a, build_cn(), pst_item_contact::business_address, pst_item_contact::business_city, pst_item_contact::business_country, pst_item_contact::business_fax, pst_item_contact::business_homepage, pst_item_contact::business_phone, pst_item_contact::business_po_box, pst_item_contact::business_postal_code, pst_item_contact::business_state, pst_item_contact::business_street, pst_item_contact::car_phone, pst_desc_tree::child, pst_item::comment, pst_item_contact::company_name, pst_item::contact, DEBUG_ENT, DEBUG_INFO, DEBUG_RET, pst_desc_tree::desc, pst_item_contact::display_name_prefix, pst_item::file_as, pst_item_contact::first_name, pst_item::folder, pst_item_contact::home_address, pst_item_contact::home_city, pst_item_contact::home_country, pst_item_contact::home_fax, pst_item_contact::home_phone, pst_item_contact::home_po_box, pst_item_contact::home_postal_code, pst_item_contact::home_state, pst_item_contact::home_street, pst_string::is_utf8, pst_item_contact::job_title, ldap_base, ldap_class, pst_item_contact::mobile_phone, pst_desc_tree::next, old_schema, pst_item_contact::other_address, pst_item_contact::other_city, pst_item_contact::other_country, pst_item_contact::other_phone, pst_item_contact::other_po_box, pst_item_contact::other_postal_code, pst_item_contact::other_state, pst_item_contact::other_street, pst_item_contact::personal_homepage, print_ldif_address(), print_ldif_dn(), print_ldif_multi(), print_ldif_single(), print_ldif_two(), pst_convert_utf8_null(), pst_freeItem(), pst_parse_item(), PST_TYPE_CONTACT, pstfile, pst_string::str, pst_item_contact::suffix, pst_item_contact::surname, pst_item::type, and unique_string().

Referenced by main().

Here is the call graph for this function:

◆ register_string() [1/2]

static const char * register_string ( string_set s,
const char *  name 
)
static

Definition at line 75 of file pst2ldif.cpp.

Referenced by register_string(), and unique_string().

◆ register_string() [2/2]

static const char * register_string ( const char *  name)
static

Definition at line 88 of file pst2ldif.cpp.

References all_strings, and register_string().

Here is the call graph for this function:

◆ unique_string()

static const char * unique_string ( const char *  name)
static

Definition at line 97 of file pst2ldif.cpp.

References all_strings, and register_string().

Referenced by process().

Here is the call graph for this function:

◆ usage()

void usage ( void  )

Definition at line 681 of file pst2ldif.cpp.

References prog_name, and version().

Referenced by main().

Here is the call graph for this function:

◆ version()

void version ( void  )

Definition at line 695 of file pst2ldif.cpp.

References VERSION.

Referenced by main(), and usage().

Variable Documentation

◆ all_strings

string_set all_strings
static

Definition at line 54 of file pst2ldif.cpp.

Referenced by main(), register_string(), and unique_string().

◆ ldap_base

char* ldap_base = NULL

Definition at line 38 of file pst2ldif.cpp.

Referenced by main(), and process().

◆ ldap_class

vector<string> ldap_class

Definition at line 40 of file pst2ldif.cpp.

Referenced by main(), and process().

◆ ldif_extra_line

vector<string> ldif_extra_line

Definition at line 41 of file pst2ldif.cpp.

Referenced by main().

◆ ldif_extra_line_count

int ldif_extra_line_count = 0

Definition at line 39 of file pst2ldif.cpp.

◆ old_schema

bool old_schema = false

Definition at line 37 of file pst2ldif.cpp.

Referenced by main(), and process().

◆ prog_name

char* prog_name

Definition at line 35 of file pst2ldif.cpp.

Referenced by main(), and usage().

◆ pstfile

pst_file pstfile

Definition at line 36 of file pst2ldif.cpp.

Referenced by main(), and process().