ContactsChangeNotifierPlugin.h
/*
* This file is part of buteo-sync-plugins package
*
* Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies).
* Copyright (C) 2013 - 2021 Jolla Ltd.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as published by the Free Software Foundation.
*
* This library is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA
*
*/
#ifndef CONTACTSCHANGENOTIFIERPLUGIN_H
#define CONTACTSCHANGENOTIFIERPLUGIN_H
#include "StorageChangeNotifierPlugin.h"
#include "StorageChangeNotifierPluginLoader.h"
class ContactsChangeNotifier;
class ContactsChangeNotifierPlugin : public Buteo::StorageChangeNotifierPlugin
{
Q_OBJECT
public:
ContactsChangeNotifierPlugin(const QString& aStorageName);
~ContactsChangeNotifierPlugin();
QString name() const;
bool hasChanges() const;
void changesReceived();
void enable();
void disable(bool disableAfterNextChange = false);
private Q_SLOTS:
void onChange();
private:
ContactsChangeNotifier* icontactsChangeNotifier;
bool ihasChanges;
bool iDisableLater;
};
class ContactsChangeNotifierPluginLoader : public Buteo::StorageChangeNotifierPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "com.buteo.plugins.storage.ContactsChangeNotifierPluginLoader")
Q_INTERFACES(Buteo::StorageChangeNotifierPluginLoader)
public:
Buteo::StorageChangeNotifierPlugin* createPlugin(const QString& aStorageName) override;
};
#endif
ContactsChangeNotifierPluginLoader
Definition ContactsChangeNotifierPlugin.h:77
ContactsChangeNotifierPlugin::enable
void enable()
see StorageChangeNotifierPlugin::enable
ContactsChangeNotifierPlugin::hasChanges
bool hasChanges() const
see StorageChangeNotifierPlugin::hasChanges
ContactsChangeNotifierPlugin::ContactsChangeNotifierPlugin
ContactsChangeNotifierPlugin(const QString &aStorageName)
constructor see StorageChangeNotifierPlugin
ContactsChangeNotifierPlugin::disable
void disable(bool disableAfterNextChange=false)
see StorageChangeNotifierPlugin::disable
ContactsChangeNotifierPlugin::~ContactsChangeNotifierPlugin
~ContactsChangeNotifierPlugin()
destructor
ContactsChangeNotifierPlugin::changesReceived
void changesReceived()
see StorageChangeNotifierPlugin::changesReceived
ContactsChangeNotifierPlugin::name
QString name() const
see StorageChangeNotifierPlugin::name
ContactsChangeNotifier
Definition ContactsChangeNotifier.h:14