Commit 37e30d58 authored by blam's avatar blam

Merge branch 'jb49022-service-api' into 'master'

Jb49022 service api

See merge request mer-core/buteo-sync-plugins-social!56
parents 569df6c5 13e017fe
......@@ -6,6 +6,7 @@ Makefile
*.qm
*.moc
*.obj
*.pro.*
/RPMS/
*.list
*-client
......
......@@ -431,17 +431,29 @@ Requires: %{name} = %{version}-%{release}
%files onedrive-backup
#out-of-process-plugin form:
/usr/lib/buteo-plugins-qt5/oopp/onedrive-backup-client
/usr/lib/buteo-plugins-qt5/oopp/onedrive-backupquery-client
/usr/lib/buteo-plugins-qt5/oopp/onedrive-backuprestore-client
#in-process-plugin form:
#/usr/lib/buteo-plugins-qt5/libonedrive-backup-client.so
#/usr/lib/buteo-plugins-qt5/libonedrive-backupquery-client.so
#/usr/lib/buteo-plugins-qt5/libonedrive-backuprestore-client.so
%config %{_sysconfdir}/buteo/profiles/client/onedrive-backup.xml
%config %{_sysconfdir}/buteo/profiles/client/onedrive-backupquery.xml
%config %{_sysconfdir}/buteo/profiles/client/onedrive-backuprestore.xml
%config %{_sysconfdir}/buteo/profiles/sync/onedrive.Backup.xml
%config %{_sysconfdir}/buteo/profiles/sync/onedrive.BackupQuery.xml
%config %{_sysconfdir}/buteo/profiles/sync/onedrive.BackupRestore.xml
%pre onedrive-backup
USERS=$(getent group users | cut -d ":" -f 4 | tr "," "\n")
for user in $USERS; do
USERHOME=$(getent passwd ${user} | cut -d ":" -f 6)
rm -f ${USERHOME}/.cache/msyncd/sync/client/onedrive-backup.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/client/onedrive-backupquery.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/client/onedrive-backuprestore.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/onedrive.Backup.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/onedrive.BackupQuery.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/onedrive.BackupRestore.xml || :
done
%post onedrive-backup
......@@ -460,17 +472,29 @@ Requires: %{name} = %{version}-%{release}
%files dropbox-backup
#out-of-process-plugin form:
/usr/lib/buteo-plugins-qt5/oopp/dropbox-backup-client
/usr/lib/buteo-plugins-qt5/oopp/dropbox-backupquery-client
/usr/lib/buteo-plugins-qt5/oopp/dropbox-backuprestore-client
#in-process-plugin form:
#/usr/lib/buteo-plugins-qt5/libdropbox-backup-client.so
#/usr/lib/buteo-plugins-qt5/libdropbox-backupquery-client.so
#/usr/lib/buteo-plugins-qt5/libdropbox-backuprestore-client.so
%config %{_sysconfdir}/buteo/profiles/client/dropbox-backup.xml
%config %{_sysconfdir}/buteo/profiles/client/dropbox-backupquery.xml
%config %{_sysconfdir}/buteo/profiles/client/dropbox-backuprestore.xml
%config %{_sysconfdir}/buteo/profiles/sync/dropbox.Backup.xml
%config %{_sysconfdir}/buteo/profiles/sync/dropbox.BackupQuery.xml
%config %{_sysconfdir}/buteo/profiles/sync/dropbox.BackupRestore.xml
%pre dropbox-backup
USERS=$(getent group users | cut -d ":" -f 4 | tr "," "\n")
for user in $USERS; do
USERHOME=$(getent passwd ${user} | cut -d ":" -f 6)
rm -f ${USERHOME}/.cache/msyncd/sync/client/dropbox-backup.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/client/dropbox-backupquery.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/client/dropbox-backuprestore.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/dropbox.Backup.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/dropbox.BackupQuery.xml || :
rm -f ${USERHOME}/.cache/msyncd/sync/dropbox.BackupRestore.xml || :
done
%post dropbox-backup
......
......@@ -30,14 +30,12 @@ DEFINES += 'SOCIALD_SYNC_DATABASE_NAME=\'\"sociald.db\"\''
INCLUDEPATH += . $$PWD/common/
HEADERS += \
$$PWD/common/backuprestoreoptions_p.h \
$$PWD/common/buteosyncfw_p.h \
$$PWD/common/socialdbuteoplugin.h \
$$PWD/common/socialnetworksyncadaptor.h \
$$PWD/common/trace.h
SOURCES += \
$$PWD/common/backuprestoreoptions.cpp \
$$PWD/common/socialdbuteoplugin.cpp \
$$PWD/common/socialnetworksyncadaptor.cpp
......
/****************************************************************************
**
** Copyright (C) 2019 Open Mobile Platform LLC
**
** 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 "backuprestoreoptions_p.h"
#include "trace.h"
#include <QtCore/QCryptographicHash>
// nemo
#include <ssudeviceinfo.h>
// buteo-syncfw
#include <SyncProfile.h>
bool BackupRestoreOptions::copyToProfile(Buteo::SyncProfile *syncProfile)
{
if (!syncProfile) {
qWarning() << "Invalid profile!";
return false;
}
Buteo::Profile *clientProfile = syncProfile->clientProfile();
if (!clientProfile) {
qWarning() << "Cannot find client profile in sync profile:" << syncProfile->name();
return false;
}
QString operationValue;
switch (operation) {
case DirectoryListing:
operationValue = "dir-listing";
break;
case Upload:
operationValue = "upload";
break;
case Download:
operationValue = "download";
break;
};
clientProfile->setKey("sfos-operation", operationValue);
clientProfile->setKey("sfos-dir-local", localDirPath);
clientProfile->setKey("sfos-dir-remote", remoteDirPath);
clientProfile->setKey("sfos-filename", fileName);
return true;
}
BackupRestoreOptions BackupRestoreOptions::fromProfile(Buteo::SyncProfile *syncProfile, bool *ok)
{
if (!syncProfile) {
qWarning() << "Invalid sync profile!";
return BackupRestoreOptions();
}
Buteo::Profile *clientProfile = syncProfile->clientProfile();
if (!clientProfile) {
qWarning() << "Cannot find client profile in sync profile:" << syncProfile->name();
return BackupRestoreOptions();
}
BackupRestoreOptions options;
QString operation = clientProfile->key("sfos-operation");
options.localDirPath = clientProfile->key("sfos-dir-local");
options.remoteDirPath = clientProfile->key("sfos-dir-remote");
options.fileName = clientProfile->key("sfos-filename");
if (operation == "dir-listing") {
options.operation = BackupRestoreOptions::DirectoryListing;
} else if (operation == "upload") {
options.operation = BackupRestoreOptions::Upload;
} else if (operation == "download") {
options.operation = BackupRestoreOptions::Download;
} else {
qWarning() << "Backup/restore options for sync profile" << syncProfile->name()
<< "has invalid operation type:" << operation;
return BackupRestoreOptions();
}
if (options.localDirPath.isEmpty()) {
qWarning() << "Backup/restore options for sync profile" << syncProfile->name()
<< "do not specify a local directory!";
return BackupRestoreOptions();
}
if (options.operation == BackupRestoreOptions::DirectoryListing && options.fileName.isEmpty()) {
qWarning() << "Backup/restore options for sync profile" << syncProfile->name()
<< "do not specify a file name for directory listing!";
return BackupRestoreOptions();
}
if (ok) {
*ok = true;
}
return options;
}
QString BackupRestoreOptions::backupDeviceName()
{
SsuDeviceInfo deviceInfo;
const QString deviceId = deviceInfo.deviceUid();
const QByteArray hashedDeviceId = QCryptographicHash::hash(deviceId.toUtf8(), QCryptographicHash::Sha256);
const QString encodedDeviceId = QString::fromUtf8(hashedDeviceId.toBase64(QByteArray::Base64UrlEncoding)).mid(0,12);
if (deviceId.isEmpty()) {
qWarning() << "Could not determine device identifier for backup directory name!";
return QString();
}
QString deviceDisplayNamePrefix = deviceInfo.displayName(Ssu::DeviceModel);
if (!deviceDisplayNamePrefix.isEmpty()) {
deviceDisplayNamePrefix = deviceDisplayNamePrefix.replace(' ', '-') + '_';
}
return deviceDisplayNamePrefix + encodedDeviceId;
}
......@@ -37,4 +37,4 @@ protected:
QIODevice *outgoingData = 0);
};
#endif
\ No newline at end of file
#endif
......@@ -56,7 +56,10 @@ namespace {
<< QStringLiteral("Posts")
<< QStringLiteral("Messages")
<< QStringLiteral("Emails")
<< QStringLiteral("Signon");
<< QStringLiteral("Signon")
<< QStringLiteral("Backup")
<< QStringLiteral("BackupQuery")
<< QStringLiteral("BackupRestore");
}
}
......@@ -425,6 +428,8 @@ QString SocialNetworkSyncAdaptor::dataTypeName(SocialNetworkSyncAdaptor::DataTyp
case SocialNetworkSyncAdaptor::Emails: return QStringLiteral("Emails");
case SocialNetworkSyncAdaptor::Signon: return QStringLiteral("Signon");
case SocialNetworkSyncAdaptor::Backup: return QStringLiteral("Backup");
case SocialNetworkSyncAdaptor::BackupQuery: return QStringLiteral("BackupQuery");
case SocialNetworkSyncAdaptor::BackupRestore: return QStringLiteral("BackupRestore");
default: break;
}
......
......@@ -74,7 +74,9 @@ public:
Messages, // "Messages"
Emails, // "Emails"
Signon, // "Signon" -- for refreshing AccessTokens etc.
Backup // "Backup" -- for storing backup/restore blobs
Backup, // "Backup"
BackupQuery, // "BackupQuery"
BackupRestore // "BackupRestore"
};
static QStringList validDataTypes();
static QString dataTypeName(DataType t);
......
......@@ -4,6 +4,7 @@ DEFINES += "CLASSNAME=DropboxBackupPlugin"
DEFINES += CLASSNAME_H=\\\"dropboxbackupplugin.h\\\"
include($$PWD/../../common.pri)
include($$PWD/../dropbox-common.pri)
include($$PWD/../dropbox-backupoperation.pri)
include($$PWD/dropbox-backup.pri)
dropbox_backup_sync_profile.path = /etc/buteo/profiles/sync
......
/****************************************************************************
**
** Copyright (C) 2015-2019 Jolla Ltd.
** Copyright (C) 2019 Open Mobile Platform LLC
** Contact: Chris Adams <chris.adams@jolla.com>
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -51,5 +49,5 @@ DropboxBackupPlugin::~DropboxBackupPlugin()
SocialNetworkSyncAdaptor *DropboxBackupPlugin::createSocialNetworkSyncAdaptor()
{
return new DropboxBackupSyncAdaptor(profile().name(), this);
return new DropboxBackupSyncAdaptor(this);
}
/****************************************************************************
**
** Copyright (C) 2015 Jolla Ltd.
** Contact: Chris Adams <chris.adams@jolla.com>
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......
/****************************************************************************
**
** Copyright (C) 2015-2019 Jolla Ltd.
** Copyright (C) 2019 Open Mobile Platform LLC
** Copyright (c) 2015 - 2019 Jolla Ltd.
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** 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,72 +22,17 @@
#ifndef DROPBOXBACKUPSYNCADAPTOR_H
#define DROPBOXBACKUPSYNCADAPTOR_H
#include "dropboxdatatypesyncadaptor.h"
#include "backuprestoreoptions_p.h"
#include "dropboxbackupoperationsyncadaptor.h"
#include <QtCore/QObject>
#include <QtCore/QString>
#include <QtCore/QDateTime>
#include <QtCore/QVariantMap>
#include <QtCore/QList>
#include <QtCore/QStringList>
#include <QtCore/QSet>
#include <QtNetwork/QNetworkReply>
#include <QtNetwork/QSslError>
#include <QtSql/QSqlDatabase>
namespace Buteo {
class ProfileManager;
}
class DropboxBackupSyncAdaptor : public DropboxDataTypeSyncAdaptor
class DropboxBackupSyncAdaptor : public DropboxBackupOperationSyncAdaptor
{
Q_OBJECT
public:
DropboxBackupSyncAdaptor(const QString &profileName, QObject *parent);
DropboxBackupSyncAdaptor(QObject *parent);
~DropboxBackupSyncAdaptor();
QString syncServiceName() const;
void sync(const QString &dataTypeString, int accountId);
protected: // implementing DropboxDataTypeSyncAdaptor interface
void purgeDataForOldAccount(int oldId, SocialNetworkSyncAdaptor::PurgeMode mode);
void beginSync(int accountId, const QString &accessToken);
void finalize(int accountId);
void finalCleanup();
private:
void requestList(int accountId,
const QString &accessToken,
int operationType,
const QString &remotePath,
const QString &continuationCursor,
const QVariantMap &extraProperties);
void requestData(int accountId, const QString &accessToken,
const QString &localPath, const QString &remotePath,
const QString &remoteFile = QString());
void uploadData(int accountId, const QString &accessToken,
const QString &localPath, const QString &remotePath,
const QString &localFile = QString());
void purgeAccount(int accountId);
void beginListOperation(int accountId, const QString &accessToken, const BackupRestoreOptions &options);
void beginSyncOperation(int accountId, const QString &accessToken, const BackupRestoreOptions &options);
private Q_SLOTS:
void remotePathFinishedHandler();
void remoteFileFinishedHandler();
void createRemotePathFinishedHandler();
void createRemoteFileFinishedHandler();
void downloadProgressHandler(qint64 bytesReceived, qint64 bytesTotal);
void uploadProgressHandler(qint64 bytesSent, qint64 bytesTotal);
private:
Buteo::ProfileManager *m_profileManager;
QSet<QString> m_backupFiles;
QString m_profileName;
DropboxBackupOperationSyncAdaptor::Operation operation() const override;
};
#endif // DROPBOXBACKUPSYNCADAPTOR_H
SOURCES += $$PWD/dropboxbackupoperationsyncadaptor.cpp
HEADERS += $$PWD/dropboxbackupoperationsyncadaptor.h
INCLUDEPATH += $$PWD
SOURCES += $$PWD/dropboxbackupquerysyncadaptor.cpp
HEADERS += $$PWD/dropboxbackupquerysyncadaptor.h
INCLUDEPATH += $$PWD
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)
include($$PWD/dropbox-backupquery.pri)
dropbox_backupquery_sync_profile.path = /etc/buteo/profiles/sync
dropbox_backupquery_sync_profile.files = $$PWD/dropbox.BackupQuery.xml
dropbox_backupquery_client_plugin_xml.path = /etc/buteo/profiles/client
dropbox_backupquery_client_plugin_xml.files = $$PWD/dropbox-backupquery.xml
HEADERS += dropboxbackupqueryplugin.h
SOURCES += dropboxbackupqueryplugin.cpp
OTHER_FILES += \
dropbox_backupquery_sync_profile.files \
dropbox_backupquery_client_plugin_xml.files
INSTALLS += \
target \
dropbox_backupquery_sync_profile \
dropbox_backupquery_client_plugin_xml
<?xml version="1.0" encoding="UTF-8"?>
<profile name="dropbox-backupquery" type="client" >
<field name="Sync Direction" />
</profile>
<?xml version="1.0" encoding="UTF-8"?>
<profile name="dropbox.BackupQuery" type="sync" >
<key name="category" value="dropbox.BackupQuery" />
<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 Backup Query"/>
<schedule enabled="false" interval="" days="" syncconfiguredtime="" time="" />
<profile name="dropbox-backupquery" type="client" >
<key name="Sync Direction" value="two-way" />
</profile>
</profile>
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** 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 "dropboxbackupqueryplugin.h"
#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)
: SocialdButeoPlugin(pluginName, profile, callbackInterface,
QStringLiteral("dropbox"),
SocialNetworkSyncAdaptor::dataTypeName(SocialNetworkSyncAdaptor::BackupQuery))
{
}
DropboxBackupQueryPlugin::~DropboxBackupQueryPlugin()
{
}
SocialNetworkSyncAdaptor *DropboxBackupQueryPlugin::createSocialNetworkSyncAdaptor()
{
return new DropboxBackupQuerySyncAdaptor(this);
}
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** 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 DROPBOXBACKUPQUERYPLUGIN_H
#define DROPBOXBACKUPQUERYPLUGIN_H
#include "socialdbuteoplugin.h"
class SOCIALDBUTEOPLUGIN_EXPORT DropboxBackupQueryPlugin : public SocialdButeoPlugin
{
Q_OBJECT
public:
DropboxBackupQueryPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *cbInterface);
~DropboxBackupQueryPlugin();
protected:
SocialNetworkSyncAdaptor *createSocialNetworkSyncAdaptor();
};
extern "C" DropboxBackupQueryPlugin* createPlugin(const QString& pluginName,
const Buteo::SyncProfile& profile,
Buteo::PluginCbInterface *cbInterface);
extern "C" void destroyPlugin(DropboxBackupQueryPlugin* client);
#endif // DROPBOXBACKUPQUERYPLUGIN_H
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** 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 "dropboxbackupquerysyncadaptor.h"
DropboxBackupQuerySyncAdaptor::DropboxBackupQuerySyncAdaptor(QObject *parent)
: DropboxBackupOperationSyncAdaptor(SocialNetworkSyncAdaptor::BackupQuery, parent)
{
setInitialActive(true);
}
DropboxBackupQuerySyncAdaptor::~DropboxBackupQuerySyncAdaptor()
{
}
DropboxBackupOperationSyncAdaptor::Operation DropboxBackupQuerySyncAdaptor::operation() const
{
return DropboxBackupOperationSyncAdaptor::BackupQuery;
}
/****************************************************************************
**
** Copyright (C) 2019 Open Mobile Platform LLC
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License
......@@ -18,35 +18,20 @@
**
****************************************************************************/
#ifndef BACKUPRESTOREOPTIONS_H
#define BACKUPRESTOREOPTIONS_H
#ifndef DROPBOXBACKUPQUERYSYNCADAPTOR_H
#define DROPBOXBACKUPQUERYSYNCADAPTOR_H
#include <QtCore/QString>
#include "dropboxbackupoperationsyncadaptor.h"
namespace Buteo {
class SyncProfile;
}
// Basically a mirror of AccountSyncManager::BackupRestoreOptions.
class BackupRestoreOptions
class DropboxBackupQuerySyncAdaptor : public DropboxBackupOperationSyncAdaptor
{
public:
enum Operation {
DirectoryListing,
Upload,
Download
};
Operation operation = DirectoryListing;
QString localDirPath;
QString remoteDirPath;
QString fileName;
Q_OBJECT
bool copyToProfile(Buteo::SyncProfile *syncProfile);
static BackupRestoreOptions fromProfile(Buteo::SyncProfile *syncProfile, bool *ok);
public:
DropboxBackupQuerySyncAdaptor(QObject *parent);
~DropboxBackupQuerySyncAdaptor();
static QString backupDeviceName();
DropboxBackupOperationSyncAdaptor::Operation operation() const override;
};
#endif // BACKUPRESTOREOPTIONS_H
#endif // DROPBOXBACKUPQUERYSYNCADAPTOR_H
SOURCES += $$PWD/dropboxbackuprestoresyncadaptor.cpp
HEADERS += $$PWD/dropboxbackuprestoresyncadaptor.h
INCLUDEPATH += $$PWD
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)
include($$PWD/dropbox-backuprestore.pri)
dropbox_backuprestore_sync_profile.path = /etc/buteo/profiles/sync
dropbox_backuprestore_sync_profile.files = $$PWD/dropbox.BackupRestore.xml
dropbox_backuprestore_client_plugin_xml.path = /etc/buteo/profiles/client
dropbox_backuprestore_client_plugin_xml.files = $$PWD/dropbox-backuprestore.xml
HEADERS += dropboxbackuprestoreplugin.h
SOURCES += dropboxbackuprestoreplugin.cpp
OTHER_FILES += \
dropbox_backuprestore_sync_profile.files \
dropbox_backuprestore_client_plugin_xml.files
INSTALLS += \
target \
dropbox_backuprestore_sync_profile \
dropbox_backuprestore_client_plugin_xml
<?xml version="1.0" encoding="UTF-8"?>
<profile name="dropbox-backuprestore" type="client" >
<field name="Sync Direction" />
</profile>
<?xml version="1.0" encoding="UTF-8"?>
<profile name="dropbox.BackupRestore" type="sync" >
<key name="category" value="dropbox.BackupRestore" />
<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 Backup Restore"/>
<schedule enabled="false" interval="" days="" syncconfiguredtime="" time="" />
<profile name="dropbox-backuprestore" type="client" >
<key name="Sync Direction" value="two-way" />
</profile>
</profile>
/****************************************************************************
**
** Copyright (c) 2020 Open Mobile Platform LLC.
**
** This program/library is free software; you can redistribute it and/or
** modify it under the terms of the GNU Lesser General Public License