comparison Core/HttpServer/EmbeddedResourceHttpHandler.cpp @ 59:c996319e90bc orthanc-renaming

renaming in Core
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sun, 16 Sep 2012 09:28:56 +0200
parents a15e90e5d6fc
children 2d96cb181f45
comparison
equal deleted inserted replaced
58:6da7fc87efaa 59:c996319e90bc
1 /** 1 /**
2 * Palanthir - A Lightweight, RESTful DICOM Store 2 * Orthanc - A Lightweight, RESTful DICOM Store
3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege, 3 * Copyright (C) 2012 Medical Physics Department, CHU of Liege,
4 * Belgium 4 * Belgium
5 * 5 *
6 * This program is free software: you can redistribute it and/or 6 * This program is free software: you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License as 7 * modify it under the terms of the GNU General Public License as
18 **/ 18 **/
19 19
20 20
21 #include "EmbeddedResourceHttpHandler.h" 21 #include "EmbeddedResourceHttpHandler.h"
22 22
23 #include "../PalanthirException.h" 23 #include "../OrthancException.h"
24 24
25 #include <stdio.h> 25 #include <stdio.h>
26 26
27 27
28 namespace Palanthir 28 namespace Orthanc
29 { 29 {
30 EmbeddedResourceHttpHandler::EmbeddedResourceHttpHandler( 30 EmbeddedResourceHttpHandler::EmbeddedResourceHttpHandler(
31 const std::string& baseUri, 31 const std::string& baseUri,
32 EmbeddedResources::DirectoryResourceId resourceId) 32 EmbeddedResources::DirectoryResourceId resourceId)
33 { 33 {
63 { 63 {
64 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str()); 64 const void* buffer = EmbeddedResources::GetDirectoryResourceBuffer(resourceId_, resourcePath.c_str());
65 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str()); 65 size_t size = EmbeddedResources::GetDirectoryResourceSize(resourceId_, resourcePath.c_str());
66 output.AnswerBufferWithContentType(buffer, size, contentType); 66 output.AnswerBufferWithContentType(buffer, size, contentType);
67 } 67 }
68 catch (PalanthirException& e) 68 catch (OrthancException& e)
69 { 69 {
70 output.SendHeader(Palanthir_HttpStatus_404_NotFound); 70 output.SendHeader(Orthanc_HttpStatus_404_NotFound);
71 } 71 }
72 } 72 }
73 } 73 }