diff options
Diffstat (limited to 'src/server/cache/CacheCallbacks.hx')
| -rw-r--r-- | src/server/cache/CacheCallbacks.hx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/server/cache/CacheCallbacks.hx b/src/server/cache/CacheCallbacks.hx new file mode 100644 index 0000000..28ced3c --- /dev/null +++ b/src/server/cache/CacheCallbacks.hx @@ -0,0 +1,15 @@ +package server.cache; + +typedef CacheCallbacks = { + /** Called once the final cache url is known, before download starts. **/ + final onResolved:(url:String) -> Void; + final onProgress:(ratio:Float) -> Void; + final onComplete:() -> Void; + final onError:() -> Void; + final ?registerCancel:(cancel:() -> Void) -> Void; + /** + Called when the real title/duration become known (for items added + with a zero duration, e.g. when the client could not resolve them). + **/ + final ?onMetadata:(title:Null<String>, duration:Float) -> Void; +} |
