summaryrefslogtreecommitdiffstats
path: root/common
diff options
context:
space:
mode:
Diffstat (limited to 'common')
-rw-r--r--common/notification.h21
-rw-r--r--common/resourceaccess.cpp1
2 files changed, 22 insertions, 0 deletions
diff --git a/common/notification.h b/common/notification.h
index b67a84a..87c22db 100644
--- a/common/notification.h
+++ b/common/notification.h
@@ -36,21 +36,42 @@ public:
36 Status, 36 Status,
37 Info, 37 Info,
38 Warning, 38 Warning,
39 Error,
39 Progress, 40 Progress,
40 Inspection, 41 Inspection,
41 RevisionUpdate, 42 RevisionUpdate,
42 FlushCompletion 43 FlushCompletion
43 }; 44 };
45 /**
46 * Used as code for Inspection type notifications
47 */
44 enum InspectionCode { 48 enum InspectionCode {
45 Success = 0, 49 Success = 0,
46 Failure 50 Failure
47 }; 51 };
52 /**
53 * Used as code for Warning/Error type notifications
54 */
55 enum ErrorCode {
56 NoError = 0,
57 UnknownError,
58 NoServerAvailable,
59 LoginFailed,
60 TransmissionFailed,
61 };
62 /**
63 * Used as code for Info type notifications
64 */
65 enum SuccessCode {
66 TransmissionSucceeded
67 };
48 68
49 QByteArray id; 69 QByteArray id;
50 int type = 0; 70 int type = 0;
51 QString message; 71 QString message;
52 //A return code. Zero typically indicates success. 72 //A return code. Zero typically indicates success.
53 int code = 0; 73 int code = 0;
74 QByteArray resource;
54}; 75};
55} 76}
56 77
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp
index 4831c72..6f7d039 100644
--- a/common/resourceaccess.cpp
+++ b/common/resourceaccess.cpp
@@ -615,6 +615,7 @@ bool ResourceAccess::processMessageBuffer()
615 case Sink::Notification::Progress: { 615 case Sink::Notification::Progress: {
616 auto n = getNotification(buffer); 616 auto n = getNotification(buffer);
617 SinkTrace() << "Received notification: Type:" << n.type << "Message: " << n.message << "Code: " << n.code; 617 SinkTrace() << "Received notification: Type:" << n.type << "Message: " << n.message << "Code: " << n.code;
618 n.resource = d->resourceInstanceIdentifier;
618 emit notification(n); 619 emit notification(n);
619 } break; 620 } break;
620 case Sink::Notification::RevisionUpdate: 621 case Sink::Notification::RevisionUpdate: