telepathy: makeProxyClass has been migrated to gjs's dbus module
https://bugzilla.gnome.org/show_bug.cgi?id=633490
This commit is contained in:
parent
9585c823d5
commit
0155226c73
@ -2,20 +2,7 @@
|
|||||||
|
|
||||||
const DBus = imports.dbus;
|
const DBus = imports.dbus;
|
||||||
|
|
||||||
// D-Bus utils; should eventually move to gjs.
|
// D-Bus utils
|
||||||
// https://bugzilla.gnome.org/show_bug.cgi?id=610859
|
|
||||||
|
|
||||||
function makeProxyClass(iface) {
|
|
||||||
let constructor = function() { this._init.apply(this, arguments); };
|
|
||||||
|
|
||||||
constructor.prototype._init = function(bus, name, path) {
|
|
||||||
bus.proxifyObject(this, name, path);
|
|
||||||
};
|
|
||||||
|
|
||||||
DBus.proxifyPrototype(constructor.prototype, iface);
|
|
||||||
return constructor;
|
|
||||||
}
|
|
||||||
|
|
||||||
function nameToPath(name) {
|
function nameToPath(name) {
|
||||||
return '/' + name.replace(/\./g, '/');
|
return '/' + name.replace(/\./g, '/');
|
||||||
};
|
};
|
||||||
@ -118,7 +105,7 @@ const ChannelDispatchOperationIface = {
|
|||||||
outSignature: '' }
|
outSignature: '' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ChannelDispatchOperation = makeProxyClass(ChannelDispatchOperationIface);
|
let ChannelDispatchOperation = DBus.makeProxyClass(ChannelDispatchOperationIface);
|
||||||
|
|
||||||
const CONNECTION_NAME = TELEPATHY + '.Connection';
|
const CONNECTION_NAME = TELEPATHY + '.Connection';
|
||||||
const ConnectionIface = {
|
const ConnectionIface = {
|
||||||
@ -128,7 +115,7 @@ const ConnectionIface = {
|
|||||||
inSignature: 'uu' }
|
inSignature: 'uu' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let Connection = makeProxyClass(ConnectionIface);
|
let Connection = DBus.makeProxyClass(ConnectionIface);
|
||||||
|
|
||||||
const ConnectionStatus = {
|
const ConnectionStatus = {
|
||||||
CONNECTED: 0,
|
CONNECTED: 0,
|
||||||
@ -150,7 +137,7 @@ const ConnectionAliasingIface = {
|
|||||||
inSignature: 'a(us)' }
|
inSignature: 'a(us)' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ConnectionAliasing = makeProxyClass(ConnectionAliasingIface);
|
let ConnectionAliasing = DBus.makeProxyClass(ConnectionAliasingIface);
|
||||||
|
|
||||||
const CONNECTION_AVATARS_NAME = CONNECTION_NAME + '.Interface.Avatars';
|
const CONNECTION_AVATARS_NAME = CONNECTION_NAME + '.Interface.Avatars';
|
||||||
const ConnectionAvatarsIface = {
|
const ConnectionAvatarsIface = {
|
||||||
@ -174,7 +161,7 @@ const ConnectionAvatarsIface = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ConnectionAvatars = makeProxyClass(ConnectionAvatarsIface);
|
let ConnectionAvatars = DBus.makeProxyClass(ConnectionAvatarsIface);
|
||||||
|
|
||||||
const CONNECTION_CONTACTS_NAME = CONNECTION_NAME + '.Interface.Contacts';
|
const CONNECTION_CONTACTS_NAME = CONNECTION_NAME + '.Interface.Contacts';
|
||||||
const ConnectionContactsIface = {
|
const ConnectionContactsIface = {
|
||||||
@ -186,7 +173,7 @@ const ConnectionContactsIface = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ConnectionContacts = makeProxyClass(ConnectionContactsIface);
|
let ConnectionContacts = DBus.makeProxyClass(ConnectionContactsIface);
|
||||||
|
|
||||||
const CONNECTION_REQUESTS_NAME = CONNECTION_NAME + '.Interface.Requests';
|
const CONNECTION_REQUESTS_NAME = CONNECTION_NAME + '.Interface.Requests';
|
||||||
const ConnectionRequestsIface = {
|
const ConnectionRequestsIface = {
|
||||||
@ -215,7 +202,7 @@ const ConnectionRequestsIface = {
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ConnectionRequests = makeProxyClass(ConnectionRequestsIface);
|
let ConnectionRequests = DBus.makeProxyClass(ConnectionRequestsIface);
|
||||||
|
|
||||||
const CONNECTION_SIMPLE_PRESENCE_NAME = CONNECTION_NAME + '.Interface.SimplePresence';
|
const CONNECTION_SIMPLE_PRESENCE_NAME = CONNECTION_NAME + '.Interface.SimplePresence';
|
||||||
const ConnectionSimplePresenceIface = {
|
const ConnectionSimplePresenceIface = {
|
||||||
@ -234,7 +221,7 @@ const ConnectionSimplePresenceIface = {
|
|||||||
inSignature: 'a{u(uss)}' }
|
inSignature: 'a{u(uss)}' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ConnectionSimplePresence = makeProxyClass(ConnectionSimplePresenceIface);
|
let ConnectionSimplePresence = DBus.makeProxyClass(ConnectionSimplePresenceIface);
|
||||||
|
|
||||||
const ConnectionPresenceType = {
|
const ConnectionPresenceType = {
|
||||||
UNSET: 0,
|
UNSET: 0,
|
||||||
@ -264,7 +251,7 @@ const ChannelIface = {
|
|||||||
inSignature: '' }
|
inSignature: '' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let Channel = makeProxyClass(ChannelIface);
|
let Channel = DBus.makeProxyClass(ChannelIface);
|
||||||
|
|
||||||
const CHANNEL_TEXT_NAME = CHANNEL_NAME + '.Type.Text';
|
const CHANNEL_TEXT_NAME = CHANNEL_NAME + '.Type.Text';
|
||||||
const ChannelTextIface = {
|
const ChannelTextIface = {
|
||||||
@ -288,7 +275,7 @@ const ChannelTextIface = {
|
|||||||
inSignature: 'uuuuus' }
|
inSignature: 'uuuuus' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ChannelText = makeProxyClass(ChannelTextIface);
|
let ChannelText = DBus.makeProxyClass(ChannelTextIface);
|
||||||
|
|
||||||
const ChannelTextMessageType = {
|
const ChannelTextMessageType = {
|
||||||
NORMAL: 0,
|
NORMAL: 0,
|
||||||
@ -315,7 +302,7 @@ const ChannelGroupIface = {
|
|||||||
inSignature: 'sauauauauuu' }
|
inSignature: 'sauauauauuu' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ChannelGroup = makeProxyClass(ChannelGroupIface);
|
let ChannelGroup = DBus.makeProxyClass(ChannelGroupIface);
|
||||||
|
|
||||||
const ACCOUNT_MANAGER_NAME = TELEPATHY + '.AccountManager';
|
const ACCOUNT_MANAGER_NAME = TELEPATHY + '.AccountManager';
|
||||||
const AccountManagerIface = {
|
const AccountManagerIface = {
|
||||||
@ -330,7 +317,7 @@ const AccountManagerIface = {
|
|||||||
inSignature: 'ob' }
|
inSignature: 'ob' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let AccountManager = makeProxyClass(AccountManagerIface);
|
let AccountManager = DBus.makeProxyClass(AccountManagerIface);
|
||||||
|
|
||||||
const ACCOUNT_NAME = TELEPATHY + '.Account';
|
const ACCOUNT_NAME = TELEPATHY + '.Account';
|
||||||
const AccountIface = {
|
const AccountIface = {
|
||||||
@ -341,7 +328,7 @@ const AccountIface = {
|
|||||||
access: 'read' }
|
access: 'read' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let Account = makeProxyClass(AccountIface);
|
let Account = DBus.makeProxyClass(AccountIface);
|
||||||
|
|
||||||
const CHANNEL_DISPATCHER_NAME = TELEPATHY + '.ChannelDispatcher';
|
const CHANNEL_DISPATCHER_NAME = TELEPATHY + '.ChannelDispatcher';
|
||||||
const ChannelDispatcherIface = {
|
const ChannelDispatcherIface = {
|
||||||
@ -352,7 +339,7 @@ const ChannelDispatcherIface = {
|
|||||||
outSignature: 'o' }
|
outSignature: 'o' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ChannelDispatcher = makeProxyClass(ChannelDispatcherIface);
|
let ChannelDispatcher = DBus.makeProxyClass(ChannelDispatcherIface);
|
||||||
|
|
||||||
const CHANNEL_REQUEST_NAME = TELEPATHY + '.ChannelRequest';
|
const CHANNEL_REQUEST_NAME = TELEPATHY + '.ChannelRequest';
|
||||||
const ChannelRequestIface = {
|
const ChannelRequestIface = {
|
||||||
@ -369,4 +356,4 @@ const ChannelRequestIface = {
|
|||||||
signature: '' }
|
signature: '' }
|
||||||
]
|
]
|
||||||
};
|
};
|
||||||
let ChannelRequest = makeProxyClass(ChannelRequestIface);
|
let ChannelRequest = DBus.makeProxyClass(ChannelRequestIface);
|
||||||
|
Loading…
Reference in New Issue
Block a user