Skip to content

Commit

Permalink
renaming IDAM_PLUGIN_INTERFACE to UDA_PLUGIN_ITERFACE
Browse files Browse the repository at this point in the history
  • Loading branch information
stephen-dixon committed Jan 25, 2024
1 parent 3e187dd commit cf2eff0
Show file tree
Hide file tree
Showing 32 changed files with 201 additions and 201 deletions.
2 changes: 1 addition & 1 deletion source/clientserver/copyStructs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ void copyDataSource(DATA_SOURCE* out, DATA_SOURCE in)
strcpy(out->xml_creation, in.xml_creation);
}

void copyPluginInterface(IDAM_PLUGIN_INTERFACE* out, IDAM_PLUGIN_INTERFACE* in)
void copyPluginInterface(UDA_PLUGIN_INTERFACE* out, UDA_PLUGIN_INTERFACE* in)
{
out->interfaceVersion = in->interfaceVersion;
out->pluginVersion = in->pluginVersion;
Expand Down
2 changes: 1 addition & 1 deletion source/clientserver/copyStructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ extern "C" {

LIBRARY_API void copyRequestBlock(REQUEST_BLOCK* out, REQUEST_BLOCK in);
LIBRARY_API void copyDataSource(DATA_SOURCE* out, DATA_SOURCE in);
LIBRARY_API void copyPluginInterface(IDAM_PLUGIN_INTERFACE* out, IDAM_PLUGIN_INTERFACE* in);
LIBRARY_API void copyPluginInterface(UDA_PLUGIN_INTERFACE* out, UDA_PLUGIN_INTERFACE* in);

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion source/include/legacy.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
* definitions from pluginStructs.h
*/

# define IDAM_PLUGIN_INTERFACE UDA_PLUGIN_INTERFACE
# define UDA_PLUGIN_INTERFACE UDA_PLUGIN_INTERFACE

/*
* definitions from udaGetAPI.h
Expand Down
6 changes: 3 additions & 3 deletions source/include/udaPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ typedef void (*ADDIDAMERRORFUNP)(UDA_ERROR_STACK*, int, char*, int, char*); // W
// Prototypes

LIBRARY_API int callPlugin(const PLUGINLIST* pluginlist, const char* request,
const IDAM_PLUGIN_INTERFACE* old_plugin_interface);
const UDA_PLUGIN_INTERFACE* old_plugin_interface);

IDAM_PLUGIN_INTERFACE* udaCreatePluginInterface(const char* request);
void udaFreePluginInterface(IDAM_PLUGIN_INTERFACE* plugin_interface);
UDA_PLUGIN_INTERFACE* udaCreatePluginInterface(const char* request);
void udaFreePluginInterface(UDA_PLUGIN_INTERFACE* plugin_interface);

LIBRARY_API int findPluginIdByRequest(int request, const PLUGINLIST* plugin_list);
LIBRARY_API int findPluginIdByFormat(const char* format, const PLUGINLIST* plugin_list);
Expand Down
8 changes: 4 additions & 4 deletions source/plugins/bytes/bytesPlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ class BytesPlugin : public UDAPluginBase
{
public:
BytesPlugin();
int read(IDAM_PLUGIN_INTERFACE* plugin_interface);
void init(IDAM_PLUGIN_INTERFACE* plugin_interface) override {}
int read(UDA_PLUGIN_INTERFACE* plugin_interface);
void init(UDA_PLUGIN_INTERFACE* plugin_interface) override {}
void reset() override {}
};

Expand All @@ -25,15 +25,15 @@ BytesPlugin::BytesPlugin()
register_method("read", static_cast<UDAPluginBase::plugin_member_type>(&BytesPlugin::read));
}

int bytesPlugin(IDAM_PLUGIN_INTERFACE* plugin_interface)
int bytesPlugin(UDA_PLUGIN_INTERFACE* plugin_interface)
{
static BytesPlugin plugin = {};
return plugin.call(plugin_interface);
}

//----------------------------------------------------------------------------------------
// Add functionality here ....
int BytesPlugin::read(IDAM_PLUGIN_INTERFACE* plugin_interface)
int BytesPlugin::read(UDA_PLUGIN_INTERFACE* plugin_interface)
{
auto path = find_required_arg<std::string>(plugin_interface, "path");

Expand Down
2 changes: 1 addition & 1 deletion source/plugins/bytes/bytesPlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" {
#define THISPLUGIN_MAX_INTERFACE_VERSION 1 // Interface versions higher than this will not be understood!
#define THISPLUGIN_DEFAULT_METHOD "help"

LIBRARY_API int bytesPlugin(IDAM_PLUGIN_INTERFACE* idam_plugin_interface);
LIBRARY_API int bytesPlugin(UDA_PLUGIN_INTERFACE* idam_plugin_interface);

#ifdef __cplusplus
}
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/bytes/readBytesNonOptimally.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
#define BYTEFILEMD5ERROR 100006
#define BYTEFILEMD5DIFF 100007

int readBytes(const std::string& path, IDAM_PLUGIN_INTERFACE* plugin_interface)
int readBytes(const std::string& path, UDA_PLUGIN_INTERFACE* plugin_interface)
{
int err = 0;

Expand Down
2 changes: 1 addition & 1 deletion source/plugins/bytes/readBytesNonOptimally.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@
#include "pluginStructs.h"
#include <string>

int readBytes(const std::string& path, IDAM_PLUGIN_INTERFACE* plugin_interface);
int readBytes(const std::string& path, UDA_PLUGIN_INTERFACE* plugin_interface);

#endif // UDA_PLUGIN_READBYTESNONOPTIMALLY_H
12 changes: 6 additions & 6 deletions source/plugins/hdf5/hdf5plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ class HDF5Plugin : public UDAPluginBase
{
public:
HDF5Plugin();
int read(IDAM_PLUGIN_INTERFACE* plugin_interface);
int hello(IDAM_PLUGIN_INTERFACE* plugin_interface)
int read(UDA_PLUGIN_INTERFACE* plugin_interface);
int hello(UDA_PLUGIN_INTERFACE* plugin_interface)
{
return setReturnDataString(plugin_interface->data_block, "hello!", nullptr);
}
static int foo(IDAM_PLUGIN_INTERFACE* plugin_interface)
static int foo(UDA_PLUGIN_INTERFACE* plugin_interface)
{
return setReturnDataString(plugin_interface->data_block, "foo!", nullptr);
}
void init(IDAM_PLUGIN_INTERFACE* plugin_interface) override {}
void init(UDA_PLUGIN_INTERFACE* plugin_interface) override {}
void reset() override {}
};

Expand All @@ -31,7 +31,7 @@ HDF5Plugin::HDF5Plugin() : UDAPluginBase("HDF5", 1, "read", "")
/**
* Entry function
*/
extern int hdf5Plugin(IDAM_PLUGIN_INTERFACE* plugin_interface)
extern int hdf5Plugin(UDA_PLUGIN_INTERFACE* plugin_interface)
{
static HDF5Plugin plugin = {};
return plugin.call(plugin_interface);
Expand All @@ -40,7 +40,7 @@ extern int hdf5Plugin(IDAM_PLUGIN_INTERFACE* plugin_interface)
//----------------------------------------------------------------------------------------
// Read data from a HDF5 File

int HDF5Plugin::read(IDAM_PLUGIN_INTERFACE* plugin_interface)
int HDF5Plugin::read(UDA_PLUGIN_INTERFACE* plugin_interface)
{
DATA_SOURCE* data_source = plugin_interface->data_source;
SIGNAL_DESC* signal_desc = plugin_interface->signal_desc;
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/hdf5/hdf5plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ extern "C" {

extern UDA_PLUGIN_FILE_LIST pluginFileList;

LIBRARY_API int hdf5Plugin(IDAM_PLUGIN_INTERFACE* plugin_interface);
LIBRARY_API int hdf5Plugin(UDA_PLUGIN_INTERFACE* plugin_interface);

#ifdef __cplusplus
}
Expand Down
12 changes: 6 additions & 6 deletions source/plugins/help/help_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ class HelpPlugin : public UDAPluginBase
{
public:
HelpPlugin();
int ping(IDAM_PLUGIN_INTERFACE* plugin_interface);
int services(IDAM_PLUGIN_INTERFACE* plugin_interface);
void init(IDAM_PLUGIN_INTERFACE* plugin_interface) override {}
int ping(UDA_PLUGIN_INTERFACE* plugin_interface);
int services(UDA_PLUGIN_INTERFACE* plugin_interface);
void init(UDA_PLUGIN_INTERFACE* plugin_interface) override {}
void reset() override {}
};

Expand All @@ -25,13 +25,13 @@ HelpPlugin::HelpPlugin()
register_method("services", static_cast<UDAPluginBase::plugin_member_type>(&HelpPlugin::services));
}

int helpPlugin(IDAM_PLUGIN_INTERFACE* plugin_interface)
int helpPlugin(UDA_PLUGIN_INTERFACE* plugin_interface)
{
static HelpPlugin plugin = {};
return plugin.call(plugin_interface);
}

int HelpPlugin::ping(IDAM_PLUGIN_INTERFACE* plugin_interface)
int HelpPlugin::ping(UDA_PLUGIN_INTERFACE* plugin_interface)
{
//----------------------------------------------------------------------------------------

Expand Down Expand Up @@ -99,7 +99,7 @@ int HelpPlugin::ping(IDAM_PLUGIN_INTERFACE* plugin_interface)
return 0;
}

int HelpPlugin::services(IDAM_PLUGIN_INTERFACE* plugin_interface)
int HelpPlugin::services(UDA_PLUGIN_INTERFACE* plugin_interface)
{
//======================================================================================
// Plugin functionality
Expand Down
2 changes: 1 addition & 1 deletion source/plugins/help/help_plugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" {
#define THISPLUGIN_MAX_INTERFACE_VERSION 1
#define THISPLUGIN_DEFAULT_METHOD "help"

LIBRARY_API int helpPlugin(IDAM_PLUGIN_INTERFACE* idam_plugin_interface);
LIBRARY_API int helpPlugin(UDA_PLUGIN_INTERFACE* idam_plugin_interface);

#ifdef __cplusplus
}
Expand Down
20 changes: 10 additions & 10 deletions source/plugins/keyvalue/keyvaluePlugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ class Plugin : public UDAPluginBase
{
public:
Plugin();
int write(IDAM_PLUGIN_INTERFACE* plugin_interface);
int read(IDAM_PLUGIN_INTERFACE* plugin_interface);
int del(IDAM_PLUGIN_INTERFACE* plugin_interface);
void init(IDAM_PLUGIN_INTERFACE* plugin_interface) override;
int write(UDA_PLUGIN_INTERFACE* plugin_interface);
int read(UDA_PLUGIN_INTERFACE* plugin_interface);
int del(UDA_PLUGIN_INTERFACE* plugin_interface);
void init(UDA_PLUGIN_INTERFACE* plugin_interface) override;
void reset() override;

private:
Expand All @@ -43,13 +43,13 @@ Plugin::Plugin()
} // namespace keyvalue
} // namespace uda

int keyValue(IDAM_PLUGIN_INTERFACE* plugin_interface)
int keyValue(UDA_PLUGIN_INTERFACE* plugin_interface)
{
static uda::keyvalue::Plugin plugin = {};
return plugin.call(plugin_interface);
}

void uda::keyvalue::Plugin::init(IDAM_PLUGIN_INTERFACE* plugin_interface)
void uda::keyvalue::Plugin::init(UDA_PLUGIN_INTERFACE* plugin_interface)
{
options_ = leveldb_options_create();
leveldb_options_set_create_if_missing(options_, 1);
Expand Down Expand Up @@ -79,7 +79,7 @@ void uda::keyvalue::Plugin::reset()
options_ = nullptr;
}

int uda::keyvalue::Plugin::write(IDAM_PLUGIN_INTERFACE* plugin_interface)
int uda::keyvalue::Plugin::write(UDA_PLUGIN_INTERFACE* plugin_interface)
{
auto key = find_required_arg<std::string>(plugin_interface, "key");
auto value = find_required_arg<std::string>(plugin_interface, "value");
Expand All @@ -105,7 +105,7 @@ int uda::keyvalue::Plugin::write(IDAM_PLUGIN_INTERFACE* plugin_interface)
return 0;
}

int uda::keyvalue::Plugin::read(IDAM_PLUGIN_INTERFACE* plugin_interface)
int uda::keyvalue::Plugin::read(UDA_PLUGIN_INTERFACE* plugin_interface)
{
auto key = find_required_arg<std::string>(plugin_interface, "key");

Expand Down Expand Up @@ -135,7 +135,7 @@ int uda::keyvalue::Plugin::read(IDAM_PLUGIN_INTERFACE* plugin_interface)
return 0;
}

int uda::keyvalue::Plugin::del(IDAM_PLUGIN_INTERFACE* plugin_interface)
int uda::keyvalue::Plugin::del(UDA_PLUGIN_INTERFACE* plugin_interface)
{
auto key = find_required_arg<std::string>(plugin_interface, "key");

Expand All @@ -161,4 +161,4 @@ int uda::keyvalue::Plugin::del(IDAM_PLUGIN_INTERFACE* plugin_interface)
}

return 0;
}
}
2 changes: 1 addition & 1 deletion source/plugins/keyvalue/keyvaluePlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" {
#define THISPLUGIN_MAX_INTERFACE_VERSION 1 // Interface versions higher than this will not be understood!
#define THISPLUGIN_DEFAULT_METHOD "help"

