ruffle/core/src/avm1/fscommand.rs

27 lines
631 B
Rust
Raw Normal View History

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