Mercurial > hg > orthanc
comparison Core/Lua/LuaContext.h @ 2379:4900688827a8
reorganization in CMake
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 28 Aug 2017 18:07:03 +0200 |
parents | cd70a86618b4 |
children | 878b59270859 |
comparison
equal
deleted
inserted
replaced
2378:116ade1eff82 | 2379:4900688827a8 |
---|---|
35 | 35 |
36 #if !defined(ORTHANC_ENABLE_LUA) | 36 #if !defined(ORTHANC_ENABLE_LUA) |
37 # error The macro ORTHANC_ENABLE_LUA must be defined | 37 # error The macro ORTHANC_ENABLE_LUA must be defined |
38 #endif | 38 #endif |
39 | 39 |
40 #if !defined(ORTHANC_HAS_EMBEDDED_RESOURCES) | |
41 # error Macro ORTHANC_HAS_EMBEDDED_RESOURCES must be defined | |
42 #endif | |
43 | |
40 #if ORTHANC_ENABLE_LUA == 0 | 44 #if ORTHANC_ENABLE_LUA == 0 |
41 # error The Lua support is disabled, cannot include this file | 45 # error The Lua support is disabled, cannot include this file |
46 #endif | |
47 | |
48 #if ORTHANC_HAS_EMBEDDED_RESOURCES == 1 | |
49 # include <EmbeddedResources.h> // Autogenerated file | |
42 #endif | 50 #endif |
43 | 51 |
44 #include "../HttpClient.h" | 52 #include "../HttpClient.h" |
45 | 53 |
46 extern "C" | 54 extern "C" |
47 { | 55 { |
48 #include <lua.h> | 56 #include <lua.h> |
49 } | 57 } |
50 | 58 |
51 #include <EmbeddedResources.h> | |
52 #include <boost/noncopyable.hpp> | 59 #include <boost/noncopyable.hpp> |
53 | 60 |
54 namespace Orthanc | 61 namespace Orthanc |
55 { | 62 { |
56 class LuaContext : public boost::noncopyable | 63 class LuaContext : public boost::noncopyable |
103 } | 110 } |
104 | 111 |
105 void Execute(Json::Value& output, | 112 void Execute(Json::Value& output, |
106 const std::string& command); | 113 const std::string& command); |
107 | 114 |
115 #if ORTHANC_HAS_EMBEDDED_RESOURCES == 1 | |
108 void Execute(EmbeddedResources::FileResourceId resource); | 116 void Execute(EmbeddedResources::FileResourceId resource); |
117 #endif | |
109 | 118 |
110 bool IsExistingFunction(const char* name); | 119 bool IsExistingFunction(const char* name); |
111 | 120 |
112 void SetHttpCredentials(const char* username, | 121 void SetHttpCredentials(const char* username, |
113 const char* password) | 122 const char* password) |