LIBRARY_API int keyValue(IDAM_PLUGIN_INTERFACE* idam_plugin_interface);
LIBRARY_API int keyValue(UDA_PLUGIN_INTERFACE* idam_plugin_interface);

#ifdef __cplusplus
}
Expand Down
10 changes: 5 additions & 5 deletions source/plugins/template/templatePlugin.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*---------------------------------------------------------------
* v1 UDA Plugin Template: Standardised plugin design template, just add ...
*
* Input Arguments: IDAM_PLUGIN_INTERFACE *idam_plugin_interface
* Input Arguments: UDA_PLUGIN_INTERFACE *idam_plugin_interface
*
* Returns: 0 if the plugin functionality was successful
* otherwise a Error Code is returned
Expand Down Expand Up @@ -30,8 +30,8 @@ class TemplatePlugin : public UDAPluginBase
{
public:
TemplatePlugin();
int function(IDAM_PLUGIN_INTERFACE* plugin_interface);
void init(IDAM_PLUGIN_INTERFACE* plugin_interface) override {}
int function(UDA_PLUGIN_INTERFACE* plugin_interface);
void init(UDA_PLUGIN_INTERFACE* plugin_interface) override {}
void reset() override {}
};

Expand All @@ -42,7 +42,7 @@ TemplatePlugin::TemplatePlugin()
register_method("function", static_cast<UDAPluginBase::plugin_member_type>(&TemplatePlugin::function));
}

