2014-10-20 08:21:23 +00:00
|
|
|
;(function() {
|
2015-05-11 21:59:22 +00:00
|
|
|
'use strict';
|
|
|
|
window.textsecure = window.textsecure || {};
|
|
|
|
window.textsecure.protobuf = {};
|
2014-10-20 08:21:23 +00:00
|
|
|
|
|
|
|
function loadProtoBufs(filename) {
|
2017-03-08 00:54:46 +00:00
|
|
|
return dcodeIO.ProtoBuf.loadProtoFile({root: 'protos', file: filename}, function(error, result) {
|
2017-05-16 23:17:25 +00:00
|
|
|
if (error) {
|
|
|
|
throw error;
|
|
|
|
}
|
2015-05-11 21:59:22 +00:00
|
|
|
var protos = result.build('textsecure');
|
|
|
|
for (var protoName in protos) {
|
|
|
|
textsecure.protobuf[protoName] = protos[protoName];
|
|
|
|
}
|
|
|
|
});
|
2014-10-20 08:21:23 +00:00
|
|
|
};
|
|
|
|
|
2015-05-11 21:59:22 +00:00
|
|
|
loadProtoBufs('IncomingPushMessageSignal.proto');
|
|
|
|
loadProtoBufs('SubProtocol.proto');
|
|
|
|
loadProtoBufs('DeviceMessages.proto');
|
2014-10-20 08:21:23 +00:00
|
|
|
})();
|