File indexing completed on 2025-02-22 10:38:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #pragma once
0022 #ifndef GFAL_TRANSFER_PLUGINS_H_
0023 #define GFAL_TRANSFER_PLUGINS_H_
0024
0025 #if !defined(__GFAL2_H_INSIDE__) && !defined(__GFAL2_BUILD__)
0026 # warning "Direct inclusion of gfal2 headers is deprecated. Please, include only gfal_api.h or gfal_plugins_api.h"
0027 #endif
0028
0029 #include <transfer/gfal_transfer.h>
0030
0031 #ifdef __cplusplus
0032 extern "C"
0033 {
0034 #endif
0035
0036 struct _gfalt_transfer_status {
0037 gpointer plugin_transfer_data;
0038 int status;
0039 size_t average_baudrate;
0040 size_t instant_baudrate;
0041 time_t transfer_time;
0042 size_t bytes_transfered;
0043 };
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 int plugin_trigger_event(gfalt_params_t params, GQuark domain,
0054 gfal_event_side_t side, GQuark stage,
0055 const char* fmt, ...);
0056
0057
0058
0059
0060
0061
0062
0063
0064 int plugin_trigger_monitor(gfalt_params_t params, gfalt_transfer_status_t status,
0065 const char* src, const char* dst);
0066
0067
0068
0069
0070 void gfalt_propagate_prefixed_error(GError **dest, GError *src, const gchar *function, const gchar *side, const gchar *note);
0071
0072 void gfalt_set_error(GError **err, GQuark domain, gint code, const gchar *function,
0073 const char *side, const gchar *note, const gchar *format, ...) G_GNUC_PRINTF (7, 8);
0074
0075 #define GFALT_ERROR_SOURCE "SOURCE"
0076 #define GFALT_ERROR_DESTINATION "DESTINATION"
0077 #define GFALT_ERROR_TRANSFER "TRANSFER"
0078 #define GFALT_ERROR_CHECKSUM "CHECKSUM"
0079 #define GFALT_ERROR_EXISTS "EXISTS"
0080 #define GFALT_ERROR_OVERWRITE "OVERWRITE"
0081 #define GFALT_ERROR_PARENT "MAKE_PARENT"
0082
0083
0084
0085
0086
0087
0088 #define GFALT_ERROR_CHECKSUM_MISMATCH "CHECKSUM MISMATCH"
0089
0090
0091
0092 #define GFALT_ERROR_SIZE_MISMATCH "SIZE MISMATCH"
0093
0094 #ifdef __cplusplus
0095 }
0096 #endif
0097
0098 #endif