Commit 6244a0b3 authored by blam's avatar blam

Merge branch 'jb52916-buteo-plugin-api' into 'master'

[buteo-sync-plugins-social] Adapt to changes in Buteo plugin API. JB#52916

See merge request !92
parents 8c7025ea 1d80cc47
......@@ -13,7 +13,7 @@ BuildRequires: pkgconfig(Qt5Gui)
BuildRequires: pkgconfig(Qt5Contacts)
BuildRequires: qt5-qttools-linguist
BuildRequires: pkgconfig(mlite5)
BuildRequires: pkgconfig(buteosyncfw5) >= 0.6.36
BuildRequires: pkgconfig(buteosyncfw5) >= 0.10.0
BuildRequires: pkgconfig(libsignon-qt5)
BuildRequires: pkgconfig(accounts-qt5) >= 1.13
BuildRequires: pkgconfig(socialcache) >= 0.0.48
......@@ -35,10 +35,7 @@ A Buteo plugin which provides data synchronization with various social services.
%files
%defattr(-,root,root,-)
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/sociald-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libsociald-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libsociald-client.so
%config %{_sysconfdir}/buteo/profiles/client/sociald.xml
%config %{_sysconfdir}/buteo/profiles/sync/sociald.All.xml
%{_libdir}/libsyncpluginscommon.so.*
......@@ -60,24 +57,15 @@ Provides: sociald-facebook-signon
%files facebook
# calendar:
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/facebook-calendars-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libfacebook-calendars-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libfacebook-calendars-client.so
%config %{_sysconfdir}/buteo/profiles/client/facebook-calendars.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Calendars.xml
# images:
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/facebook-images-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libfacebook-images-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libfacebook-images-client.so
%config %{_sysconfdir}/buteo/profiles/client/facebook-images.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Images.xml
# signon
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/facebook-signon-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libfacebook-signon-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libfacebook-signon-client.so
%config %{_sysconfdir}/buteo/profiles/client/facebook-signon.xml
%config %{_sysconfdir}/buteo/profiles/sync/facebook.Signon.xml
......@@ -123,24 +111,15 @@ Provides: sociald-google-signon
%files google
# calendar
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/google-calendars-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libgoogle-calendars-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libgoogle-calendars-client.so
%config %{_sysconfdir}/buteo/profiles/client/google-calendars.xml
%config %{_sysconfdir}/buteo/profiles/sync/google.Calendars.xml
# contacts
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/google-contacts-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libgoogle-contacts-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libgoogle-contacts-client.so
%config %{_sysconfdir}/buteo/profiles/client/google-contacts.xml
%config %{_sysconfdir}/buteo/profiles/sync/google.Contacts.xml
# signon
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/google-signon-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libgoogle-signon-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libgoogle-signon-client.so
%config %{_sysconfdir}/buteo/profiles/client/google-signon.xml
%config %{_sysconfdir}/buteo/profiles/sync/google.Signon.xml
......@@ -180,18 +159,12 @@ Provides: sociald-twitter-posts
%files twitter
# notifications
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/twitter-notifications-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libtwitter-notifications-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libtwitter-notifications-client.so
%config %{_sysconfdir}/buteo/profiles/client/twitter-notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Notifications.xml
%{_datadir}/translations/lipstick-jolla-home-twitter-notif_eng_en.qm
# posts
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/twitter-posts-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libtwitter-posts-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libtwitter-posts-client.so
%config %{_sysconfdir}/buteo/profiles/client/twitter-posts.xml
%config %{_sysconfdir}/buteo/profiles/sync/twitter.Posts.xml
......@@ -228,26 +201,17 @@ Provides: sociald-onedrive-backup
%files onedrive
# signon
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/onedrive-signon-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libonedrive-signon-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libonedrive-signon-client.so
%config %{_sysconfdir}/buteo/profiles/client/onedrive-signon.xml
%config %{_sysconfdir}/buteo/profiles/sync/onedrive.Signon.xml
# images
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/onedrive-images-client
%{_libdir}/buteo-plugins-qt5/oopp/libonedrive-images-client.so
# backup
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libonedrive-images-client.so
%config %{_sysconfdir}/buteo/profiles/client/onedrive-images.xml
%config %{_sysconfdir}/buteo/profiles/sync/onedrive.Images.xml
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/onedrive-backup-client
%{_libdir}/buteo-plugins-qt5/oopp/onedrive-backupquery-client
%{_libdir}/buteo-plugins-qt5/oopp/onedrive-backuprestore-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libonedrive-backup-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libonedrive-backup-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libonedrive-backupquery-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libonedrive-backuprestore-client.so
#%%{_libdir}/buteo-plugins-qt5/libonedrive-backupquery-client.so
#%%{_libdir}/buteo-plugins-qt5/libonedrive-backuprestore-client.so
%config %{_sysconfdir}/buteo/profiles/client/onedrive-backup.xml
......@@ -305,38 +269,24 @@ Provides: sociald-vk-images
%files vk
# posts
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/vk-posts-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libvk-posts-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libvk-posts-client.so
%config %{_sysconfdir}/buteo/profiles/client/vk-posts.xml
%config %{_sysconfdir}/buteo/profiles/sync/vk.Posts.xml
# notifications
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/vk-notifications-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libvk-notifications-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libvk-notifications-client.so
%config %{_sysconfdir}/buteo/profiles/client/vk-notifications.xml
%config %{_sysconfdir}/buteo/profiles/sync/vk.Notifications.xml
# calendars
#out-of-proces-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/vk-calendars-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libvk-calendars-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libvk-calendars-client.so
%config %{_sysconfdir}/buteo/profiles/client/vk-calendars.xml
%config %{_sysconfdir}/buteo/profiles/sync/vk.Calendars.xml
# contacts
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/vk-contacts-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libvk-contacts-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libvk-contacts-client.so
%config %{_sysconfdir}/buteo/profiles/client/vk-contacts.xml
%config %{_sysconfdir}/buteo/profiles/sync/vk.Contacts.xml
# images
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/vk-images-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libvk-images-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libvk-images-client.so
%config %{_sysconfdir}/buteo/profiles/client/vk-images.xml
%config %{_sysconfdir}/buteo/profiles/sync/vk.Images.xml
......@@ -392,19 +342,13 @@ Provides: sociald-dropbox-backup
%files dropbox
# images
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/dropbox-images-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libdropbox-images-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libdropbox-images-client.so
%config %{_sysconfdir}/buteo/profiles/client/dropbox-images.xml
%config %{_sysconfdir}/buteo/profiles/sync/dropbox.Images.xml
# backup
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/dropbox-backup-client
%{_libdir}/buteo-plugins-qt5/oopp/dropbox-backupquery-client
%{_libdir}/buteo-plugins-qt5/oopp/dropbox-backuprestore-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/libdropbox-backup-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libdropbox-backup-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libdropbox-backupquery-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libdropbox-backuprestore-client.so
#%%{_libdir}/buteo-plugins-qt5/libdropbox-backupquery-client.so
#%%{_libdir}/buteo-plugins-qt5/libdropbox-backuprestore-client.so
%config %{_sysconfdir}/buteo/profiles/client/dropbox-backup.xml
......@@ -452,10 +396,7 @@ systemctl-user try-restart msyncd.service || :
%files knowncontacts
%defattr(-,root,root,-)
#out-of-process-plugin form:
%{_libdir}/buteo-plugins-qt5/oopp/knowncontacts-client
#in-process-plugin form:
#%%{_libdir}/buteo-plugins-qt5/knowncontacts-client.so
%{_libdir}/buteo-plugins-qt5/oopp/libknowncontacts-client.so
%{_sysconfdir}/buteo/profiles/client/knowncontacts.xml
%{_sysconfdir}/buteo/profiles/sync/knowncontacts.Contacts.xml
......@@ -476,7 +417,7 @@ Summary: Translation source for sociald
%setup -q -n %{name}-%{version}
%build
%qmake5 "DEFINES+=OUT_OF_PROCESS_PLUGIN" \
%qmake5 \
"CONFIG+=dropbox" \
"CONFIG+=facebook" \
"CONFIG+=google" \
......
......@@ -34,27 +34,6 @@ contains(DEFINES, 'SOCIALD_USE_QTPIM') {
HEADERS += contactmanagerengine.h
}
!contains (DEFINES, OUT_OF_PROCESS_PLUGIN) {
TEMPLATE = lib
CONFIG += plugin
target.path = $$[QT_INSTALL_LIBS]/buteo-plugins-qt5
message("building" $$TARGET "as in-process plugin")
}
contains (DEFINES, OUT_OF_PROCESS_PLUGIN) {
TEMPLATE = app
target.path = $$[QT_INSTALL_LIBS]/buteo-plugins-qt5/oopp
message("building" $$TARGET "as out-of-process plugin")
DEFINES += CLIENT_PLUGIN
BUTEO_OOPP_INCLUDE_DIR = $$system(pkg-config --cflags buteosyncfw5|cut -f2 -d'I')
INCLUDEPATH += $$BUTEO_OOPP_INCLUDE_DIR
HEADERS += $$BUTEO_OOPP_INCLUDE_DIR/ButeoPluginIfaceAdaptor.h \
$$BUTEO_OOPP_INCLUDE_DIR/PluginCbImpl.h \
$$BUTEO_OOPP_INCLUDE_DIR/PluginServiceObj.h
SOURCES += $$BUTEO_OOPP_INCLUDE_DIR/ButeoPluginIfaceAdaptor.cpp \
$$BUTEO_OOPP_INCLUDE_DIR/PluginCbImpl.cpp \
$$BUTEO_OOPP_INCLUDE_DIR/PluginServiceObj.cpp \
$$BUTEO_OOPP_INCLUDE_DIR/plugin_main.cpp
}
TEMPLATE = lib
CONFIG += plugin
target.path = $$[QT_INSTALL_LIBS]/buteo-plugins-qt5/oopp
......@@ -25,19 +25,13 @@
#include <QtCore/qglobal.h>
#include "buteosyncfw_p.h"
#if defined(OUT_OF_PROCESS_PLUGIN)
# define SOCIALDBUTEOPLUGIN_EXPORT Q_DECL_EXPORT
#else
# define SOCIALDBUTEOPLUGIN_EXPORT Q_DECL_IMPORT
#endif
/*
Datatype-specific implementations of this class
allow per-account sync profiles for that data type.
*/
class SocialNetworkSyncAdaptor;
class SOCIALDBUTEOPLUGIN_EXPORT SocialdButeoPlugin : public Buteo::ClientPlugin
class Q_DECL_EXPORT SocialdButeoPlugin : public Buteo::ClientPlugin
{
Q_OBJECT
......
TARGET = dropbox-backup-client
DEFINES += "CLASSNAME=DropboxBackupPlugin"
DEFINES += CLASSNAME_H=\\\"dropboxbackupplugin.h\\\"
include($$PWD/../../common.pri)
include($$PWD/../dropbox-common.pri)
include($$PWD/../dropbox-backupoperation.pri)
......
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -22,18 +23,6 @@
#include "dropboxbackupsyncadaptor.h"
#include "socialnetworksyncadaptor.h"
extern "C" DropboxBackupPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
{
return new DropboxBackupPlugin(pluginName, profile, callbackInterface);
}
extern "C" void destroyPlugin(DropboxBackupPlugin* plugin)
{
delete plugin;
}
DropboxBackupPlugin::DropboxBackupPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
......@@ -51,3 +40,12 @@ SocialNetworkSyncAdaptor *DropboxBackupPlugin::createSocialNetworkSyncAdaptor()
{
return new DropboxBackupSyncAdaptor(this);
}
Buteo::ClientPlugin* DropboxBackupPluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new DropboxBackupPlugin(pluginName, profile, cbInterface);
}
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -23,7 +24,9 @@
#include "socialdbuteoplugin.h"
class SOCIALDBUTEOPLUGIN_EXPORT DropboxBackupPlugin : public SocialdButeoPlugin
#include <buteosyncfw5/SyncPluginLoader.h>
class Q_DECL_EXPORT DropboxBackupPlugin : public SocialdButeoPlugin
{
Q_OBJECT
......@@ -37,10 +40,16 @@ protected:
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};
extern "C" DropboxBackupPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *cbInterface);
class DropboxBackupPluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.DropboxBackupPluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)
extern "C" void destroyPlugin(DropboxBackupPlugin* client);
public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};
#endif // DROPBOXBACKUPPLUGIN_H
TARGET = dropbox-backupquery-client
DEFINES += "CLASSNAME=DropboxBackupQueryPlugin"
DEFINES += CLASSNAME_H=\\\"dropboxbackupqueryplugin.h\\\"
include($$PWD/../../common.pri)
include($$PWD/../dropbox-common.pri)
include($$PWD/../dropbox-backupoperation.pri)
......
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -22,18 +23,6 @@
#include "dropboxbackupquerysyncadaptor.h"
#include "socialnetworksyncadaptor.h"
extern "C" DropboxBackupQueryPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
{
return new DropboxBackupQueryPlugin(pluginName, profile, callbackInterface);
}
extern "C" void destroyPlugin(DropboxBackupQueryPlugin* plugin)
{
delete plugin;
}
DropboxBackupQueryPlugin::DropboxBackupQueryPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
......@@ -51,3 +40,11 @@ SocialNetworkSyncAdaptor *DropboxBackupQueryPlugin::createSocialNetworkSyncAdapt
{
return new DropboxBackupQuerySyncAdaptor(this);
}
Buteo::ClientPlugin* DropboxBackupQueryPluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new DropboxBackupQueryPlugin(pluginName, profile, cbInterface);
}
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -23,7 +24,9 @@
#include "socialdbuteoplugin.h"
class SOCIALDBUTEOPLUGIN_EXPORT DropboxBackupQueryPlugin : public SocialdButeoPlugin
#include <buteosyncfw5/SyncPluginLoader.h>
class Q_DECL_EXPORT DropboxBackupQueryPlugin : public SocialdButeoPlugin
{
Q_OBJECT
......@@ -37,10 +40,16 @@ protected:
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};
extern "C" DropboxBackupQueryPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *cbInterface);
class DropboxBackupQueryPluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.DropboxBackupQueryPluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)
extern "C" void destroyPlugin(DropboxBackupQueryPlugin* client);
public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};
#endif // DROPBOXBACKUPQUERYPLUGIN_H
TARGET = dropbox-backuprestore-client
DEFINES += "CLASSNAME=DropboxBackupRestorePlugin"
DEFINES += CLASSNAME_H=\\\"dropboxbackuprestoreplugin.h\\\"
include($$PWD/../../common.pri)
include($$PWD/../dropbox-common.pri)
include($$PWD/../dropbox-backupoperation.pri)
......
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -22,18 +23,6 @@
#include "dropboxbackuprestoresyncadaptor.h"
#include "socialnetworksyncadaptor.h"
extern "C" DropboxBackupRestorePlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
{
return new DropboxBackupRestorePlugin(pluginName, profile, callbackInterface);
}
extern "C" void destroyPlugin(DropboxBackupRestorePlugin* plugin)
{
delete plugin;
}
DropboxBackupRestorePlugin::DropboxBackupRestorePlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
......@@ -51,3 +40,11 @@ SocialNetworkSyncAdaptor *DropboxBackupRestorePlugin::createSocialNetworkSyncAda
{
return new DropboxBackupRestoreSyncAdaptor(this);
}
Buteo::ClientPlugin* DropboxBackupRestorePluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new DropboxBackupRestorePlugin(pluginName, profile, cbInterface);
}
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -23,7 +24,9 @@
#include "socialdbuteoplugin.h"
class SOCIALDBUTEOPLUGIN_EXPORT DropboxBackupRestorePlugin : public SocialdButeoPlugin
#include <buteosyncfw5/SyncPluginLoader.h>
class Q_DECL_EXPORT DropboxBackupRestorePlugin : public SocialdButeoPlugin
{
Q_OBJECT
......@@ -37,10 +40,16 @@ protected:
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};
extern "C" DropboxBackupRestorePlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *cbInterface);
class DropboxBackupRestorePluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.DropboxBackupRestorePluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)
extern "C" void destroyPlugin(DropboxBackupRestorePlugin* client);
public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};
#endif // DROPBOXBACKUPRESTOREPLUGIN_H
TARGET = dropbox-images-client
DEFINES += "CLASSNAME=DropboxImagesPlugin"
DEFINES += CLASSNAME_H=\\\"dropboximagesplugin.h\\\"
include($$PWD/../../common.pri)
include($$PWD/../dropbox-common.pri)
include($$PWD/dropbox-images.pri)
......
/****************************************************************************
**
** Copyright (C) 2015 Jolla Ltd.
** Contact: Jonni Rainisto <jonni.rainisto@jolla.com>
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -23,18 +22,6 @@
#include "dropboximagesyncadaptor.h"
#include "socialnetworksyncadaptor.h"
extern "C" DropboxImagesPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
{
return new DropboxImagesPlugin(pluginName, profile, callbackInterface);
}
extern "C" void destroyPlugin(DropboxImagesPlugin* plugin)
{
delete plugin;
}
DropboxImagesPlugin::DropboxImagesPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
......@@ -52,3 +39,11 @@ SocialNetworkSyncAdaptor *DropboxImagesPlugin::createSocialNetworkSyncAdaptor()
{
return new DropboxImageSyncAdaptor(this);
}
Buteo::ClientPlugin* DropboxImagesPluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new DropboxImagesPlugin(pluginName, profile, cbInterface);
}
/****************************************************************************
**
** Copyright (C) 2015 Jolla Ltd.
** Contact: Jonni Rainisto <jonni.rainisto@jolla.com>
** Copyright (c) 2015 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -24,7 +23,9 @@
#include "socialdbuteoplugin.h"
class SOCIALDBUTEOPLUGIN_EXPORT DropboxImagesPlugin : public SocialdButeoPlugin
#include <buteosyncfw5/SyncPluginLoader.h>
class Q_DECL_EXPORT DropboxImagesPlugin : public SocialdButeoPlugin
{
Q_OBJECT
......@@ -38,10 +39,16 @@ protected:
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};
extern "C" DropboxImagesPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *cbInterface);
class DropboxImagesPluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.DropboxImagesPluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)
extern "C" void destroyPlugin(DropboxImagesPlugin* client);
public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};
#endif // DROPBOXIMAGESPLUGIN_H
TARGET = facebook-calendars-client
DEFINES += "CLASSNAME=FacebookCalendarsPlugin"
DEFINES += CLASSNAME_H=\\\"facebookcalendarsplugin.h\\\"
include($$PWD/../../common.pri)
include($$PWD/../facebook-common.pri)
include($$PWD/facebook-calendars.pri)
......
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Chris Adams <chris.adams@jolla.com>
** Copyright (c) 2014 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -23,18 +22,6 @@
#include "facebookcalendarsyncadaptor.h"
#include "socialnetworksyncadaptor.h"
extern "C" FacebookCalendarsPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
{
return new FacebookCalendarsPlugin(pluginName, profile, callbackInterface);
}
extern "C" void destroyPlugin(FacebookCalendarsPlugin* plugin)
{
delete plugin;
}
FacebookCalendarsPlugin::FacebookCalendarsPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
......@@ -52,3 +39,12 @@ SocialNetworkSyncAdaptor *FacebookCalendarsPlugin::createSocialNetworkSyncAdapto
{
return new FacebookCalendarSyncAdaptor(this);
}
Buteo::ClientPlugin* FacebookCalendarsPluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new FacebookCalendarsPlugin(pluginName, profile, cbInterface);
}
/****************************************************************************
**
** Copyright (C) 2014 Jolla Ltd.
** Contact: Chris Adams <chris.adams@jolla.com>
** Copyright (c) 2014 - 2021 Jolla Ltd.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -24,7 +23,9 @@
#include "socialdbuteoplugin.h"
class SOCIALDBUTEOPLUGIN_EXPORT FacebookCalendarsPlugin : public SocialdButeoPlugin
#include <buteosyncfw5/SyncPluginLoader.h>
class Q_DECL_EXPORT FacebookCalendarsPlugin : public SocialdButeoPlugin
{
Q_OBJECT
......@@ -38,10 +39,16 @@ protected:
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};
extern "C" FacebookCalendarsPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *cbInterface);
class FacebookCalendarsPluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.FacebookCalendarsPluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)
extern "C" void destroyPlugin(FacebookCalendarsPlugin* client);
public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};
#endif // FACEBOOKCALENDARSPLUGIN_H