specialcollections_p.h

00001 /*
00002     Copyright (c) 2009 Constantin Berzan <exit3219@gmail.com>
00003 
00004     This library is free software; you can redistribute it and/or modify it
00005     under the terms of the GNU Library General Public License as published by
00006     the Free Software Foundation; either version 2 of the License, or (at your
00007     option) any later version.
00008 
00009     This library is distributed in the hope that it will be useful, but WITHOUT
00010     ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
00011     FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library General Public
00012     License for more details.
00013 
00014     You should have received a copy of the GNU Library General Public License
00015     along with this library; see the file COPYING.LIB.  If not, write to the
00016     Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
00017     02110-1301, USA.
00018 */
00019 
00020 #ifndef AKONADI_SPECIALCOLLECTIONS_P_H
00021 #define AKONADI_SPECIALCOLLECTIONS_P_H
00022 
00023 #include <QtCore/QHash>
00024 #include <QtCore/QString>
00025 
00026 #include "akonadiprivate_export.h"
00027 
00028 #include "akonadi/collection.h"
00029 
00030 class KCoreConfigSkeleton;
00031 class KJob;
00032 
00033 namespace Akonadi {
00034 
00035 class AgentInstance;
00036 class SpecialCollections;
00037 class Monitor;
00038 
00042 class AKONADI_TESTS_EXPORT SpecialCollectionsPrivate
00043 {
00044   public:
00045     SpecialCollectionsPrivate( KCoreConfigSkeleton *settings, SpecialCollections *qq );
00046     ~SpecialCollectionsPrivate();
00047 
00048     QString defaultResourceId() const;
00049     void emitChanged( const QString &resourceId );
00050     void collectionRemoved( const Collection &col ); // slot
00051 
00056     void forgetFoldersForResource( const QString &resourceId );
00057 
00064     void beginBatchRegister();
00065 
00070     void endBatchRegister();
00071 
00072     AgentInstance defaultResource() const;
00073 
00074     SpecialCollections *q;
00075     KCoreConfigSkeleton *mSettings;
00076     QHash<QString, QHash<QByteArray, Collection> > mFoldersForResource;
00077     bool mBatchMode;
00078     QSet<QString> mToEmitChangedFor;
00079     Monitor *mMonitor;
00080 };
00081 
00082 } // namespace Akonadi
00083 
00084 #endif // AKONADI_SPECIALCOLLECTIONS_P_H
KDE Home | KDE Accessibility Home | Description of Access Keys