ruffle/core/src/avm1/fscommand.rs

20 lines
484 B
Rust
Raw Normal View History

2019-09-20 19:11:33 +00:00
//! FSCommand handling
use crate::avm1::{Avm1, ActionContext, Error};
/// Parse an FSCommand URL.
pub fn parse(url: &str) -> Option<&str> {
if url.starts_with("fscommand:") {
Some(&url["fscommand:".len()..])
} else {
None
}
}
/// TODO: FSCommand URL handling
pub fn handle(fscommand: &str, _avm: &mut Avm1, _ac: &mut ActionContext) -> Result<(), Error> {
log::warn!("Unhandled FSCommand: {}", fscommand);
//This should be an error.
Ok(())
}