MCPcopy Create free account
hub / github.com/GNOME/gnome-shell / loadInterfaceXML

Function loadInterfaceXML

js/misc/dbusUtils.js:26–40  ·  view source on GitHub ↗
(iface)

Source from the content-addressed store, hash-verified

24 * @returns {string | null} the XML string or null if it is not found
25 */
26export function loadInterfaceXML(iface) {
27 _ensureIfaceResource();
28
29 const uri = `resource:///org/gnome/shell/dbus-interfaces/${iface}.xml`;
30 const f = Gio.File.new_for_uri(uri);
31
32 try {
33 const [ok_, bytes] = f.load_contents(null);
34 return new TextDecoder().decode(bytes);
35 } catch {
36 log(`Failed to load D-Bus interface ${iface}`);
37 }
38
39 return null;
40}
41
42/**
43 * @param {string} iface the interface name

Callers 15

realmd.jsFile · 0.90
util.jsFile · 0.90
authPrompt.jsFile · 0.90
main.jsFile · 0.90
weather.jsFile · 0.90
modemManager.jsFile · 0.90
introspect.jsFile · 0.90
gnomeSession.jsFile · 0.90
loginManager.jsFile · 0.90
permissionStore.jsFile · 0.90

Calls 1

_ensureIfaceResourceFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…