2019-09-20 19:11:33 +00:00
|
|
|
//! FSCommand handling
|
|
|
|
|
2020-06-20 12:57:53 +00:00
|
|
|
use crate::avm1::error::Error;
|
2020-06-28 10:07:27 +00:00
|
|
|
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> {
|
2019-09-21 01:38:37 +00:00
|
|
|
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
|
2020-06-20 23:02:45 +00:00
|
|
|
pub fn handle<'gc>(
|
|
|
|
fscommand: &str,
|
2020-06-28 10:07:27 +00:00
|
|
|
_activation: &mut StackFrame,
|
2020-06-20 23:02:45 +00:00
|
|
|
_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
|
|
|
}
|