/* Autogenerated with Kurento Idl */
/*
* (C) Copyright 2013-2015 Kurento (https://kurento.openvidu.io/)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
var inherits = require('inherits');
var kurentoClient = require('kurento-client');
var checkType = kurentoClient.checkType;
var ChecktypeError = checkType.ChecktypeError;
var RTCStats = require('./RTCStats');
/**
*
* @constructor module:core/complexTypes.RTCIceCandidateAttributes
*
* @property {external:String} ipAddress
* It is the IP address of the candidate, allowing for IPv4 addresses, IPv6
* addresses, and fully qualified domain names (FQDNs).
* @property {external:int64} portNumber
* It is the port number of the candidate.
* @property {external:String} transport
* Valid values for transport is one of udp and tcp. Based on the 'transport'
* defined in [RFC5245] section 15.1.
* @property {module:core/complexTypes.RTCStatsIceCandidateType} candidateType
* The enumeration RTCStatsIceCandidateType is based on the cand-type defined
* in [RFC5245] section 15.1.
* @property {external:int64} priority
* Represents the priority of the candidate
* @property {external:String} addressSourceUrl
* The URL of the TURN or STUN server indicated in the RTCIceServers that
* translated this IP address.
* @extends module:core.RTCStats
*/
function RTCIceCandidateAttributes(rTCIceCandidateAttributesDict){
if(!(this instanceof RTCIceCandidateAttributes))
return new RTCIceCandidateAttributes(rTCIceCandidateAttributesDict)
rTCIceCandidateAttributesDict = rTCIceCandidateAttributesDict || {}
// Check rTCIceCandidateAttributesDict has the required fields
//
// checkType('String', 'rTCIceCandidateAttributesDict.ipAddress', rTCIceCandidateAttributesDict.ipAddress, {required: true});
//
// checkType('int64', 'rTCIceCandidateAttributesDict.portNumber', rTCIceCandidateAttributesDict.portNumber, {required: true});
//
// checkType('String', 'rTCIceCandidateAttributesDict.transport', rTCIceCandidateAttributesDict.transport, {required: true});
//
// checkType('RTCStatsIceCandidateType', 'rTCIceCandidateAttributesDict.candidateType', rTCIceCandidateAttributesDict.candidateType, {required: true});
//
// checkType('int64', 'rTCIceCandidateAttributesDict.priority', rTCIceCandidateAttributesDict.priority, {required: true});
//
// checkType('String', 'rTCIceCandidateAttributesDict.addressSourceUrl', rTCIceCandidateAttributesDict.addressSourceUrl, {required: true});
//
// Init parent class
RTCIceCandidateAttributes.super_.call(this, rTCIceCandidateAttributesDict)
// Set object properties
Object.defineProperties(this, {
ipAddress: {
writable: true,
enumerable: true,
value: rTCIceCandidateAttributesDict.ipAddress
},
portNumber: {
writable: true,
enumerable: true,
value: rTCIceCandidateAttributesDict.portNumber
},
transport: {
writable: true,
enumerable: true,
value: rTCIceCandidateAttributesDict.transport
},
candidateType: {
writable: true,
enumerable: true,
value: rTCIceCandidateAttributesDict.candidateType
},
priority: {
writable: true,
enumerable: true,
value: rTCIceCandidateAttributesDict.priority
},
addressSourceUrl: {
writable: true,
enumerable: true,
value: rTCIceCandidateAttributesDict.addressSourceUrl
}
})
}
inherits(RTCIceCandidateAttributes, RTCStats)
// Private identifiers to allow re-construction of the complexType on the server
// They need to be enumerable so JSON.stringify() can access to them
Object.defineProperties(RTCIceCandidateAttributes.prototype, {
__module__: {
enumerable: true,
value: "kurento"
},
__type__: {
enumerable: true,
value: "RTCIceCandidateAttributes"
}
})
/**
* Checker for {@link module:core/complexTypes.RTCIceCandidateAttributes}
*
* @memberof module:core/complexTypes
*
* @param {external:String} key
* @param {module:core/complexTypes.RTCIceCandidateAttributes} value
*/
function checkRTCIceCandidateAttributes(key, value)
{
if(!(value instanceof RTCIceCandidateAttributes))
throw ChecktypeError(key, RTCIceCandidateAttributes, value);
};
module.exports = RTCIceCandidateAttributes;
RTCIceCandidateAttributes.check = checkRTCIceCandidateAttributes;