comparison OrthancServer/DatabaseWrapper.cpp @ 273:d384af918264

more detailed signal about deleted file
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 08 Dec 2012 22:34:56 +0100
parents 4bc02e2254ec
children 4eea080e6e7a
comparison
equal deleted inserted replaced
272:337c506461d2 273:d384af918264
31 31
32 32
33 #include "DatabaseWrapper.h" 33 #include "DatabaseWrapper.h"
34 34
35 #include "../Core/DicomFormat/DicomArray.h" 35 #include "../Core/DicomFormat/DicomArray.h"
36 #include "../Core/Uuid.h"
36 #include "EmbeddedResources.h" 37 #include "EmbeddedResources.h"
37 38
38 #include <glog/logging.h> 39 #include <glog/logging.h>
39 #include <stdio.h> 40 #include <stdio.h>
40 41
59 return "SignalFileDeleted"; 60 return "SignalFileDeleted";
60 } 61 }
61 62
62 virtual unsigned int GetCardinality() const 63 virtual unsigned int GetCardinality() const
63 { 64 {
64 return 1; 65 return 5;
65 } 66 }
66 67
67 virtual void Compute(SQLite::FunctionContext& context) 68 virtual void Compute(SQLite::FunctionContext& context)
68 { 69 {
69 listener_.SignalFileDeleted(context.GetStringValue(0)); 70 FileInfo info(context.GetStringValue(0),
71 static_cast<FileContentType>(context.GetIntValue(1)),
72 static_cast<uint64_t>(context.GetInt64Value(2)),
73 static_cast<CompressionType>(context.GetIntValue(3)),
74 static_cast<uint64_t>(context.GetInt64Value(4)));
75
76 listener_.SignalFileDeleted(info);
70 } 77 }
71 }; 78 };
72 79
73 class SignalRemainingAncestor : public SQLite::IScalarFunction 80 class SignalRemainingAncestor : public SQLite::IScalarFunction
74 { 81 {