Skip to content

Commit

Permalink
Merge branch 'master' into 'master'
Browse files Browse the repository at this point in the history
Progress support on notifications

See merge request !4
  • Loading branch information
pvuorela committed Jan 17, 2018
2 parents ec3b91c + 2cf8a6d commit ff6c5eb
Show file tree
Hide file tree
Showing 19 changed files with 272 additions and 159 deletions.
6 changes: 0 additions & 6 deletions data/data.pro

This file was deleted.

3 changes: 0 additions & 3 deletions data/notificationcategories/x-nemo.transfer.complete.conf

This file was deleted.

4 changes: 0 additions & 4 deletions data/notificationcategories/x-nemo.transfer.conf

This file was deleted.

2 changes: 0 additions & 2 deletions data/notificationcategories/x-nemo.transfer.error.conf

This file was deleted.

2 changes: 1 addition & 1 deletion declarative/declarativetransfermodel.cpp
Expand Up @@ -416,7 +416,7 @@ QSqlDatabase TransferModel::database()
TransferDatabase database;
database.setDatabaseName(absDbPath);
database.setConnectOptions(QLatin1String("QSQLITE_OPEN_READONLY")); // sanity check
thread_database.setLocalData(database);
thread_database.setLocalData(database);
}

QSqlDatabase &database = thread_database.localData();
Expand Down
14 changes: 7 additions & 7 deletions doc/src/index.qdoc
Expand Up @@ -63,10 +63,10 @@ share functionality implementation depends on the client e.g. if it's HW specifi
such as Facebook. Each plugin must implement or use the following interface:

\list
\o \l {TransferPluginInterface} Share plugin must implement this interface
\o \l {MediaTransferInterface} Share plugin must implement this interface
\o \l {TransferPluginInfo} Share plugin must provide information about plugin using this class
\o \l {TransferMethodInfo} Share plugin must provide information about e.g. accounts using this class
\li \l {TransferPluginInterface} Share plugin must implement this interface
\li \l {MediaTransferInterface} Share plugin must implement this interface
\li \l {TransferPluginInfo} Share plugin must provide information about plugin using this class
\li \l {TransferMethodInfo} Share plugin must provide information about e.g. accounts using this class
\endlist

\section3 Client API
Expand All @@ -77,14 +77,14 @@ example Transfer UI and client side sharing interface on top of it. The Transfer
be used by clients who want to inform Nemo Transfer Engine of ongoing Sync or Downloads.

\list
\o DBus API - see org.nemomobile.transferengine.xml. For the client side it will generate TransferEngineInterface
\li DBus API - see org.nemomobile.transferengine.xml. For the client side it will generate TransferEngineInterface
class which can be used directly.
\o TransferEngineClient - The convenience API to create Sync and Download events.
\li TransferEngineClient - The convenience API to create Sync and Download events.
\endlist

\section3 Reference
\list
\o \l {Nemo Transfer Engine Reference}
\li \l {Nemo Transfer Engine Reference}
\endlist

*/
6 changes: 3 additions & 3 deletions doc/src/mediaplugininterface.qdoc
Expand Up @@ -41,9 +41,9 @@
TransferEngine supports C++ share plugins. Each share plugin must implement couple of well defined interfaces:

\list
\o \l TransferPluginInterface Provides interfaces to access required objects to start sharing.
\o \l MediaTransferInterface Implements the actual sharing functionality
\o \l TransferPluginInfo Provides information about plugin status such as is it ready.
\li \l TransferPluginInterface Provides interfaces to access required objects to start sharing.
\li \l MediaTransferInterface Implements the actual sharing functionality
\li \l TransferPluginInfo Provides information about plugin status such as is it ready.
\endlist

TransferPluginInterface provides information to the TransferEngine via this interface.
Expand Down
6 changes: 3 additions & 3 deletions lib/imageoperation.cpp
Expand Up @@ -38,9 +38,9 @@
This class is meant to be used by share plugins. It can be used for:
\list
\o Removing image metadata
\o Scaling image
\o Create a temp files from the image paths
\li Removing image metadata
\li Scaling image
\li Create a temp files from the image paths
\endlist
*/

