Files
leonarski_fandClaude Opus 5.5 a45dcfee2e SPDX: compound expressions for adapted files, LicenseRef-HDF5, tags on untagged files
- Files adapted from other projects carry both licences: StrongPixelSet.cpp,
  SpotExtractorGPU.cu and the four GEMMI-derived structure_refinement files
  "GPL-3.0-only AND MPL-2.0"; FFBIDXIndexerCPU.cpp, LMSolver.{h,cpp} and
  xds-plugin/plugin.* "GPL-3.0-only AND BSD-3-Clause"; fpga/hls/parallel_stream.h
  "CERN-OHL-S-2.0 AND Apache-2.0"; fpga/hls/icmp.cpp and ip_header_checksum.h
  (HPCN UAM, with PSI modifications) "CERN-OHL-S-2.0 AND BSD-3-Clause".
- writer/H5FDpoison_sec2.{c,h} and tests/enospc_shim.c: "OR HDF5" is not an
  SPDX id; now "OR LicenseRef-HDF5", with the text named (licenses/hdf5.txt).
  The poison driver wraps the stock sec2 driver rather than copying it (only
  the H5FD_class_t initialiser layout matches H5FDsec2.c), so the files stay
  dual-licensed (OR), not derived (AND).
- 151 first-party files without a tag (CMake, shell, Python, frontend, docs
  JS, a few C++) get one: GPL-3.0-only, CERN-OHL-S-2.0 for fpga/, fpga/hls/
  and fpga/scripts/, with the copyright line of the neighbouring files and the
  year the file was added. Generated and vendored code is not touched;
  fpga/pcie_driver/postinstall.sh and preuninstall.sh are left untagged, as
  they say they are taken from a blog post.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01UqXYdJDrM65gxsCn2PrbfK
2026-11-15 16:18:09 +01:00

47 lines
1.4 KiB
C

// SPDX-FileCopyrightText: 2025 Filip Leonarski, Paul Scherrer Institute <filip.leonarski@psi.ch>
// SPDX-License-Identifier: GPL-3.0-only AND BSD-3-Clause
// Based on Durin plugin code from Diamond Light Source Ltd. and Global Phasing (BSD-3 license)
/*
* External library interface for XDS.
* Ref: https://wiki.uni-konstanz.de/xds/index.php/LIB
*/
#pragma once
#if defined(_WIN32)
#if defined(jfjoch_xds_plugin_EXPORTS)
#define XDS_PLUGIN_API __declspec(dllexport)
#else
#define XDS_PLUGIN_API __declspec(dllimport)
#endif
#elif defined(__GNUC__) || defined(__clang__)
#define XDS_PLUGIN_API __attribute__((visibility("default")))
#else
#define XDS_PLUGIN_API
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define VERSION_MAJOR 0
#define VERSION_MINOR 0
#define VERSION_PATCH 0
#define VERSION_TIMESTAMP -1 /* good enough for Dectris apparantely */
XDS_PLUGIN_API void plugin_open(const char *filename, int info[1024], int *error_flag);
XDS_PLUGIN_API void plugin_get_header(int *nx, int *ny, int *nbytes, float *qx, float *qy,
int *number_of_frames, int info[1024], int *error_flag);
XDS_PLUGIN_API void plugin_get_data(int *frame_number, int *nx, int *ny, int *data_array,
int info[1024], int *error_flag);
XDS_PLUGIN_API void plugin_close(int *error_flag);
#ifdef __cplusplus
} /* extern "C" */
#endif