// SPDX-FileCopyrightText: 2026 Reactorcoremeltdown // SPDX-License-Identifier: GPL-3.0-or-later #import "SizzleSession.h" NS_ASSUME_NONNULL_BEGIN /// Project bundles and whole-app backups (Android's ProjectBundleIo and BackupIo), /// both ZIP archives in Android's layouts. @interface SizzleSession (Files) /// The open song as a bundle (.szgz): project.szg, every sample its Sampler, /// SF2/XI, Grain Cloud and Wavetable slots use (samples/.wav) and /// samples/manifest.txt (`\t` per line). - (nullable NSData *)projectBundleData; /// Replace the open song with a bundle's: its samples are stored under their ids /// first, so the song finds them. Leaves the song alone if it isn't a bundle. - (BOOL)importProjectBundleData:(NSData *)data error:(NSError **)error; /// True for a ZIP archive (bundle or backup) rather than text. + (BOOL)isZipData:(NSData *)data; /// Everything Sizzle keeps: Documents/songs, themes, presets and samples, the /// autosaved song, and [settings] as settings.txt. The open song is autosaved first. - (nullable NSData *)backupDataWithSettings:(NSString *)settings; /// Restore a backup: it is unpacked aside first and only swapped in once it looks /// like one, so a wrong file can't destroy anything. The restored autosave becomes /// the open song. Returns the backup's settings text ("" if it has none), or nil. - (nullable NSString *)restoreBackupData:(NSData *)data error:(NSError **)error; @end NS_ASSUME_NONNULL_END