chrome 100 percent

chrome 100 percent


DisciplinaPedagogia116.368 materiais670.392 seguidores
Pré-visualização50 páginas
this[field] = fields[field];
 }
 };
 SinkSearchCriteria.validate = function(messageValidator, offset) {
 var err;
 err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
 if (err !== validator.validationError.NONE)
 return err;
 var kVersionSizes = [
 {version: 0, numBytes: 24}
 ];
 err = messageValidator.validateStructVersion(offset, kVersionSizes);
 if (err !== validator.validationError.NONE)
 return err;
 // validate SinkSearchCriteria.input
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
 if (err !== validator.validationError.NONE)
 return err;
 // validate SinkSearchCriteria.domain
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false)
 if (err !== validator.validationError.NONE)
 return err;
 return validator.validationError.NONE;
 };
 SinkSearchCriteria.encodedSize = codec.kStructHeaderSize + 16;
 SinkSearchCriteria.decode = function(decoder) {
 var packed;
 var val = new SinkSearchCriteria();
 var numberOfBytes = decoder.readUint32();
 var version = decoder.readUint32();
 val.input = decoder.decodeStruct(codec.String);
 val.domain = decoder.decodeStruct(codec.String);
 return val;
 };
 SinkSearchCriteria.encode = function(encoder, val) {
 var packed;
 encoder.writeUint32(SinkSearchCriteria.encodedSize);
 encoder.writeUint32(0);
 encoder.encodeStruct(codec.String, val.input);
 encoder.encodeStruct(codec.String, val.domain);
 };
 function MediaRouteProviderConfig(values) {
 this.initDefaults_();
 this.initFields_(values);
 }
 MediaRouteProviderConfig.prototype.initDefaults_ = function() {
 this.enable_dial_discovery = false;
 this.enable_cast_discovery = false;
 };
 MediaRouteProviderConfig.prototype.initFields_ = function(fields) {
 for(var field in fields) {
 if (this.hasOwnProperty(field))
 this[field] = fields[field];
 }
 };
 MediaRouteProviderConfig.validate = function(messageValidator, offset) {
 var err;
 err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
 if (err !== validator.validationError.NONE)
 return err;
 var kVersionSizes = [
 {version: 0, numBytes: 16}
 ];
 err = messageValidator.validateStructVersion(offset, kVersionSizes);
 if (err !== validator.validationError.NONE)
 return err;
 return validator.validationError.NONE;
 };
 MediaRouteProviderConfig.encodedSize = codec.kStructHeaderSize + 8;
 MediaRouteProviderConfig.decode = function(decoder) {
 var packed;
 var val = new MediaRouteProviderConfig();
 var numberOfBytes = decoder.readUint32();
 var version = decoder.readUint32();
 packed = decoder.readUint8();
 val.enable_dial_discovery = (packed >> 0) & 1 ? true : false;
 val.enable_cast_discovery = (packed >> 1) & 1 ? true : false;
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 return val;
 };
 MediaRouteProviderConfig.encode = function(encoder, val) {
 var packed;
 encoder.writeUint32(MediaRouteProviderConfig.encodedSize);
 encoder.writeUint32(0);
 packed = 0;
 packed |= (val.enable_dial_discovery & 1) << 0
 packed |= (val.enable_cast_discovery & 1) << 1
 encoder.writeUint8(packed);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 };
 function MediaRouteProvider_CreateRoute_Params(values) {
 this.initDefaults_();
 this.initFields_(values);
 }
 MediaRouteProvider_CreateRoute_Params.prototype.initDefaults_ = function() {
 this.media_source = null;
 this.sink_id = null;
 this.original_presentation_id = null;
 this.origin = null;
 this.tab_id = 0;
 this.incognito = false;
 this.timeout = null;
 };
 MediaRouteProvider_CreateRoute_Params.prototype.initFields_ = function(fields) {
 for(var field in fields) {
 if (this.hasOwnProperty(field))
 this[field] = fields[field];
 }
 };
 MediaRouteProvider_CreateRoute_Params.validate = function(messageValidator, offset) {
 var err;
 err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
 if (err !== validator.validationError.NONE)
 return err;
 var kVersionSizes = [
 {version: 0, numBytes: 56}
 ];
 err = messageValidator.validateStructVersion(offset, kVersionSizes);
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaRouteProvider_CreateRoute_Params.media_source
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaRouteProvider_CreateRoute_Params.sink_id
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false)
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaRouteProvider_CreateRoute_Params.original_presentation_id
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, false)
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaRouteProvider_CreateRoute_Params.origin
 err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 24, origin$.Origin, false);
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaRouteProvider_CreateRoute_Params.timeout
 err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 40, time$.TimeDelta, false);
 if (err !== validator.validationError.NONE)
 return err;
 return validator.validationError.NONE;
 };
 MediaRouteProvider_CreateRoute_Params.encodedSize = codec.kStructHeaderSize + 48;
 MediaRouteProvider_CreateRoute_Params.decode = function(decoder) {
 var packed;
 var val = new MediaRouteProvider_CreateRoute_Params();
 var numberOfBytes = decoder.readUint32();
 var version = decoder.readUint32();
 val.media_source = decoder.decodeStruct(codec.String);
 val.sink_id = decoder.decodeStruct(codec.String);
 val.original_presentation_id = decoder.decodeStruct(codec.String);
 val.origin = decoder.decodeStructPointer(origin$.Origin);
 val.tab_id = decoder.decodeStruct(codec.Int32);
 packed = decoder.readUint8();
 val.incognito = (packed >> 0) & 1 ? true : false;
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 val.timeout = decoder.decodeStructPointer(time$.TimeDelta);
 return val;
 };
 MediaRouteProvider_CreateRoute_Params.encode = function(encoder, val) {
 var packed;
 encoder.writeUint32(MediaRouteProvider_CreateRoute_Params.encodedSize);
 encoder.writeUint32(0);
 encoder.encodeStruct(codec.String, val.media_source);
 encoder.encodeStruct(codec.String, val.sink_id);
 encoder.encodeStruct(codec.String, val.original_presentation_id);
 encoder.encodeStructPointer(origin$.Origin, val.origin);
 encoder.encodeStruct(codec.Int32, val.tab_id);
 packed = 0;
 packed |= (val.incognito & 1) << 0
 encoder.writeUint8(packed);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 encoder.encodeStructPointer(time$.TimeDelta, val.timeout);
 };
 function MediaRouteProvider_CreateRoute_ResponseParams(values) {
 this.initDefaults_();
 this.initFields_(values);
 }
 MediaRouteProvider_CreateRoute_ResponseParams.prototype.initDefaults_ = function() {
 this.route = null;
 this.error_text = null;
 this.result_code = 0;
 };
 MediaRouteProvider_CreateRoute_ResponseParams.prototype.initFields_