/
shellAppStore.js
46 lines (40 loc) · 1.33 KB
/
shellAppStore.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const Gio = imports.gi.Gio;
const Lang = imports.lang;
const AppStoreIface = '<node>' +
'<interface name="org.gnome.Shell.AppStore">' +
'<method name="AddApplication">' +
'<arg type="s" direction="in" name="id"/>' +
'</method>' +
'<method name="RemoveApplication">' +
'<arg type="s" direction="in" name="id"/>' +
'</method>' +
'<method name="ListApplications">' +
'<arg type="as" direction="out" name="applications"/>' +
'</method>' +
'<method name="AddFolder">' +
'<arg type="s" direction="in" name="id"/>' +
'</method>' +
'<method name="RemoveFolder">' +
'<arg type="s" direction="in" name="id"/>' +
'</method>' +
'<method name="ResetDesktop"></method>' +
'<signal name="ApplicationsChanged">' +
'<arg type="as" name="applications"/>' +
'</signal>' +
'</interface>' +
'</node>';
const SHELL_APP_STORE_NAME = 'org.gnome.Shell';
const SHELL_APP_STORE_PATH = '/org/gnome/Shell';
const SHELL_APP_STORE_IFACE = 'org.gnome.Shell.AppStore';
const ShellAppStoreProxy = Gio.DBusProxy.makeProxyWrapper(AppStoreIface);
var ShellAppStore = new Lang.Class({
Name: 'ShellAppStore',
_init: function() {
this.proxy = new ShellAppStoreProxy(Gio.DBus.session,
SHELL_APP_STORE_NAME, SHELL_APP_STORE_PATH,
Lang.bind(this, this._onProxyConstructed));
},
_onProxyConstructed: function() {
// do nothing
}
});