Commit Graph
1 Commits
Author SHA1 Message Date
西风逍遥游 548dc34087 feat(common): capability-registered filesystem/network/timer service interfaces + mocks
Add eve::service::{IFileSystem, INetwork, ITimer} in common/ServiceInterfaces.h.
The real modules register themselves via cap::provide at construction:
- filesystem: readFile/writeFile/fileExists (PhysFS-backed, failure returns false)
- network: synchronous httpRequest polling the existing worker completions
- timer: elapsedSeconds from the SDL performance counter

test/service_mocks.cpp provides deterministic doubles (missing files, read/write
failures, HTTP 404/transport errors, scripted clock) so consumers can exercise
error paths offline; also verifies Timer registers the real provider.
2026-08-22 08:31:37 +08:00