yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
message_source_sync.h
Go to the documentation of this file.
1#ifndef YAZE_APP_EDITOR_MESSAGE_MESSAGE_SOURCE_SYNC_H_
2#define YAZE_APP_EDITOR_MESSAGE_MESSAGE_SOURCE_SYNC_H_
3
4#include <cstddef>
5#include <filesystem>
6#include <string>
7#include <string_view>
8
9#include "absl/status/statusor.h"
10#include "core/project.h"
11
12namespace yaze::editor {
13
15 // Source synchronization is a dry-run unless this is explicitly enabled.
16 bool write = false;
17
18 // Required in write mode. This is compared with the SHA-256 of the exact
19 // canonical bundle bytes immediately before publication.
21};
22
24 std::filesystem::path canonical_bundle_path;
25 std::filesystem::path generated_asm_include_path;
26
31 size_t encoded_size = 0;
32 size_t capacity = 0;
33
36 bool changed = false;
37 bool wrote = false;
38};
39
40// Compute the lowercase SHA-256 used by canonical source/include provenance.
41std::string ComputeMessageSourceSha256(std::string_view content);
42
43// Merge a validated expanded-message subset into the complete canonical
44// project bundle and render its deterministic, no-org Asar include.
45//
46// Both publication targets come from messages.source in the project's loaded
47// hack manifest. The paths must remain within the project root after symlink
48// resolution. No ROM is opened or mutated by this service.
49absl::StatusOr<MessageSourceSyncResult> SyncMessageSource(
50 const project::YazeProject& project,
51 const std::filesystem::path& incoming_bundle_path,
52 const MessageSourceSyncOptions& options = {});
53
54} // namespace yaze::editor
55
56#endif // YAZE_APP_EDITOR_MESSAGE_MESSAGE_SOURCE_SYNC_H_
Editors are the view controllers for the application.
std::string ComputeMessageSourceSha256(std::string_view content)
absl::StatusOr< MessageSourceSyncResult > SyncMessageSource(const project::YazeProject &project, const fs::path &incoming_bundle_path, const MessageSourceSyncOptions &options)
Modern project structure with comprehensive settings consolidation.
Definition project.h:172