Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[sociald] Initial VK support including VK Posts sync adaptor. Contrib…
…utes to JB#19270 This commit adds VK as a supported social network in sociald, and adds a posts sync adaptor. Contributes to JB#19270
- Loading branch information
Bea Lam
authored and
Antti Seppälä
committed
Oct 12, 2015
1 parent
e5c363b
commit 63031f8
Showing
16 changed files
with
988 additions
and
3 deletions.
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 |
---|---|---|
|
@@ -5,4 +5,5 @@ SUBDIRS = \ | |
facebook \ | ||
twitter \ | ||
onedrive \ | ||
dropbox | ||
dropbox \ | ||
vk |
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,3 @@ | ||
INCLUDEPATH += $$PWD | ||
SOURCES += $$PWD/vkdatatypesyncadaptor.cpp | ||
HEADERS += $$PWD/vkdatatypesyncadaptor.h |
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,5 @@ | ||
CONFIG += link_pkgconfig meegotouchevents-qt5 | ||
PKGCONFIG += nemonotifications-qt5 Qt5Contacts qtcontacts-sqlite-qt5-extensions | ||
SOURCES += $$PWD/vkpostsyncadaptor.cpp | ||
HEADERS += $$PWD/vkpostsyncadaptor.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,30 @@ | ||
TARGET = vk-posts-client | ||
VERSION = 0.0.1 | ||
|
||
DEFINES += "CLASSNAME=VKPostsPlugin" | ||
DEFINES += CLASSNAME_H=\\\"vkpostsplugin.h\\\" | ||
DEFINES += SOCIALD_USE_QTPIM | ||
include($$PWD/../../common.pri) | ||
include($$PWD/../vk-common.pri) | ||
include($$PWD/vk-posts.pri) | ||
|
||
vk_posts_sync_profile.path = /etc/buteo/profiles/sync | ||
vk_posts_sync_profile.files = $$PWD/vk.Posts.xml | ||
vk_posts_client_plugin_xml.path = /etc/buteo/profiles/client | ||
vk_posts_client_plugin_xml.files = $$PWD/vk-posts.xml | ||
vk_posts_notification_xml.path = /usr/share/lipstick/notificationcategories/ | ||
vk_posts_notification_xml.files = $$PWD/x-nemo.social.vk.statuspost.conf | ||
|
||
HEADERS += vkpostsplugin.h | ||
SOURCES += vkpostsplugin.cpp | ||
|
||
OTHER_FILES += \ | ||
vk.Posts.xml \ | ||
vk-posts.xml \ | ||
x-nemo.social.vk.statuspost.conf | ||
|
||
INSTALLS += \ | ||
target \ | ||
vk_posts_sync_profile \ | ||
vk_posts_client_plugin_xml \ | ||
vk_posts_notification_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-posts" 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.Posts" type="sync" > | ||
<key name="category" value="eventfeed" /> | ||
<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 Posts"/> | ||
|
||
<schedule enabled="true" interval="30" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="" /> | ||
|
||
<profile name="vk-posts" 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,44 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2014 Jolla Ltd. | ||
** Contact: Chris Adams <chris.adams@jolla.com> | ||
** | ||
****************************************************************************/ | ||
|
||
#include "constants_p.h" | ||
#include <qtcontacts-extensions_impl.h> | ||
#include <qcontactoriginmetadata_impl.h> | ||
|
||
#include "vkpostsplugin.h" | ||
#include "vkpostsyncadaptor.h" | ||
#include "socialnetworksyncadaptor.h" | ||
|
||
extern "C" VKPostsPlugin* createPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *callbackInterface) | ||
{ | ||
return new VKPostsPlugin(pluginName, profile, callbackInterface); | ||
} | ||
|
||
extern "C" void destroyPlugin(VKPostsPlugin* plugin) | ||
{ | ||
delete plugin; | ||
} | ||
|
||
VKPostsPlugin::VKPostsPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *callbackInterface) | ||
: SocialdButeoPlugin(pluginName, profile, callbackInterface, | ||
QStringLiteral("vk"), | ||
SocialNetworkSyncAdaptor::dataTypeName(SocialNetworkSyncAdaptor::Posts)) | ||
{ | ||
} | ||
|
||
VKPostsPlugin::~VKPostsPlugin() | ||
{ | ||
} | ||
|
||
SocialNetworkSyncAdaptor *VKPostsPlugin::createSocialNetworkSyncAdaptor() | ||
{ | ||
return new VKPostSyncAdaptor(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 VKPOSTSPLUGIN_H | ||
#define VKPOSTSPLUGIN_H | ||
|
||
#include "socialdbuteoplugin.h" | ||
|
||
class VKPostsPlugin : public SocialdButeoPlugin | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
VKPostsPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *cbInterface); | ||
~VKPostsPlugin(); | ||
|
||
protected: | ||
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor(); | ||
}; | ||
|
||
extern "C" VKPostsPlugin* createPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *cbInterface); | ||
|
||
extern "C" void destroyPlugin(VKPostsPlugin* client); | ||
|
||
#endif // VKPOSTSPLUGIN_H |
Oops, something went wrong.