feat(#38): backup envelope, problems and SAF I/O from floret core-backup
This commit is contained in:
1 parent
a81a3641ce
commit
5ab92d65e2
16 files changed
+319
-130
No files matched your search
@@ -112,7 +112,7 @@ kit module: the kit's roadmap keeps schedulers app-local.
|
||||
| `data/ringtones/` | the two ringtone seams, `RingtoneCatalog` (the bundled and device alarm sounds, titles, playability, a SAF grant) and `RingtonePreviewer`, plus their `System*` implementations, and `MediaLibrary`/`SystemMediaLibrary`, the picker's view of other apps' `MediaBrowserService` libraries |
|
||||
| `data/time/` | `SystemWallClock`, `SystemElapsedRealtimeClock`, `SystemZoneProvider`, `AndroidBootIdProvider`, `RealTicker`, `AndroidClockChanges` (a receiver for `TIME_SET`/`TIMEZONE_CHANGED` registered only while collected), `AndroidHourFormat` |
|
||||
| `data/di/` | `DataModule`, `DatabaseModule`, `RepositoryModule`, `TimeModule`, `RingtoneModule`, `ZoneModule` (M8; one `@Binds`, `ZoneNames → IcuZoneNames`), `BackupModule` (M10) |
|
||||
| `data/backup/` | the backup's data-layer half (M10): `BackupDto`/`BackupCodec` (the pure JSON wire format, `ignoreUnknownKeys`, strict on known fields), `BackupDao` (one `@Transaction` replace-all over alarms/timers/world clocks; no schema or version change), `BackupRepository(+Impl)`, mapping through the existing `AlarmMapper`/`TimerMapper`/`WorldClockMapper`, never a second copy |
|
||||
| `data/backup/` | the backup's data-layer half (M10): `BackupDto`/`BackupCodec` (the pure JSON wire format on floret `core-backup`'s `BackupFormat` envelope, `ignoreUnknownKeys`, strict on known fields), `BackupDao` (one `@Transaction` replace-all over alarms/timers/world clocks; no schema or version change), `BackupRepository(+Impl)`, mapping through the existing `AlarmMapper`/`TimerMapper`/`WorldClockMapper`, never a second copy |
|
||||
| `alarm/` | `AlarmEngine` and the four seams it talks to (`AlarmScheduler`, `AlarmCapabilities`, `RingCoordinator`, `AlarmNotifier`), plus `AlarmIntents` |
|
||||
| `alarm/android/` | the seams' Android implementations: AlarmManager, the capability reads, the service handle, the snoozed and upcoming notifications |
|
||||
| `alarm/receiver/` | `AlarmFireReceiver`, `AlarmActionReceiver`, `SystemEventReceiver` |
|
||||
|
||||
+6
-1
@@ -4,7 +4,9 @@
|
||||
own data, written to (and read from) a user-chosen folder via SAF
|
||||
(`docs/PLAN.md` §7). This file is the schema's source of truth; the codec
|
||||
(`data/backup/BackupDto.kt`, `BackupCodec.kt`) implements exactly what is
|
||||
written here.
|
||||
written here. The envelope (`format`, `version`, `exportedAt`) and the
|
||||
version and size rules are floret-kit's `core-backup` `BackupFormat`, shared
|
||||
with Calendula's settings backup; the sections are Clockula's own.
|
||||
|
||||
## Top level
|
||||
|
||||
@@ -30,6 +32,9 @@ written here.
|
||||
tomorrow's, or a paused one back on. The file name stays
|
||||
`clockula-backup-v1.json` so an existing backup folder keeps working.
|
||||
- `exportedAt`: epoch milliseconds, informational only (not re-imported).
|
||||
A file without `version` or `exportedAt`, or with either not a plain
|
||||
number, is rejected as damaged.
|
||||
- A leading byte-order mark (an editor re-saving the file) is ignored.
|
||||
|
||||
## Parsing rules
|
||||
|
||||
|
||||
Reference in new issue
Block a user