2 * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
3 * Copyright (C) 2001 Match Grun
5 * This program is free software; you can redistribute it and/or modify
6 * it under the terms of the GNU General Public License as published by
7 * the Free Software Foundation; either version 2 of the License, or
8 * (at your option) any later version.
10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
21 * Definitions necessary to access VCard files. VCard files are used
22 * by GnomeCard for addressbook, and Netscape for sending business
23 * card information. Refer to RFC2426 for more information.
33 #include "addrcache.h"
35 #define LDIFBUFSIZE 2048
37 #define LDIF_TAG_COMMONNAME "cn"
38 #define LDIF_TAG_FIRSTNAME "givenname"
39 #define LDIF_TAG_LASTNAME "sn"
40 #define LDIF_TAG_NICKNAME "xmozillanickname"
41 #define LDIF_TAG_EMAIL "mail"
43 #define LDIF_SEP_TAG ':'
46 // Typical LDIF entry (similar to that generated by Netscape):
48 // dn: uid=axel, dc=axel, dc=com
52 // xmozillanickname: Axel
53 // mail: axel@axelrose.com
54 // mail: axelrose@aol.com
55 // mail: axel@netscape.net
56 // mail: axel@hotmail.com
61 // streetaddress: 777 Lexington Avenue
64 // telephonenumber: 303-555-1234
65 // homephone: 303-555-2345
66 // cellphone: 303-555-3456
67 // homeurl: http://www.axelrose.com
69 // objectclass: person
71 // Note that first entry is always dn. Empty line defines end of record.
76 typedef struct _LdifFile LdifFile;
81 gchar buffer[ LDIFBUFSIZE ];
82 // AddressCache *addressCache;
86 /* Function prototypes */
87 LdifFile *ldif_create ( void );
88 void ldif_set_file ( LdifFile* ldifFile, const gchar *value );
89 void ldif_free ( LdifFile *ldifFile );
90 gint ldif_import_data ( LdifFile *ldifFile, AddressCache *cache );
92 #endif /* __LDIF_H__ */