comparison Plugins/Samples/Basic/Plugin.c @ 1232:f1c01451a8ee

Introspection of plugins, Plugins can extend Orthanc Explorer with custom JavaScript
author Sebastien Jodogne <s.jodogne@gmail.com>
date Thu, 04 Dec 2014 17:04:40 +0100
parents 1e1390665639
children 40725595aaf0
comparison
equal deleted inserted replaced
1231:703fcd797186 1232:f1c01451a8ee
324 324
325 OrthancPluginRegisterOnStoredInstanceCallback(context, OnStoredCallback); 325 OrthancPluginRegisterOnStoredInstanceCallback(context, OnStoredCallback);
326 326
327 OrthancPluginRegisterOnChangeCallback(context, OnChangeCallback); 327 OrthancPluginRegisterOnChangeCallback(context, OnChangeCallback);
328 328
329 /* Declare several properties of the plugin */
330 OrthancPluginSetRootUri(context, "/plugin/hello");
331 OrthancPluginSetDescription(context, "This is the description of the sample plugin that can be seen in Orthanc Explorer.");
332 OrthancPluginExtendOrthancExplorer(context, "alert('Hello Orthanc! From sample plugin with love.');");
333
329 /* Make REST requests to the built-in Orthanc API */ 334 /* Make REST requests to the built-in Orthanc API */
330 OrthancPluginRestApiGet(context, &tmp, "/changes"); 335 OrthancPluginRestApiGet(context, &tmp, "/changes");
331 OrthancPluginFreeMemoryBuffer(context, &tmp); 336 OrthancPluginFreeMemoryBuffer(context, &tmp);
332 OrthancPluginRestApiGet(context, &tmp, "/changes?limit=1"); 337 OrthancPluginRestApiGet(context, &tmp, "/changes?limit=1");
333 OrthancPluginFreeMemoryBuffer(context, &tmp); 338 OrthancPluginFreeMemoryBuffer(context, &tmp);