Cable-Desktop/libtextsecure/protobufs.js

24 lines
1.1 KiB
JavaScript
Raw Normal View History

;(function() {
function loadProtoBufs(filename) {
return dcodeIO.ProtoBuf.loadProtoFile({root: '/protos', file: filename}).build('textsecure');
};
var pushMessages = loadProtoBufs('IncomingPushMessageSignal.proto');
2014-11-15 02:48:57 +01:00
var subProtocolMessages = loadProtoBufs('SubProtocol.proto');
var deviceMessages = loadProtoBufs('DeviceMessages.proto');
window.textsecure = window.textsecure || {};
window.textsecure.protobuf = {
IncomingPushMessageSignal : pushMessages.IncomingPushMessageSignal,
PushMessageContent : pushMessages.PushMessageContent,
2015-01-19 21:23:25 +01:00
ProvisioningUuid : deviceMessages.ProvisioningUuid,
2015-01-23 22:19:29 +01:00
ProvisionEnvelope : deviceMessages.ProvisionEnvelope,
ProvisionMessage : deviceMessages.ProvisionMessage,
2014-11-15 02:48:57 +01:00
DeviceControl : deviceMessages.DeviceControl,
WebSocketResponseMessage : subProtocolMessages.WebSocketResponseMessage,
WebSocketRequestMessage : subProtocolMessages.WebSocketRequestMessage,
WebSocketMessage : subProtocolMessages.WebSocketMessage
};
})();