Expand Down
8 changes: 4 additions & 4 deletions lib/mediatransferinterface.cpp
Expand Up @@ -60,10 +60,10 @@ class MediaTransferInterfacePrivate
each share plugin. The subclass of this class is resposible of providing:
\list
\o Status information of the sharing
\o Progress of the sharing
\o Information, if cancel and restart actions are supported
\o Starting and/or canceling the sharing
\li Status information of the sharing
\li Progress of the sharing
\li Information, if cancel and restart actions are supported
\li Starting and/or canceling the sharing
\endlist
Expand Down
1 change: 0 additions & 1 deletion lib/mediatransferinterface.h
Expand Up @@ -53,7 +53,6 @@ class MediaTransferInterface: public QObject

MediaItem *mediaItem();


virtual QString displayName() const = 0;
virtual QUrl serviceIcon() const = 0;
virtual bool cancelEnabled() const = 0;
Expand Down
2 changes: 0 additions & 2 deletions lib/transferdbrecord.h
Expand Up @@ -32,9 +32,7 @@

class TransferDBRecord
{

public:

enum TransferDBRecordField {
TransferID = 0,
TransferType,
Expand Down
24 changes: 12 additions & 12 deletions lib/transferengineclient.cpp
Expand Up @@ -78,11 +78,11 @@ CallbackInterface::CallbackInterface()
Construct CallbackInterface instance to provide callback information to the TransferEngineClient. Setup
arguments as:
\list
\o \a server e.g. "com.jolla.myapp"
\o \a path e.g. "/com/jolla/myapp"
\o \a interface e.g. "com.jolla.myapp"
\o \a cancelMethod Cancel method name e.g. "cancelSync"
\o \a restartMethod Restart method name e.g. "restartSync"
\li \a server e.g. "com.jolla.myapp"
\li \a path e.g. "/com/jolla/myapp"
\li \a interface e.g. "com.jolla.myapp"
\li \a cancelMethod Cancel method name e.g. "cancelSync"
\li \a restartMethod Restart method name e.g. "restartSync"
\endlist
*/
CallbackInterface::CallbackInterface(const QString &server, const QString &path, const QString &interface,
Expand Down Expand Up @@ -222,9 +222,9 @@ TransferEngineClient::~TransferEngineClient()
Create a download event to the TransferEngine. This only creates and entry, and client
needs still call:
\list
\o \l TransferEngineClient::startTransfer()
\o \l TransferEngineClient::updateTransferProgress()
\o \l TransferEngineClient::finishTransfer()
\li \l TransferEngineClient::startTransfer()
\li \l TransferEngineClient::updateTransferProgress()
\li \l TransferEngineClient::finishTransfer()
\endlist
\sa createSyncEvent(), startTransfer(), updateTransferProgress(), finishTransfer()
Expand Down Expand Up @@ -325,9 +325,9 @@ void TransferEngineClient::updateTransferProgress(int transferId, qreal progress
Finalize the transfer with \a transferId. There are three options for finalizing the transfer by setting
the \a status parameter value:
\list
\o \l TransferEngineClient::TransferFinished - success
\o \l TransferEngineClient::TransferCanceled - user cancelation
\o \l TransferEngineClient::TransferInterrupted - an error
\li \l TransferEngineClient::TransferFinished - success
\li \l TransferEngineClient::TransferCanceled - user cancelation
\li \l TransferEngineClient::TransferInterrupted - an error
\endlist
If the client wants to provide reason for finishing the transfer, it's possible to provide \a reason
Expand Down Expand Up @@ -388,7 +388,7 @@ void TransferEngineClient::enableNotifications(bool enable)
/*!
Private method for QML interface.
\returns true if notifications are enabled, otherwise false is returned.
Returns true if notifications are enabled, otherwise false is returned.
*/
bool TransferEngineClient::notificationsEnabled() const
{
Expand Down
2 changes: 1 addition & 1 deletion lib/transfermethodinfo.cpp
Expand Up @@ -182,7 +182,7 @@ QVariant TransferMethodInfo::value(int index) const
return accountId;
case AccountIcon:
return accountIcon;
default:
default:
return QVariant();
}
}
Expand Down
1 change: 0 additions & 1 deletion rpm/transfer-engine-qt5.spec
Expand Up @@ -36,7 +36,6 @@ Obsoletes: nemo-transferengine <= 0.0.19
%{_bindir}/nemo-transfer-engine
%{_datadir}/dbus-1/services/org.nemo.transferengine.service
%{_datadir}/translations/nemo-transfer-engine_eng_en.qm
%{_datadir}/lipstick/notificationcategories/*

%package -n libnemotransferengine-qt5
Summary: Transfer engine library.
Expand Down

0 comments on commit ff6c5eb

Please sign in to comment.