Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show Server Notifications on the Client #4567

Merged
merged 44 commits into from
Apr 4, 2016
Merged
Changes from 1 commit
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
0eb1041
AbstractNetworkJob: Add a delete job.
Mar 4, 2016
a831b74
Added temporar icon for notifications.
Mar 4, 2016
eb00b34
Minor wording fixes
Mar 4, 2016
688c550
New GUI class NotificationWidget.
Mar 4, 2016
32e16b3
Display server notifications on the client (#3733)
Mar 4, 2016
4a4dac2
Notifications: Add a Progress indicator and handle job results.
Mar 9, 2016
b97c832
Capabilities: Add isValid check and check for notifications
Mar 9, 2016
7d13a1d
Notifications: Check capabilities if the notifications are enabled
Mar 9, 2016
8a0ce46
Notifications: Properly delete the notification check job.
Mar 9, 2016
903e79a
Notifications: Do a GUI tray notification if new notifciations arrive.
Mar 10, 2016
2d1ab27
Notifications: Refactor - create a notification handler class
Mar 10, 2016
2c2a18a
Activitiy: Refactor - move classes to their own source files.
Mar 11, 2016
adf9570
Notification: Enhance the tray message
Mar 11, 2016
73cd5a9
Notifications: Cleaner notification string build
Mar 14, 2016
97f1694
ActivityData: Simplified implementation.
Mar 14, 2016
9d219a1
ActivityListModel: Code cleanups
Mar 14, 2016
9a2f145
ocs jobs: Add a define for OCS job success.
Mar 14, 2016
a4dcc27
Notification: Fix plural handling for tray message
Mar 14, 2016
45c32ec
NotificationWidget: Remove not needed method.
Mar 16, 2016
f7f4120
Activity: Some documentation and better varialbe names
Mar 16, 2016
f71fdab
Fix timeAgoInWords
Mar 18, 2016
05de710
Notifications: Display timestamp of the notification in the widget
Mar 18, 2016
0a590b7
Notifications: Give feedback if notifcation request succeeded.
Mar 18, 2016
328d254
Notifications: Remove "done" notification widgets after fife seconds.
Mar 18, 2016
7f22a07
Notifications: Check if the account is connected before querying.
Mar 11, 2016
b966345
Notifications: Refresh the notifications based on a config value.
Mar 18, 2016
f587f35
Fix plural translation handling, remove the superflous arg()
Mar 18, 2016
d407aac
Notifications: remove notification widgets if the notification is gone.
Mar 21, 2016
d03fcc9
Notifications: Maintain a timeSinceLastCheck for every Account.
Mar 22, 2016
ad60e8a
Notifications: Fix handling of notifications to remove from the list.
Mar 22, 2016
f70c628
Notifications: Remove unused variable.
Mar 22, 2016
ea2f19b
Docs: Add new config option for the notification sync interval.
Mar 22, 2016
161d219
ActivityData: Add source file for implementation details
Mar 23, 2016
1bb3a4a
NotificationWidget: Remove accountName() and add activity() method.
Mar 23, 2016
0c944a0
NotificationWidgetUI: Fix sizing and sizePolicy
Mar 23, 2016
1fe5d6b
Notifications: Handle Notifications without an action.
Mar 23, 2016
69e8e15
Remove explicit time spec specification as it is not needed.
Mar 29, 2016
4d59f5e
ActivityData: Declare operators outside the class
Mar 29, 2016
cacb751
Cleaups based on review feedback.
Mar 29, 2016
9f438cb
Doc: Add milliseconds unit to notificationRefreshInterval doc
Mar 29, 2016
2e30a0e
Remove superflous iterator increment
Mar 29, 2016
cd3f612
ActivityWidget: Rename blacklistActivities to blacklistNotifications.
Mar 29, 2016
8166c52
NotificationHandling: Use QByteArray for the verb.
Mar 29, 2016
885f8b3
ActivityWidget: Handle plural properly in translations.
Mar 29, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
AbstractNetworkJob: Add a delete job.
It is needed to easily send delete requests which happen
through the notify API.
  • Loading branch information
Klaas Freitag committed Mar 10, 2016
commit 0eb104129003cb64cd8b11a20f74c42c49ede850
5 changes: 5 additions & 0 deletions src/libsync/abstractnetworkjob.cpp
Original file line number Diff line number Diff line change
@@ -148,6 +148,11 @@ QNetworkReply *AbstractNetworkJob::headRequest(const QUrl &url)
return addTimer(_account->headRequest(url));
}

QNetworkReply *AbstractNetworkJob::deleteRequest(const QUrl &url)
{
return addTimer(_account->deleteRequest(url));
}

void AbstractNetworkJob::slotFinished()
{
_timer.stop();
1 change: 1 addition & 0 deletions src/libsync/abstractnetworkjob.h
Original file line number Diff line number Diff line change
@@ -77,6 +77,7 @@ public slots:
QNetworkReply* getRequest(const QUrl &url);
QNetworkReply* headRequest(const QString &relPath);
QNetworkReply* headRequest(const QUrl &url);
QNetworkReply* deleteRequest(const QUrl &url);

int maxRedirects() const { return 10; }
virtual bool finished() = 0;
9 changes: 9 additions & 0 deletions src/libsync/account.cpp
Original file line number Diff line number Diff line change
@@ -239,6 +239,15 @@ QNetworkReply *Account::getRequest(const QUrl &url)
return _am->get(request);
}

QNetworkReply *Account::deleteRequest( const QUrl &url)
{
QNetworkRequest request(url);
#if QT_VERSION > QT_VERSION_CHECK(4, 8, 4)
request.setSslConfiguration(this->getOrCreateSslConfig());
#endif
return _am->deleteResource(request);
}

QNetworkReply *Account::davRequest(const QByteArray &verb, const QString &relPath, QNetworkRequest req, QIODevice *data)
{
return davRequest(verb, concatUrlPath(davUrl(), relPath), req, data);
1 change: 1 addition & 0 deletions src/libsync/account.h
Original file line number Diff line number Diff line change
@@ -111,6 +111,7 @@ class OWNCLOUDSYNC_EXPORT Account : public QObject {
QNetworkReply* headRequest(const QUrl &url);
QNetworkReply* getRequest(const QString &relPath);
QNetworkReply* getRequest(const QUrl &url);
QNetworkReply* deleteRequest( const QUrl &url);
QNetworkReply* davRequest(const QByteArray &verb, const QString &relPath, QNetworkRequest req, QIODevice *data = 0);
QNetworkReply* davRequest(const QByteArray &verb, const QUrl &url, QNetworkRequest req, QIODevice *data = 0);