comparison OrthancServer/OrthancRestApi/OrthancRestChanges.cpp @ 974:83622b0f544c

refactoring
author Sebastien Jodogne <s.jodogne@gmail.com>
date Mon, 30 Jun 2014 14:44:05 +0200
parents 84513f2ee1f3
children 32fcc5dc7562
comparison
equal deleted inserted replaced
972:2047e6f033bd 974:83622b0f544c
40 // Changes API -------------------------------------------------------------- 40 // Changes API --------------------------------------------------------------
41 41
42 static void GetSinceAndLimit(int64_t& since, 42 static void GetSinceAndLimit(int64_t& since,
43 unsigned int& limit, 43 unsigned int& limit,
44 bool& last, 44 bool& last,
45 const RestApi::GetCall& call) 45 const RestApiGetCall& call)
46 { 46 {
47 static const unsigned int MAX_RESULTS = 100; 47 static const unsigned int MAX_RESULTS = 100;
48 48
49 if (call.HasArgument("last")) 49 if (call.HasArgument("last"))
50 { 50 {
68 { 68 {
69 limit = MAX_RESULTS; 69 limit = MAX_RESULTS;
70 } 70 }
71 } 71 }
72 72
73 static void GetChanges(RestApi::GetCall& call) 73 static void GetChanges(RestApiGetCall& call)
74 { 74 {
75 ServerContext& context = OrthancRestApi::GetContext(call); 75 ServerContext& context = OrthancRestApi::GetContext(call);
76 76
77 //std::string filter = GetArgument(getArguments, "filter", ""); 77 //std::string filter = GetArgument(getArguments, "filter", "");
78 int64_t since; 78 int64_t since;
87 call.GetOutput().AnswerJson(result); 87 call.GetOutput().AnswerJson(result);
88 } 88 }
89 } 89 }
90 90
91 91
92 static void DeleteChanges(RestApi::DeleteCall& call) 92 static void DeleteChanges(RestApiDeleteCall& call)
93 { 93 {
94 OrthancRestApi::GetIndex(call).DeleteChanges(); 94 OrthancRestApi::GetIndex(call).DeleteChanges();
95 call.GetOutput().AnswerBuffer("", "text/plain"); 95 call.GetOutput().AnswerBuffer("", "text/plain");
96 } 96 }
97 97
98 98
99 // Exports API -------------------------------------------------------------- 99 // Exports API --------------------------------------------------------------
100 100
101 static void GetExports(RestApi::GetCall& call) 101 static void GetExports(RestApiGetCall& call)
102 { 102 {
103 ServerContext& context = OrthancRestApi::GetContext(call); 103 ServerContext& context = OrthancRestApi::GetContext(call);
104 104
105 int64_t since; 105 int64_t since;
106 unsigned int limit; 106 unsigned int limit;
114 call.GetOutput().AnswerJson(result); 114 call.GetOutput().AnswerJson(result);
115 } 115 }
116 } 116 }
117 117
118 118
119 static void DeleteExports(RestApi::DeleteCall& call) 119 static void DeleteExports(RestApiDeleteCall& call)
120 { 120 {
121 OrthancRestApi::GetIndex(call).DeleteExportedResources(); 121 OrthancRestApi::GetIndex(call).DeleteExportedResources();
122 call.GetOutput().AnswerBuffer("", "text/plain"); 122 call.GetOutput().AnswerBuffer("", "text/plain");
123 } 123 }
124 124