chrome 100 percent

chrome 100 percent


DisciplinaPedagogia116.669 materiais672.644 seguidores
Pré-visualização50 páginas
{
 var exports = {};
 var SinkIconType = {};
 SinkIconType.CAST = 0;
 SinkIconType.CAST_AUDIO_GROUP = SinkIconType.CAST + 1;
 SinkIconType.CAST_AUDIO = SinkIconType.CAST_AUDIO_GROUP + 1;
 SinkIconType.MEETING = SinkIconType.CAST_AUDIO + 1;
 SinkIconType.HANGOUT = SinkIconType.MEETING + 1;
 SinkIconType.EDUCATION = SinkIconType.HANGOUT + 1;
 SinkIconType.GENERIC = SinkIconType.EDUCATION + 1;
 SinkIconType.isKnownEnumValue = function(value) {
 switch (value) {
 case 0:
 case 1:
 case 2:
 case 3:
 case 4:
 case 5:
 case 6:
 return true;
 }
 return false;
 };
 SinkIconType.validate = function(enumValue) {
 var isExtensible = false;
 if (isExtensible || this.isKnownEnumValue(enumValue))
 return validator.validationError.NONE;
 return validator.validationError.UNKNOWN_ENUM_VALUE;
 };
 var RouteControllerType = {};
 RouteControllerType.kNone = 0;
 RouteControllerType.kGeneric = RouteControllerType.kNone + 1;
 RouteControllerType.kHangouts = RouteControllerType.kGeneric + 1;
 RouteControllerType.isKnownEnumValue = function(value) {
 switch (value) {
 case 0:
 case 1:
 case 2:
 return true;
 }
 return false;
 };
 RouteControllerType.validate = function(enumValue) {
 var isExtensible = false;
 if (isExtensible || this.isKnownEnumValue(enumValue))
 return validator.validationError.NONE;
 return validator.validationError.UNKNOWN_ENUM_VALUE;
 };
 var RouteRequestResultCode = {};
 RouteRequestResultCode.UNKNOWN_ERROR = 0;
 RouteRequestResultCode.OK = RouteRequestResultCode.UNKNOWN_ERROR + 1;
 RouteRequestResultCode.TIMED_OUT = RouteRequestResultCode.OK + 1;
 RouteRequestResultCode.ROUTE_NOT_FOUND = RouteRequestResultCode.TIMED_OUT + 1;
 RouteRequestResultCode.SINK_NOT_FOUND = RouteRequestResultCode.ROUTE_NOT_FOUND + 1;
 RouteRequestResultCode.INVALID_ORIGIN = RouteRequestResultCode.SINK_NOT_FOUND + 1;
 RouteRequestResultCode.INCOGNITO_MISMATCH = RouteRequestResultCode.INVALID_ORIGIN + 1;
 RouteRequestResultCode.NO_SUPPORTED_PROVIDER = RouteRequestResultCode.INCOGNITO_MISMATCH + 1;
 RouteRequestResultCode.CANCELLED = RouteRequestResultCode.NO_SUPPORTED_PROVIDER + 1;
 RouteRequestResultCode.isKnownEnumValue = function(value) {
 switch (value) {
 case 0:
 case 1:
 case 2:
 case 3:
 case 4:
 case 5:
 case 6:
 case 7:
 case 8:
 return true;
 }
 return false;
 };
 RouteRequestResultCode.validate = function(enumValue) {
 var isExtensible = false;
 if (isExtensible || this.isKnownEnumValue(enumValue))
 return validator.validationError.NONE;
 return validator.validationError.UNKNOWN_ENUM_VALUE;
 };
 function MediaSink(values) {
 this.initDefaults_();
 this.initFields_(values);
 }
 MediaSink.prototype.initDefaults_ = function() {
 this.sink_id = null;
 this.name = null;
 this.description = null;
 this.domain = null;
 this.icon_type = 0;
 this.extra_data = null;
 };
 MediaSink.prototype.initFields_ = function(fields) {
 for(var field in fields) {
 if (this.hasOwnProperty(field))
 this[field] = fields[field];
 }
 };
 MediaSink.validate = function(messageValidator, offset) {
 var err;
 err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
 if (err !== validator.validationError.NONE)
 return err;
 var kVersionSizes = [
 {version: 0, numBytes: 64}
 ];
 err = messageValidator.validateStructVersion(offset, kVersionSizes);
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaSink.sink_id
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 0, false)
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaSink.name
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false)
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaSink.description
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 16, true)
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaSink.domain
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 24, true)
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaSink.icon_type
 err = messageValidator.validateEnum(offset + codec.kStructHeaderSize + 32, SinkIconType);
 if (err !== validator.validationError.NONE)
 return err;
 // validate MediaSink.extra_data
 err = messageValidator.validateUnion(offset + codec.kStructHeaderSize + 40, MediaSinkExtraData, true);
 if (err !== validator.validationError.NONE)
 return err;
 return validator.validationError.NONE;
 };
 MediaSink.encodedSize = codec.kStructHeaderSize + 56;
 MediaSink.decode = function(decoder) {
 var packed;
 var val = new MediaSink();
 var numberOfBytes = decoder.readUint32();
 var version = decoder.readUint32();
 val.sink_id = decoder.decodeStruct(codec.String);
 val.name = decoder.decodeStruct(codec.String);
 val.description = decoder.decodeStruct(codec.NullableString);
 val.domain = decoder.decodeStruct(codec.NullableString);
 val.icon_type = decoder.decodeStruct(codec.Int32);
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 decoder.skip(1);
 val.extra_data = decoder.decodeStruct(MediaSinkExtraData);
 return val;
 };
 MediaSink.encode = function(encoder, val) {
 var packed;
 encoder.writeUint32(MediaSink.encodedSize);
 encoder.writeUint32(0);
 encoder.encodeStruct(codec.String, val.sink_id);
 encoder.encodeStruct(codec.String, val.name);
 encoder.encodeStruct(codec.NullableString, val.description);
 encoder.encodeStruct(codec.NullableString, val.domain);
 encoder.encodeStruct(codec.Int32, val.icon_type);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 encoder.skip(1);
 encoder.encodeStruct(MediaSinkExtraData, val.extra_data);
 };
 function DialMediaSink(values) {
 this.initDefaults_();
 this.initFields_(values);
 }
 DialMediaSink.prototype.initDefaults_ = function() {
 this.ip_address = null;
 this.model_name = null;
 this.app_url = null;
 };
 DialMediaSink.prototype.initFields_ = function(fields) {
 for(var field in fields) {
 if (this.hasOwnProperty(field))
 this[field] = fields[field];
 }
 };
 DialMediaSink.validate = function(messageValidator, offset) {
 var err;
 err = messageValidator.validateStructHeader(offset, codec.kStructHeaderSize);
 if (err !== validator.validationError.NONE)
 return err;
 var kVersionSizes = [
 {version: 0, numBytes: 32}
 ];
 err = messageValidator.validateStructVersion(offset, kVersionSizes);
 if (err !== validator.validationError.NONE)
 return err;
 // validate DialMediaSink.ip_address
 err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 0, ip_address$.IPAddress, false);
 if (err !== validator.validationError.NONE)
 return err;
 // validate DialMediaSink.model_name
 err = messageValidator.validateStringPointer(offset + codec.kStructHeaderSize + 8, false)
 if (err !== validator.validationError.NONE)
 return err;
 // validate DialMediaSink.app_url
 err = messageValidator.validateStructPointer(offset + codec.kStructHeaderSize + 16, url$.Url, false);
 if (err !== validator.validationError.NONE)
 return err;
 return validator.validationError.NONE;
 };
 DialMediaSink.encodedSize = codec.kStructHeaderSize + 24;
 DialMediaSink.decode = function(decoder) {
 var