__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
import Gio from 'gi://Gio';
import GLib from 'gi://GLib';
import GObject from 'gi://GObject';
import {CancellableChild, Logger} from './util.js';
Gio._promisify(Gio.DBusProxy.prototype, 'init_async');
export const DBusProxy = GObject.registerClass({
Signals: {'destroy': {}},
}, class DBusProxy extends Gio.DBusProxy {
static get TUPLE_VARIANT_TYPE() {
if (!this._tupleVariantType)
this._tupleVariantType = new GLib.VariantType('(v)');
return this._tupleVariantType;
}
static destroy() {
delete this._tupleType;
}
_init(busName, objectPath, interfaceInfo, flags = Gio.DBusProxyFlags.NONE) {
if (interfaceInfo.signals.length)
Logger.warn('Avoid exposing signals to gjs!');
super._init({
gConnection: Gio.DBus.session,
gInterfaceName: interfaceInfo.name,
gInterfaceInfo: interfaceInfo,
gName: busName,
gObjectPath: objectPath,
gFlags: flags,
});
this._signalIds = [];
if (!(flags & Gio.DBusProxyFlags.DO_NOT_CONNECT_SIGNALS)) {
this._signalIds.push(this.connect('g-signal',
(_proxy, ...args) => this._onSignal(...args)));
}
this._signalIds.push(this.connect('notify::g-name-owner', () =>
this._onNameOwnerChanged()));
}
async initAsync(cancellable) {
cancellable = new CancellableChild(cancellable);
await this.init_async(GLib.PRIORITY_DEFAULT, cancellable);
this._cancellable = cancellable;
this.gInterfaceInfo.methods.map(m => m.name).forEach(method =>
this._ensureAsyncMethod(method));
}
destroy() {
this.emit('destroy');
this._signalIds.forEach(id => this.disconnect(id));
if (this._cancellable)
this._cancellable.cancel();
}
// This can be removed when we will have GNOME 43 as minimum version
_ensureAsyncMethod(method) {
if (this[`${method}Async`])
return;
if (!this[`${method}Remote`])
throw new Error(`Missing remote method '${method}'`);
this[`${method}Async`] = function (...args) {
return new Promise((resolve, reject) => {
this[`${method}Remote`](...args, (ret, e) => {
if (e)
reject(e);
else
resolve(ret);
});
});
};
}
_onSignal() {
}
getProperty(propertyName, cancellable) {
return this.gConnection.call(this.gName,
this.gObjectPath, 'org.freedesktop.DBus.Properties', 'Get',
GLib.Variant.new('(ss)', [this.gInterfaceName, propertyName]),
DBusProxy.TUPLE_VARIANT_TYPE, Gio.DBusCallFlags.NONE, -1,
cancellable);
}
getProperties(cancellable) {
return this.gConnection.call(this.gName,
this.gObjectPath, 'org.freedesktop.DBus.Properties', 'GetAll',
GLib.Variant.new('(s)', [this.gInterfaceName]),
GLib.VariantType.new('(a{sv})'), Gio.DBusCallFlags.NONE, -1,
cancellable);
}
});
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| interfaces-xml | Folder | 0755 |
|
|
| appIndicator.js | File | 54.43 KB | 0644 |
|
| dbusMenu.js | File | 32.2 KB | 0644 |
|
| dbusProxy.js | File | 3.12 KB | 0644 |
|
| extension.js | File | 3.53 KB | 0644 |
|
| iconCache.js | File | 5.61 KB | 0644 |
|
| indicatorStatusIcon.js | File | 19.96 KB | 0644 |
|
| interfaces.js | File | 2.26 KB | 0644 |
|
| metadata.json | File | 547 B | 0644 |
|
| pixmapsUtils.js | File | 2.59 KB | 0644 |
|
| prefs.js | File | 11.7 KB | 0644 |
|
| promiseUtils.js | File | 9.29 KB | 0644 |
|
| settingsManager.js | File | 1.61 KB | 0644 |
|
| statusNotifierWatcher.js | File | 10.45 KB | 0644 |
|
| trayIconsManager.js | File | 3.82 KB | 0644 |
|
| util.js | File | 13.76 KB | 0644 |
|