comparison OrthancServer/Sources/Database/SQLiteDatabaseWrapper.cpp @ 4571:9224e107d613 db-changes

simplifying IDatabaseListener::SignalChange() as IDatabaseListener::SignalResourceDeleted()
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 08 Mar 2021 16:49:34 +0100
parents 648defffc8cc
children bec74e29f86b
comparison
equal deleted inserted replaced
4570:648defffc8cc 4571:9224e107d613
90 uncompressedMD5, 90 uncompressedMD5,
91 static_cast<CompressionType>(context.GetIntValue(3)), 91 static_cast<CompressionType>(context.GetIntValue(3)),
92 static_cast<uint64_t>(context.GetInt64Value(4)), 92 static_cast<uint64_t>(context.GetInt64Value(4)),
93 compressedMD5); 93 compressedMD5);
94 94
95 listener_.SignalFileDeleted(info); 95 listener_.SignalAttachmentDeleted(info);
96 } 96 }
97 }; 97 };
98 98
99 class SignalResourceDeleted : public SQLite::IScalarFunction 99 class SignalResourceDeleted : public SQLite::IScalarFunction
100 { 100 {
117 return 2; 117 return 2;
118 } 118 }
119 119
120 virtual void Compute(SQLite::FunctionContext& context) ORTHANC_OVERRIDE 120 virtual void Compute(SQLite::FunctionContext& context) ORTHANC_OVERRIDE
121 { 121 {
122 ResourceType type = static_cast<ResourceType>(context.GetIntValue(1)); 122 listener_.SignalResourceDeleted(static_cast<ResourceType>(context.GetIntValue(1)),
123 ServerIndexChange change(ChangeType_Deleted, type, context.GetStringValue(0)); 123 context.GetStringValue(0));
124 listener_.SignalChange(change);
125 } 124 }
126 }; 125 };
127 126
128 class SignalRemainingAncestor : public SQLite::IScalarFunction 127 class SignalRemainingAncestor : public SQLite::IScalarFunction
129 { 128 {