/* 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 ComplexType = require('kurento-client-core').complexTypes.ComplexType;
/**
* The ICE candidate pair used by the ICE library, for a certain stream.
*
* @constructor module:elements/complexTypes.IceCandidatePair
*
* @property {external:String} streamId
* Stream ID of the ICE connection
* @property {external:Integer} componentId
* Component ID of the ICE connection
* @property {external:String} localCandidate
* The local candidate used by the ICE library.
* @property {external:String} remoteCandidate
* The remote candidate used by the ICE library.
*/
function IceCandidatePair(iceCandidatePairDict){
if(!(this instanceof IceCandidatePair))
return new IceCandidatePair(iceCandidatePairDict)
iceCandidatePairDict = iceCandidatePairDict || {}
// Check iceCandidatePairDict has the required fields
//
// checkType('String', 'iceCandidatePairDict.streamId', iceCandidatePairDict.streamId, {required: true});
//
// checkType('int', 'iceCandidatePairDict.componentId', iceCandidatePairDict.componentId, {required: true});
//
// checkType('String', 'iceCandidatePairDict.localCandidate', iceCandidatePairDict.localCandidate, {required: true});
//
// checkType('String', 'iceCandidatePairDict.remoteCandidate', iceCandidatePairDict.remoteCandidate, {required: true});
//
// Init parent class
IceCandidatePair.super_.call(this, iceCandidatePairDict)
// Set object properties
Object.defineProperties(this, {
streamId: {
writable: true,
enumerable: true,
value: iceCandidatePairDict.streamId
},
componentId: {
writable: true,
enumerable: true,
value: iceCandidatePairDict.componentId
},
localCandidate: {
writable: true,
enumerable: true,
value: iceCandidatePairDict.localCandidate
},
remoteCandidate: {
writable: true,
enumerable: true,
value: iceCandidatePairDict.remoteCandidate
}
})
}
inherits(IceCandidatePair, ComplexType)
// 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(IceCandidatePair.prototype, {
__module__: {
enumerable: true,
value: "kurento"
},
__type__: {
enumerable: true,
value: "IceCandidatePair"
}
})
/**
* Checker for {@link module:elements/complexTypes.IceCandidatePair}
*
* @memberof module:elements/complexTypes
*
* @param {external:String} key
* @param {module:elements/complexTypes.IceCandidatePair} value
*/
function checkIceCandidatePair(key, value)
{
if(!(value instanceof IceCandidatePair))
throw ChecktypeError(key, IceCandidatePair, value);
};
module.exports = IceCandidatePair;
IceCandidatePair.check = checkIceCandidatePair;