• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

kabc

  • kabc
  • plugins
  • dir
resourcedir.h
1/*
2 This file is part of libkabc.
3 Copyright (c) 2002 - 2003 Tobias Koenig <tokoe@kde.org>
4
5 This library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Library General Public
7 License as published by the Free Software Foundation; either
8 version 2 of the License, or (at your option) any later version.
9
10 This library 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 GNU
13 Library General Public License for more details.
14
15 You should have received a copy of the GNU Library General Public License
16 along with this library; see the file COPYING.LIB. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
19*/
20
21#ifndef KABC_RESOURCEDIR_H
22#define KABC_RESOURCEDIR_H
23
24#include "kabc_dir_export.h"
25
26#include "kabc/resource.h"
27#include <kdirwatch.h>
28#include <sys/types.h>
29
30namespace KABC {
31
32class Format;
33
37class KABC_DIR_EXPORT ResourceDir : public Resource
38{
39 Q_OBJECT
40
41 public:
42 ResourceDir();
43 explicit ResourceDir( const KConfigGroup &group );
44 explicit ResourceDir( const QString &path, const QString &type = QLatin1String( "vcard" ) );
45 ~ResourceDir();
46
47 virtual void writeConfig( KConfigGroup &group );
48
49 virtual bool doOpen();
50 virtual void doClose();
51
52 virtual Ticket *requestSaveTicket();
53 virtual void releaseSaveTicket( Ticket *ticket );
54
55 virtual bool load();
56 virtual bool asyncLoad();
57 virtual bool save( Ticket * ticket );
58 virtual bool asyncSave( Ticket * ticket );
59
63 void setPath( const QString & );
64
68 QString path() const;
69
73 void setFormat( const QString &format );
74
78 QString format() const;
79
88 virtual void removeAddressee( const Addressee &addr );
89
90 private:
91 class Private;
92 Private *const d;
93
94 Q_PRIVATE_SLOT( d, void pathChanged() )
95};
96
97}
98
99#endif
KABC::Addressee
address book entry
Definition addressee.h:79
KABC::Format
Base class for address book formats.
Definition format.h:43
KABC::ResourceDir::load
virtual bool load()
Loads all addressees synchronously.
Definition resourcedir.cpp:207
KABC::ResourceDir::writeConfig
virtual void writeConfig(KConfigGroup &group)
Writes the resource specific config to file.
Definition resourcedir.cpp:134
KABC::ResourceDir::asyncSave
virtual bool asyncSave(Ticket *ticket)
Saves all addressees asynchronously.
Definition resourcedir.cpp:284
KABC::ResourceDir::removeAddressee
virtual void removeAddressee(const Addressee &addr)
Remove a addressee from its source.
Definition resourcedir.cpp:327
KABC::ResourceDir::setFormat
void setFormat(const QString &format)
Set the format by name.
Definition resourcedir.cpp:312
KABC::ResourceDir::releaseSaveTicket
virtual void releaseSaveTicket(Ticket *ticket)
Releases the ticket previousely requested with requestSaveTicket().
Definition resourcedir.cpp:170
KABC::ResourceDir::format
QString format() const
Returns the format name.
Definition resourcedir.cpp:322
KABC::ResourceDir::save
virtual bool save(Ticket *ticket)
Saves all addressees synchronously.
Definition resourcedir.cpp:251
KABC::ResourceDir::path
QString path() const
Return path used for loading and saving the address book.
Definition resourcedir.cpp:307
KABC::ResourceDir::requestSaveTicket
virtual Ticket * requestSaveTicket()
Request a ticket, you have to pass through save() to allow locking.
Definition resourcedir.cpp:147
KABC::ResourceDir::asyncLoad
virtual bool asyncLoad()
Loads all addressees asyncronously.
Definition resourcedir.cpp:237
KABC::ResourceDir::setPath
void setPath(const QString &)
Set path to be used for saving.
Definition resourcedir.cpp:295
KABC::Resource::Resource
Resource()
Default constructor.
Definition resource.cpp:218
KABC::Ticket
Helper class for handling coordinated save of address books.
Definition resource.h:38
KRES::Resource::type
QString type() const
KABC
Class that holds a Calendar Url (FBURL/CALADRURI/CALURI)
Definition address.h:29
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 17 2025 00:00:00 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kabc

Skip menu "kabc"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal