KContacts

ldifconverter.h
1/*
2 This file is part of the KContacts framework.
3 SPDX-FileCopyrightText: 2003 Helge Deller <deller@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KCONTACTS_LDIFCONVERTER_H
9#define KCONTACTS_LDIFCONVERTER_H
10
11#include "addressee.h"
12#include "contactgroup.h"
13
14#include <QDateTime>
15#include <QString>
16
17namespace KContacts
18{
19/**
20 A set of functions to convert a string with LDIF information to addressees
21 and vice versa. It is useful for addressbook import- and exportfilters
22 and might be used to read and write Mozilla and Netscape addresssbooks.
23*/
24
25namespace LDIFConverter
26{
27/**
28 Converts a LDIF string to a list of addressees.
29
30 @param str The vcard string.
31 @param addrList The addresseelist.
32 @param contactGroupList the contactGroupList
33 @param dt The date & time value of the last modification (e.g. file modification time).
34*/
35Q_REQUIRED_RESULT KCONTACTS_EXPORT bool LDIFToAddressee(const QString &str,
36 AddresseeList &addrList,
37 QList<KContacts::ContactGroup> &contactGroupList,
39
40/**
41 Converts a list of addressees to a LDIF string.
42
43 @param addrList The addresseelist.
44 @param str The LDIF string.
45*/
46Q_REQUIRED_RESULT KCONTACTS_EXPORT bool addresseeToLDIF(const AddresseeList &addrList, QString &str);
47
48/**
49 Converts a list of addressees and contactgrouplist to a LDIF string.
50
51 @param addrList The addresseelist.
52 @param contactGroupList The contact group list
53 @param str The LDIF string.
54
55*/
56Q_REQUIRED_RESULT KCONTACTS_EXPORT bool
58/**
59 Converts an addressee to a LDIF string.
60
61 @param addr The addressee.
62 @param str The LDIF string.
63*/
64Q_REQUIRED_RESULT KCONTACTS_EXPORT bool addresseeToLDIF(const Addressee &addr, QString &str);
65
66/**
67 Converts a list of contact group to a LDIF string.
68
69 @param contactGroupList The contact group list
70 @param str The LDIF string.
71*/
72Q_REQUIRED_RESULT KCONTACTS_EXPORT bool contactGroupToLDIF(const ContactGroup::List &contactGroupList, QString &str);
73
74/**
75 Converts a contact group to a LDIF string.
76
77 @param contactGroup The contact group
78 @param str The LDIF string.
79*/
80Q_REQUIRED_RESULT KCONTACTS_EXPORT bool contactGroupToLDIF(const ContactGroup &contactGroup, QString &str);
81}
82}
83#endif
address book entry
Definition addressee.h:70
This class represents a group of contacts.
KCONTACTS_EXPORT bool LDIFToAddressee(const QString &str, AddresseeList &addrList, QList< KContacts::ContactGroup > &contactGroupList, const QDateTime &dt=QDateTime::currentDateTime())
Converts a LDIF string to a list of addressees.
KCONTACTS_EXPORT bool addresseeToLDIF(const AddresseeList &addrList, QString &str)
Converts a list of addressees to a LDIF string.
KCONTACTS_EXPORT bool contactGroupToLDIF(const ContactGroup::List &contactGroupList, QString &str)
Converts a list of contact group to a LDIF string.
KCONTACTS_EXPORT bool addresseeAndContactGroupToLDIF(const AddresseeList &addrList, const QList< KContacts::ContactGroup > &contactGroupList, QString &str)
Converts a list of addressees and contactgrouplist to a LDIF string.
QDateTime currentDateTime()
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:08 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.