54 default:
return "unknown";
64 std::string_view str)
noexcept {
96 default:
return "unknown";
106 std::string_view str)
noexcept {
134 switch (resolution) {
138 default:
return "unknown";
148 std::string_view str)
noexcept {
351 const std::string& config_id,
352 size_t studies_synced,
353 size_t studies_total)>;
362 const std::string& config_id,
conflict_resolution
Strategy for resolving synchronization conflicts.
@ prefer_local
Keep local version.
@ prefer_newer
Use the newer version based on timestamp.
@ prefer_remote
Use remote version.
std::function< void( const std::string &config_id, size_t studies_synced, size_t studies_total)> sync_progress_callback
Callback for sync progress updates.
conflict_resolution conflict_resolution_from_string(std::string_view str) noexcept
Parse conflict_resolution from string.
sync_conflict_type
Type of synchronization conflict.
@ missing_remote
Study exists locally but not on remote.
@ missing_local
Study exists on remote but not locally.
@ modified
Study modified on both sides.
@ count_mismatch
Instance counts differ.
std::function< void(const sync_conflict &conflict)> sync_conflict_callback
Callback for conflict detection.
sync_direction
Direction of synchronization.
@ push
Push from local to remote.
@ bidirectional
Both directions.
@ pull
Pull from remote to local.
constexpr const char * to_string(job_type type) noexcept
Convert job_type to string representation.
sync_conflict_type sync_conflict_type_from_string(std::string_view str) noexcept
Parse sync_conflict_type from string.
std::function< void( const std::string &config_id, const sync_result &result)> sync_completion_callback
Callback for sync completion.
sync_direction sync_direction_from_string(std::string_view str) noexcept
Parse sync_direction from string.
Configuration for a synchronization task.
std::vector< std::string > modalities
Modality filter (empty = all)
std::chrono::hours lookback
How far back to sync.
std::string name
Human-readable name.
int64_t pk
Primary key (0 if not persisted)
bool delete_missing
Delete local if not on remote.
std::string schedule_cron
Cron expression for scheduling.
sync_direction direction
Direction of sync.
bool overwrite_existing
Overwrite if different.
std::chrono::system_clock::time_point last_successful_sync
std::string source_node_id
Remote node to sync with.
bool enabled
Whether this config is active.
std::chrono::system_clock::time_point last_sync
std::string config_id
Unique configuration identifier.
std::vector< std::string > patient_id_patterns
Patient ID patterns (empty = all)
bool sync_metadata_only
Only sync metadata, not images.
Represents a conflict detected during synchronization.
std::chrono::system_clock::time_point detected_at
std::chrono::system_clock::time_point local_modified
bool resolved
Whether this conflict was resolved.
std::string study_uid
Study Instance UID.
sync_conflict_type conflict_type
Type of conflict.
std::string config_id
Config that detected this conflict.
conflict_resolution resolution_used
Resolution strategy used.
std::chrono::system_clock::time_point remote_modified
std::optional< std::chrono::system_clock::time_point > resolved_at
int64_t pk
Primary key (0 if not persisted)
size_t local_instance_count
size_t remote_instance_count
std::string patient_id
Patient ID for reference.
Historical record of a sync operation.
std::vector< std::string > errors
std::chrono::system_clock::time_point started_at
std::chrono::system_clock::time_point completed_at
Configuration for the sync manager.
std::chrono::seconds comparison_timeout
Timeout for compare.
conflict_resolution default_resolution
bool auto_resolve_conflicts
Auto-resolve conflicts.
size_t max_concurrent_syncs
Max parallel syncs.
Result of a synchronization operation.
std::chrono::milliseconds elapsed
bool success
Overall success.
size_t bytes_transferred
Total bytes transferred.
size_t instances_transferred
Individual instances transferred.
std::vector< std::string > errors
Error messages.
size_t studies_synced
Studies actually synced.
std::string job_id
Job ID if async.
size_t studies_skipped
Studies skipped.
std::string config_id
Configuration used.
std::vector< sync_conflict > conflicts
Conflicts detected.
size_t studies_checked
Total studies compared.
std::chrono::system_clock::time_point started_at
std::chrono::system_clock::time_point completed_at
Aggregate statistics for synchronization operations.
size_t total_bytes_transferred
size_t total_conflicts_detected
size_t total_studies_synced
size_t total_conflicts_resolved