Mercurial > hg > orthanc
comparison Core/Lua/LuaContext.h @ 1437:02f5a3f5c0a0
access to the REST API from Lua
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Tue, 30 Jun 2015 18:41:33 +0200 |
parents | 6e7e5ed91c2d |
children | 5ba7471780ae |
comparison
equal
deleted
inserted
replaced
1436:0a3e3be59094 | 1437:02f5a3f5c0a0 |
---|---|
55 HttpClient httpClient_; | 55 HttpClient httpClient_; |
56 | 56 |
57 static LuaContext& GetLuaContext(lua_State *state); | 57 static LuaContext& GetLuaContext(lua_State *state); |
58 | 58 |
59 static int PrintToLog(lua_State *state); | 59 static int PrintToLog(lua_State *state); |
60 static int ParseJsonString(lua_State *state); | |
60 | 61 |
61 static int SetHttpCredentials(lua_State *state); | 62 static int SetHttpCredentials(lua_State *state); |
62 | 63 |
63 static int CallHttpPostOrPut(lua_State *state, | 64 static int CallHttpPostOrPut(lua_State *state, |
64 HttpMethod method); | 65 HttpMethod method); |
105 | 106 |
106 void SetHttpProxy(const std::string& proxy) | 107 void SetHttpProxy(const std::string& proxy) |
107 { | 108 { |
108 httpClient_.SetProxy(proxy); | 109 httpClient_.SetProxy(proxy); |
109 } | 110 } |
111 | |
112 void RegisterFunction(const char* name, | |
113 lua_CFunction func); | |
114 | |
115 void SetGlobalVariable(const char* name, | |
116 void* value); | |
117 | |
118 static const void* GetGlobalVariable(lua_State* state, | |
119 const char* name); | |
110 }; | 120 }; |
111 } | 121 } |