comparison OrthancFramework/Sources/Lua/LuaContext.h @ 5016:c89ffa13173e

Lua: new "SetHttpTimeout" function
author Alain Mazy <am@osimis.io>
date Mon, 13 Jun 2022 16:55:22 +0200
parents 43e613a7756b
children 0ea402b4d901
comparison
equal deleted inserted replaced
5015:5b41a8a77cf1 5016:c89ffa13173e
68 static int ParseJson(lua_State *state); 68 static int ParseJson(lua_State *state);
69 static int DumpJson(lua_State *state); 69 static int DumpJson(lua_State *state);
70 70
71 #if ORTHANC_ENABLE_CURL == 1 71 #if ORTHANC_ENABLE_CURL == 1
72 static int SetHttpCredentials(lua_State *state); 72 static int SetHttpCredentials(lua_State *state);
73 static int SetHttpTimeout(lua_State *state);
73 static int CallHttpPostOrPut(lua_State *state, 74 static int CallHttpPostOrPut(lua_State *state,
74 HttpMethod method); 75 HttpMethod method);
75 static int CallHttpGet(lua_State *state); 76 static int CallHttpGet(lua_State *state);
76 static int CallHttpPost(lua_State *state); 77 static int CallHttpPost(lua_State *state);
77 static int CallHttpPut(lua_State *state); 78 static int CallHttpPut(lua_State *state);
103 void Execute(Json::Value& output, 104 void Execute(Json::Value& output,
104 const std::string& command); 105 const std::string& command);
105 106
106 bool IsExistingFunction(const char* name); 107 bool IsExistingFunction(const char* name);
107 108
108 #if ORTHANC_ENABLE_CURL == 1
109 void SetHttpCredentials(const char* username,
110 const char* password);
111 #endif
112
113 void RegisterFunction(const char* name, 109 void RegisterFunction(const char* name,
114 lua_CFunction func); 110 lua_CFunction func);
115 111
116 void SetGlobalVariable(const char* name, 112 void SetGlobalVariable(const char* name,
117 void* value); 113 void* value);