Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge branch 'google_calendar_plugin' into 'master'
[buteo-sync-plugins-social] Fix google calendar plugin adaptation to api changes. JB#53994

See merge request mer-core/buteo-sync-plugins-social!95
  • Loading branch information
pvuorela committed Apr 22, 2021
2 parents 3c32e3d + 8f1f76e commit 8af8346
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 13 deletions.
12 changes: 10 additions & 2 deletions src/google/google-calendars/googlecalendarsplugin.cpp
Expand Up @@ -22,8 +22,6 @@
#include "googlecalendarsyncadaptor.h"
#include "socialnetworksyncadaptor.h"



GoogleCalendarsPlugin::GoogleCalendarsPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *callbackInterface)
Expand All @@ -41,3 +39,13 @@ SocialNetworkSyncAdaptor *GoogleCalendarsPlugin::createSocialNetworkSyncAdaptor(
{
return new GoogleCalendarSyncAdaptor(this);
}


Buteo::ClientPlugin* GoogleCalendarPluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new GoogleCalendarsPlugin(pluginName, profile, cbInterface);
}

12 changes: 12 additions & 0 deletions src/google/google-calendars/googlecalendarsplugin.h
Expand Up @@ -22,6 +22,7 @@
#define GOOGLECALENDARSPLUGIN_H

#include "socialdbuteoplugin.h"
#include <buteosyncfw5/SyncPluginLoader.h>

class Q_DECL_EXPORT GoogleCalendarsPlugin : public SocialdButeoPlugin
{
Expand All @@ -37,6 +38,17 @@ class Q_DECL_EXPORT GoogleCalendarsPlugin : public SocialdButeoPlugin
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};

class GoogleCalendarPluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.GoogleCalendarPluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)

public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};


#endif // GOOGLECALENDARSPLUGIN_H
9 changes: 9 additions & 0 deletions src/knowncontacts/knowncontactsplugin.cpp
Expand Up @@ -171,3 +171,12 @@ void KnownContactsPlugin::connectivityStateChanged(Sync::ConnectivityType type,
FUNCTION_CALL_TRACE;
// Stub
}

Buteo::ClientPlugin* KnownContactsPluginLoader::createClientPlugin(
const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface)
{
return new KnownContactsPlugin(pluginName, profile, cbInterface);
}

22 changes: 11 additions & 11 deletions src/knowncontacts/knowncontactsplugin.h
Expand Up @@ -25,6 +25,7 @@

#include <ClientPlugin.h>
#include <SyncResults.h>
#include <buteosyncfw5/SyncPluginLoader.h>

class KnownContactsSyncer;

Expand Down Expand Up @@ -85,17 +86,16 @@ protected slots:
KnownContactsSyncer *m_syncer;
};

/*! \brief Creates KnownContactsPlugin client plugin
*
* @param pluginName Name of this client plugin
* @param profile Profile to use
* @param cbInterface Pointer to the callback interface
* @return Client plugin on success, otherwise NULL
*/

/*! \brief Destroys KnownContactsPlugin client plugin
*
* @param client KnownContactsPlugin client plugin instance to destroy
*/
class KnownContactsPluginLoader : public Buteo::SyncPluginLoader
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "org.sailfishos.plugins.sync.KnownContactsPluginLoader")
Q_INTERFACES(Buteo::SyncPluginLoader)

public:
Buteo::ClientPlugin* createClientPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface* cbInterface) override;
};
#endif // KNOWNCONTACTSPLUGIN_H

0 comments on commit 8af8346

Please sign in to comment.