/usr/include/claws-mail/ldif.h is in libclaws-mail-dev 3.13.2-1ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 | /*
* Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
* Copyright (C) 2001-2012 Match Grun and the Claws Mail team
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
/*
* Definitions necessary to access LDIF files (LDAP Data Interchange Format
* files). These files are used to load LDAP servers and to interchange data
* between servers. They are also used by several E-Mail client programs and
* other programs as a means of interchange address book data.
*/
#ifndef __LDIF_H__
#define __LDIF_H__
#include <stdio.h>
#include <glib.h>
#include "addrcache.h"
#define LDIFBUFSIZE 2048
/* Common tag names - for address book import/export */
#define LDIF_TAG_DN "dn"
#define LDIF_TAG_COMMONNAME "cn"
#define LDIF_TAG_FIRSTNAME "givenName"
#define LDIF_TAG_LASTNAME "sn"
#define LDIF_TAG_NICKNAME "displayName"
#define LDIF_TAG_EMAIL "mail"
#define LDIF_TAG_OBJECTCLASS "objectClass"
/* Object classes */
#define LDIF_CLASS_PERSON "person"
#define LDIF_CLASS_INET_PERSON "inetOrgPerson"
/*
* Typical LDIF entry (similar to that generated by Netscape):
*
* dn: uid=axel, dc=axel, dc=com
* cn: Axel Rose
* sn: Rose
* givenname: Arnold
* xmozillanickname: Axel
* mail: axel@axelrose.com
* mail: axelrose@aol.com
* mail: axel@netscape.net
* mail: axel@hotmail.com
* uid: axelrose
* o: The Company
* locality: Denver
* st: CO
* streetaddress: 777 Lexington Avenue
* postalcode: 80298
* countryname: USA
* telephonenumber: 303-555-1234
* homephone: 303-555-2345
* cellphone: 303-555-3456
* homeurl: http://www.axelrose.com
* objectclass: top
* objectclass: person
*
* Note that first entry is always dn. An empty line defines end of
* record. Note that attribute names are case insensitive. There may
* also be several occurrences of an attribute, for example, as
* illustrated for "mail" and "objectclass" attributes. LDIF files
* can also use binary data using base-64 encoding.
*
*/
/* LDIF file object */
typedef struct _LdifFile LdifFile;
struct _LdifFile {
FILE *file;
gchar *path;
gchar *bufptr;
gint retVal;
GHashTable *hashFields;
GList *tempList;
gboolean dirtyFlag;
gboolean accessFlag;
void (*cbProgress)( void *, void *, void * );
gint importCount;
};
/* LDIF field record structure */
typedef struct _Ldif_FieldRec_ Ldif_FieldRec;
struct _Ldif_FieldRec_ {
gchar *tagName;
gchar *userName;
gboolean reserved;
gboolean selected;
};
/* Function prototypes */
LdifFile *ldif_create ( void );
void ldif_set_file ( LdifFile* ldifFile, const gchar *value );
void ldif_set_accessed ( LdifFile* ldifFile, const gboolean value );
void ldif_field_set_name ( Ldif_FieldRec *rec, const gchar *value );
void ldif_field_set_selected ( Ldif_FieldRec *rec, const gboolean value );
void ldif_field_toggle ( Ldif_FieldRec *rec );
void ldif_free ( LdifFile *ldifFile );
void ldif_print_file ( LdifFile *ldifFile, FILE *stream );
gint ldif_import_data ( LdifFile *ldifFile, AddressCache *cache );
gint ldif_read_tags ( LdifFile *ldifFile );
GList *ldif_get_fieldlist ( LdifFile *ldifFile );
gboolean ldif_write_value ( FILE *stream, const gchar *name,
const gchar *value );
void ldif_write_eor ( FILE *stream );
#endif /* __LDIF_H__ */
|