Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
[buteo-sync-plugins-social] Add Dropbox images sync plugin. Contribut…
…es to JB#32395 This commit adds a plugin to sync images from Dropbox. Contributes to JB#32395
- Loading branch information
Jonni Rainisto
authored and
Chris Adams
committed
Oct 9, 2015
1 parent
e8f4b7e
commit 4524543
Showing
12 changed files
with
727 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
SOURCES += $$PWD/dropboximagesyncadaptor.cpp | ||
HEADERS += $$PWD/dropboximagesyncadaptor.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,28 @@ | ||
TARGET = dropbox-images-client | ||
VERSION = 0.0.1 | ||
|
||
DEFINES += "CLASSNAME=DropboxImagesPlugin" | ||
DEFINES += CLASSNAME_H=\\\"dropboximagesplugin.h\\\" | ||
include($$PWD/../../common.pri) | ||
include($$PWD/../dropbox-common.pri) | ||
include($$PWD/dropbox-images.pri) | ||
|
||
CONFIG += link_pkgconfig | ||
PKGCONFIG += mlite5 | ||
|
||
dropbox_images_sync_profile.path = /etc/buteo/profiles/sync | ||
dropbox_images_sync_profile.files = $$PWD/dropbox.Images.xml | ||
dropbox_images_client_plugin_xml.path = /etc/buteo/profiles/client | ||
dropbox_images_client_plugin_xml.files = $$PWD/dropbox-images.xml | ||
|
||
HEADERS += dropboximagesplugin.h | ||
SOURCES += dropboximagesplugin.cpp | ||
|
||
OTHER_FILES += \ | ||
dropbox_images_sync_profile.files \ | ||
dropbox_images_client_plugin_xml.files | ||
|
||
INSTALLS += \ | ||
target \ | ||
dropbox_images_sync_profile \ | ||
dropbox_images_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="dropbox-images" 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="dropbox.Images" type="sync" > | ||
<key name="category" value="dropbox.Images" /> | ||
<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="Dropbox Images"/> | ||
|
||
<schedule enabled="false" interval="" days="1,2,3,4,5,6,7" syncconfiguredtime="" time="05:00:00" /> | ||
|
||
<profile name="dropbox-images" 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,54 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2015 Jolla Ltd. | ||
** Contact: Jonni Rainisto <jonni.rainisto@jolla.com> | ||
** | ||
** This program/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 program/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 program/library; if not, write to the Free | ||
** Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
** 02110-1301 USA | ||
** | ||
****************************************************************************/ | ||
|
||
#include "dropboximagesplugin.h" | ||
#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) | ||
: SocialdButeoPlugin(pluginName, profile, callbackInterface, | ||
QStringLiteral("dropbox"), | ||
SocialNetworkSyncAdaptor::dataTypeName(SocialNetworkSyncAdaptor::Images)) | ||
{ | ||
} | ||
|
||
DropboxImagesPlugin::~DropboxImagesPlugin() | ||
{ | ||
} | ||
|
||
SocialNetworkSyncAdaptor *DropboxImagesPlugin::createSocialNetworkSyncAdaptor() | ||
{ | ||
return new DropboxImageSyncAdaptor(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,47 @@ | ||
/**************************************************************************** | ||
** | ||
** Copyright (C) 2015 Jolla Ltd. | ||
** Contact: Jonni Rainisto <jonni.rainisto@jolla.com> | ||
** | ||
** This program/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 program/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 program/library; if not, write to the Free | ||
** Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA | ||
** 02110-1301 USA | ||
** | ||
****************************************************************************/ | ||
|
||
#ifndef DROPBOXIMAGESPLUGIN_H | ||
#define DROPBOXIMAGESPLUGIN_H | ||
|
||
#include "socialdbuteoplugin.h" | ||
|
||
class SOCIALDBUTEOPLUGIN_EXPORT DropboxImagesPlugin : public SocialdButeoPlugin | ||
{ | ||
Q_OBJECT | ||
|
||
public: | ||
DropboxImagesPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *cbInterface); | ||
~DropboxImagesPlugin(); | ||
|
||
protected: | ||
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor(); | ||
}; | ||
|
||
extern "C" DropboxImagesPlugin* createPlugin(const QString& pluginName, | ||
const Buteo::SyncProfile& profile, | ||
Buteo::PluginCbInterface *cbInterface); | ||
|
||
extern "C" void destroyPlugin(DropboxImagesPlugin* client); | ||
|
||
#endif // DROPBOXIMAGESPLUGIN_H |
Oops, something went wrong.