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