1/*
2 Copyright (c) 2006 Volker Krause <vkrause@kde.org>
3
4 This library is free software; you can redistribute it and/or modify it
5 under the terms of the GNU Library General Public License as published by
6 the Free Software Foundation; either version 2 of the License, or (at your
7 option) any later version.
8
9 This library is distributed in the hope that it will be useful, but WITHOUT
10 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
12 License for more details.
13
14 You should have received a copy of the GNU Library General Public License
15 along with this library; see the file COPYING.LIB. If not, write to the
16 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
17 02110-1301, USA.
18*/
19
20#ifndef AKONADI_SLAVE_H
21#define AKONADI_SLAVE_H
22
23#include <kio/slavebase.h>
24
25namespace Akonadi {
26class Item;
27class Collection;
28}
29
30class AkonadiSlave : public KIO::SlaveBase
31{
32 public:
33 AkonadiSlave( const QByteArray &pool_socket, const QByteArray &app_socket );
34 virtual ~AkonadiSlave();
35
36 /**
37 * Reimplemented from SlaveBase
38 */
39 virtual void get( const KUrl &url );
40
41 /**
42 * Reimplemented from SlaveBase
43 */
44 virtual void stat( const KUrl &url );
45
46 /**
47 * Reimplemented from SlaveBase
48 */
49 virtual void listDir( const KUrl &url );
50
51 /**
52 * Reimplemented from SlaveBase
53 */
54 virtual void del( const KUrl &url, bool isFile );
55
56 private:
57 static KIO::UDSEntry entryForItem( const Akonadi::Item &item );
58 static KIO::UDSEntry entryForCollection( const Akonadi::Collection &collection );
59};
60
61#endif
62