Commit 1388ea9e authored by Laurent Montel's avatar Laurent Montel 😁

Rename class

parent 26426399
......@@ -27,7 +27,7 @@
#include "util/mailutil.h"
#include "pimcommon/util/pimutil.h"
#include "pimcommon/util/imapresourcemanager.h"
#include "pimcommon/util/imapresourcecapabilitiesmanager.h"
#include <Akonadi/AgentManager>
#include <Akonadi/AttributeFactory>
#include <Akonadi/Collection>
......
......@@ -22,7 +22,7 @@
#include "pop3settings.h"
#include "pimcommon/util/pimutil.h"
#include "pimcommon/util/imapresourcemanager.h"
#include "pimcommon/util/imapresourcecapabilitiesmanager.h"
#include <Akonadi/AgentInstance>
#include <Akonadi/AgentManager>
......@@ -62,7 +62,7 @@ Kernel::Kernel( QObject *parent ) : QObject( parent )
mKernelIf = 0;
mSettingsIf = 0;
mFilterIf = 0;
mImapResourceManager = new PimCommon::ImapResourceManager(this);
mImapResourceManager = new PimCommon::ImapResourceCapabilitiesManager(this);
}
Kernel::~Kernel()
......@@ -75,7 +75,7 @@ Kernel *Kernel::self()
return sInstance->kernel; //will create it
}
PimCommon::ImapResourceManager *Kernel::imapResourceManager() const
PimCommon::ImapResourceCapabilitiesManager *Kernel::imapResourceManager() const
{
return mImapResourceManager;
}
......
......@@ -29,7 +29,7 @@
#include <QObject>
namespace PimCommon {
class ImapResourceManager;
class ImapResourceCapabilitiesManager;
}
namespace MailCommon {
......@@ -163,7 +163,7 @@ public:
void emergencyExit( const QString &reason );
PimCommon::ImapResourceManager *imapResourceManager() const;
PimCommon::ImapResourceCapabilitiesManager *imapResourceManager() const;
private:
void findCreateDefaultCollection( Akonadi::SpecialMailCollections::Type );
......@@ -183,7 +183,7 @@ private:
IKernel *mKernelIf;
IFilter *mFilterIf;
ISettings *mSettingsIf;
PimCommon::ImapResourceManager *mImapResourceManager;
PimCommon::ImapResourceCapabilitiesManager *mImapResourceManager;
};
}
......
......@@ -184,7 +184,7 @@ set(libpimcommon_SRCS
util/createresource.cpp
util/pimutil.cpp
util/editorutil.cpp
util/imapresourcemanager.cpp
util/imapresourcecapabilitiesmanager.cpp
settings/pimcommonsettings.cpp
${libpimcommon_texteditor_SRCS}
${libpimcommon_shorturl_SRCS}
......
......@@ -15,7 +15,7 @@
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "imapresourcemanager.h"
#include "imapresourcecapabilitiesmanager.h"
#include "util/pimutil.h"
#include <Akonadi/AgentManager>
#include <Akonadi/DBusConnectionPool>
......@@ -25,30 +25,29 @@
#include <QDebug>
using namespace PimCommon;
ImapResourceManager::ImapResourceManager(QObject *parent)
ImapResourceCapabilitiesManager::ImapResourceCapabilitiesManager(QObject *parent)
: QObject(parent)
{
init();
}
ImapResourceManager::~ImapResourceManager()
ImapResourceCapabilitiesManager::~ImapResourceCapabilitiesManager()
{
}
void ImapResourceManager::slotInstanceAdded(const Akonadi::AgentInstance &instance)
void ImapResourceCapabilitiesManager::slotInstanceAdded(const Akonadi::AgentInstance &instance)
{
searchCapabilities(instance.identifier());
}
void ImapResourceManager::slotInstanceRemoved(const Akonadi::AgentInstance &instance)
void ImapResourceCapabilitiesManager::slotInstanceRemoved(const Akonadi::AgentInstance &instance)
{
mImapResource.remove(instance.identifier());
}
void ImapResourceManager::searchCapabilities(const QString &identifier)
void ImapResourceCapabilitiesManager::searchCapabilities(const QString &identifier)
{
qDebug()<<" void ImapResourceManager::searchCapabilities(const QString &identifier)"<<identifier;
//By default makes it as true.
mImapResource.insert(identifier, true);
QDBusInterface iface(
......@@ -65,7 +64,7 @@ void ImapResourceManager::searchCapabilities(const QString &identifier)
}
}
void ImapResourceManager::slotCapabilities(QDBusPendingCallWatcher* watcher)
void ImapResourceCapabilitiesManager::slotCapabilities(QDBusPendingCallWatcher* watcher)
{
QDBusPendingReply<QStringList> reply = *watcher;
if ( reply.isValid() ) {
......@@ -79,7 +78,7 @@ void ImapResourceManager::slotCapabilities(QDBusPendingCallWatcher* watcher)
watcher = 0;
}
void ImapResourceManager::init()
void ImapResourceCapabilitiesManager::init()
{
Q_FOREACH ( const Akonadi::AgentInstance &instance, Akonadi::AgentManager::self()->instances() ) {
const QString identifier = instance.identifier();
......@@ -91,7 +90,7 @@ void ImapResourceManager::init()
connect( Akonadi::AgentManager::self(), SIGNAL(instanceRemoved(Akonadi::AgentInstance)), SLOT(slotInstanceRemoved(Akonadi::AgentInstance)) );
}
bool ImapResourceManager::hasAnnotationSupport(const QString &identifier) const
bool ImapResourceCapabilitiesManager::hasAnnotationSupport(const QString &identifier) const
{
if (!PimCommon::Util::isImapResource(identifier)) {
return false;
......
......@@ -27,12 +27,12 @@ namespace Akonadi {
class AgentInstance;
}
namespace PimCommon {
class PIMCOMMON_EXPORT ImapResourceManager : public QObject
class PIMCOMMON_EXPORT ImapResourceCapabilitiesManager : public QObject
{
Q_OBJECT
public:
explicit ImapResourceManager(QObject *parent = 0);
~ImapResourceManager();
explicit ImapResourceCapabilitiesManager(QObject *parent = 0);
~ImapResourceCapabilitiesManager();
bool hasAnnotationSupport(const QString &identifier) const;
private Q_SLOTS:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment