MCPcopy Index your code
hub / github.com/NativeScript/SimDeck / parse_application_list

Function parse_application_list

packages/server/src/webkit.rs:1040–1061  ·  view source on GitHub ↗
(args: &Dictionary)

Source from the content-addressed store, hash-verified

1038}
1039
1040fn parse_application_list(args: &Dictionary) -> Vec<WebKitApplication> {
1041 let Some(apps) = args
1042 .get("WIRApplicationDictionaryKey")
1043 .and_then(Value::as_dictionary)
1044 else {
1045 return Vec::new();
1046 };
1047
1048 apps.iter()
1049 .filter_map(|(app_id, value)| {
1050 let app = value.as_dictionary()?;
1051 Some(WebKitApplication {
1052 id: string_value(app, "WIRApplicationIdentifierKey")
1053 .unwrap_or_else(|| app_id.clone()),
1054 name: string_value(app, "WIRApplicationNameKey"),
1055 bundle_identifier: string_value(app, "WIRApplicationBundleIdentifierKey"),
1056 active: integer_value(app, "WIRIsApplicationActiveKey").unwrap_or(0) > 0,
1057 is_proxy: bool_value(app, "WIRIsApplicationProxyKey").unwrap_or(false),
1058 })
1059 })
1060 .collect()
1061}
1062
1063fn parse_application(args: &Dictionary) -> Option<WebKitApplication> {
1064 let id = string_value(args, "WIRApplicationIdentifierKey")?;

Calls 5

integer_valueFunction · 0.85
bool_valueFunction · 0.85
string_valueFunction · 0.70
getMethod · 0.65
cloneMethod · 0.65