Files
reasampler/src/shell/package/package_pickers.h
T
daniel 454f67b3bc Close bank-export review findings: name-cap underflow, double overwrite prompt, test scope
Clamps insertSuffix's underflow, floors uniqueEntryName's validity guard, suppresses
the redundant overwrite confirm via a picker out-param, adds a PayloadBuffer
high-water mark, and corrects stale CLAUDE.md/CMake claims.
2026-08-02 17:19:30 -04:00

30 lines
1.5 KiB
C++

// shell/package/package_pickers — the two package file pickers, both on REAPER's own
// GetUserFileName (mode 1 = existing file, mode 0 = new file). No native/platform
// split: the SDK's save mode is not optional on any build that can load this
// extension. Paths in and out are UTF-8, matching this tree's established practice
// for narrow strings crossing the REAPER API (see instrument_drop_win.cpp's
// path.u8string() to TrackFX_SetPreset, or prune_fs.cpp's CP_UTF8 conversion) — the
// SDK header itself never says "UTF-8".
#pragma once
#include <string>
namespace reasampler {
// True with outAbsPath set iff the user chose a file.
bool pickPackageForImport(std::string& outAbsPath);
// suggestedPath is a bare file name ("MyBank.rsbank") or a full path — a full one
// also seeds the dialog's starting directory, which is how a caller keeps the picker
// off REAPER's process working directory. True with outAbsPath set iff the user chose
// a destination; the dialog's own overwrite confirm has already run by then, against
// the path the user actually chose — NOT necessarily outAbsPath, if the `.rsbank`
// re-append below fires. outAppended, when non-null, is set to whether it fired: the
// caller's signal that its own overwrite consent may not cover the returned path
// (see this directory's CLAUDE.md).
bool pickPackageSavePath(const std::string& suggestedPath, std::string& outAbsPath,
bool* outAppended = nullptr);
} // namespace reasampler