/******************************************************************************/
/*
                                  contacts.h
*/
/******************************************************************************/

#ifndef INCLUDE_CONTACTS_H
#define INCLUDE_CONTACTS_H

/***********/
/* defines */
/***********/

/*******************/
/* data structures */
/*******************/

#ifndef __VAX
#   pragma member_alignment __save
#   pragma member_alignment
#endif

typedef struct STRUCT_CONTACTS_ENTRY
{
   struct STRUCT_CONTACTS_ENTRY *NextEntry,
                                *PrevEntry;

   int  EntryNumber;

   char  *LDIFcnPtr,                           /* common name */
         *LDIFcPtr,                            /* country */
         *LDIFdescriptionPtr,                  /* description */
         *LDIFdnPtr,                           /* distinguished name */
         *LDIFfacsimileTelephoneNumberPtr,     /* first name */
         *LDIFgivenNamePtr,                    /* last name */
         *LDIFlPtr,                            /* locality (city) */
         *LDIFmailPtr,                         /* email address */
         *LDIFmobilePtr,                       /* mobile telephone */
         *LDIFpagerPtr,                        /* page number */
         *LDIFpostalAddressPtr,                /* street address */
         *LDIFpostalCodePtr,                   /* post/ZIP code */
         *LDIFsnPtr,                           /* family name */
         *LDIFstPtr,                           /* state address */
         *LDIFsoyMAILlistPtr,                  /* soyMAIL address list */
         *LDIFtelephoneNumberPtr;              /* telephone number */

} CONTACTS_ENTRY;

#ifndef __VAX
#   pragma member_alignment __restore
#endif

/**************/
/* prototypes */
/**************/

void ContactsAppend (REQUEST_DATA*);
void ContactsCompose (REQUEST_DATA*, int);
void ContactsEdit (REQUEST_DATA*, BOOL);
void ContactsEditButtons (REQUEST_DATA*, BOOL, BOOL);
char* ContactsLdifEntry (char*, int);
int ContactsLdifEntryCmp (const void*, const void*);
BOOL ContactsExport (REQUEST_DATA*);
void ContactsImportLdif (REQUEST_DATA*, char*);
BOOL ContactsLoad (REQUEST_DATA*, char*,char*);
int ContactsLoadFile (REQUEST_DATA*, char*);
void ContactsLoadLdif (REQUEST_DATA*, char*);
char* ContactsLdifParse (char**, char**, char**);
int ContactsLdifRecord (FILE*, char*, char*, BOOL);
void ContactsMergeLdif (REQUEST_DATA*, char*);
char* ContactsNameAs (char*);
void ContactsPage (REQUEST_DATA*, BOOL);
BOOL ContactsPageRequest (REQUEST_DATA*);
int ContactsPostalAddress (CONTACTS_ENTRY*, char*, int);
void ContactsPrintView (REQUEST_DATA*);
void ContactsSave (REQUEST_DATA*);
int ContactsLdifPurge (char*, char*);
void ContactsLdifAppend (REQUEST_DATA*, CONTACTS_ENTRY*);
void ContactsLdifRemove (REQUEST_DATA*, CONTACTS_ENTRY*);
void ContactsLdifReplace (REQUEST_DATA*, CONTACTS_ENTRY*);
void ContactsLdifSort (REQUEST_DATA*);
int ContactsWrite (REQUEST_DATA*, FILE*, BOOL);

#endif /* INCLUDE_CONTACTS_H */

/******************************************************************************/