int templatePlugin(IDAM_PLUGIN_INTERFACE* plugin_interface)
int templatePlugin(UDA_PLUGIN_INTERFACE* plugin_interface)
{
static TemplatePlugin plugin = {};
return plugin.call(plugin_interface);
Expand All @@ -66,7 +66,7 @@ template <typename T> std::string to_string(const std::vector<T>& array)

//----------------------------------------------------------------------------------------
// Add functionality here ....
int TemplatePlugin::function(IDAM_PLUGIN_INTERFACE* plugin_interface)
int TemplatePlugin::function(UDA_PLUGIN_INTERFACE* plugin_interface)
{
DATA_BLOCK* data_block = plugin_interface->data_block;

Expand Down
2 changes: 1 addition & 1 deletion source/plugins/template/templatePlugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" {
#define THISPLUGIN_MAX_INTERFACE_VERSION 1 // Interface versions higher than this will not be understood!
#define THISPLUGIN_DEFAULT_METHOD "help"

LIBRARY_API int templatePlugin(IDAM_PLUGIN_INTERFACE* idam_plugin_interface);
LIBRARY_API int templatePlugin(UDA_PLUGIN_INTERFACE* idam_plugin_interface);

#ifdef __cplusplus
}
Expand Down
Loading

0 comments on commit cf2eff0

Please sign in to comment.