Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sociald] Add VK calendar event integration. Contributes to JB#19273
This commit adds a sync adaptor which loads event data from VK and caches it in the local device database. Contributes to JB#19273
- Loading branch information
Chris Adams
authored and
Antti Seppälä
committed
Oct 12, 2015
1 parent
db201ab
commit 87b907f
Showing
11 changed files
with
515 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
CONFIG += link_pkgconfig | ||
PKGCONFIG += libmkcal-qt5 libkcalcoren-qt5 | ||
SOURCES += $$PWD/vkcalendarsyncadaptor.cpp | ||
HEADERS += $$PWD/vkcalendarsyncadaptor.h | ||
INCLUDEPATH += $$PWD | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
TARGET = vk-calendars-client | ||
VERSION = 0.0.1 | ||
|
||
DEFINES += "CLASSNAME=VKCalendarsPlugin" | ||
DEFINES += CLASSNAME_H=\\\"vkcalendarsplugin.h\\\" | ||
include($$PWD/../../common.pri) | ||
include($$PWD/../vk-common.pri) | ||
include($$PWD/vk-calendars.pri) | ||
|
||
vk_calendars_sync_profile.path = /etc/buteo/profiles/sync | ||
vk_calendars_sync_profile.files = $$PWD/vk.Calendars.xml | ||
vk_calendars_client_plugin_xml.path = /etc/buteo/profiles/client | ||
vk_calendars_client_plugin_xml.files = $$PWD/vk-calendars.xml | ||
|
||
HEADERS += vkcalendarsplugin.h | ||
SOURCES += vkcalendarsplugin.cpp | ||
|
||
OTHER_FILES += \ | ||
vk.Calendars.xml \ | ||
vk-calendars.xml | ||
|
||
INSTALLS += \ | ||
target \ | ||
vk_calendars_sync_profile \ | ||
vk_calendars_client_plugin_xml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<profile name="vk-calendars" type="client" > | ||
<field name="Sync Direction" /> | ||
</profile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<profile name="vk.Calendars" type="sync" > | ||
<key name="category" value="vk.Calendars" /> | ||
<key name="enabled" value="false" /> | ||
<key name="use_accounts" value="false" /> | ||
<key name="destinationtype" value="online" /> | ||
<key name="hidden" value="true" /> | ||
<key name="displayname" value="VK Calendars"/> | ||
|
||
<schedule enabled="false" interval="" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="05:00:00" /> | ||
|
||
<profile name="vk-calendars" type="client" > | ||
<key name="Sync Direction" value="from-remote" /> | ||
</profile> | ||
</profile> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2014 Jolla Ltd. | ||
** Contact: Chris Adams <chris.adams@jolla.com> | ||
** | ||
****************************************************************************/ | ||
|
||
#include "vkcalendarsplugin.h" | ||
#include "vkcalendarsyncadaptor.h" | ||
#include "socialnetworksyncadaptor.h" | ||
|
||
extern "C" VKCalendarsPlugin* createPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *callbackInterface) | ||
{ | ||
return new VKCalendarsPlugin(pluginName, profile, callbackInterface); | ||
} | ||
|
||
extern "C" void destroyPlugin(VKCalendarsPlugin* plugin) | ||
{ | ||
delete plugin; | ||
} | ||
|
||
VKCalendarsPlugin::VKCalendarsPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *callbackInterface) | ||
: SocialdButeoPlugin(pluginName, profile, callbackInterface, | ||
QStringLiteral("vk"), | ||
SocialNetworkSyncAdaptor::dataTypeName(SocialNetworkSyncAdaptor::Calendars)) | ||
{ | ||
} | ||
|
||
VKCalendarsPlugin::~VKCalendarsPlugin() | ||
{ | ||
} | ||
|
||
SocialNetworkSyncAdaptor *VKCalendarsPlugin::createSocialNetworkSyncAdaptor() | ||
{ | ||
return new VKCalendarSyncAdaptor(this); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2014 Jolla Ltd. | ||
** Contact: Chris Adams <chris.adams@jolla.com> | ||
** | ||
****************************************************************************/ | ||
|
||
#ifndef VKCALENDARSPLUGIN_H | ||
#define VKCALENDARSPLUGIN_H | ||
|
||
#include "socialdbuteoplugin.h" | ||
|
||
class VKCalendarsPlugin : public SocialdButeoPlugin | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
VKCalendarsPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *cbInterface); | ||
~VKCalendarsPlugin(); | ||
|
||
protected: | ||
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor(); | ||
}; | ||
|
||
extern "C" VKCalendarsPlugin* createPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *cbInterface); | ||
|
||
extern "C" void destroyPlugin(VKCalendarsPlugin* client); | ||
|
||
#endif // VKCALENDARSPLUGIN_H |
Oops, something went wrong.