//////////////////////////////////////////////////////////////////////////////////
//  File:         featurset.js
//  Descruption:  This file contains feature set information. it should contain
//                the same set of information as FeatureSet.java. It gets its
//                values through the StatusFeatureSet API handler in 
//                StatusFeatureSet.java
//  Created By:   Jonathan J. Smith (jonathan.smith@polycom.com)
//////////////////////////////////////////////////////////////////////////////////

function getDocCameraID () {return ((Is3000Family () || isV700 || Is5000Family () || Is6000Family ()) ? -1 : 2)}
function getVCRCameraID () {return (Is3000Family () || isV700 || Is5000Family () || Is6000Family ()) ? 2 : 3}
function getAUXCameraID () {return (Is3000Family () || isV700 || Is5000Family () || Is6000Family ()) ? -1 : 4}
function getAUX2CameraID () {return (Is3000Family () || isV700 || Is5000Family () || Is6000Family ()) ? -1 : 5}
function getMaxNoOfCameras ()
{
  if (isV500 || isV400 || isV700) return 1
  if (is3000 || is5000) return 2
  if (Is6000Family () || isTruman) return 4
  if (isRoosevelt) return 5
  else return 3
}
function IsSimH323SIPSupported () { return (is8000 || is7000e || is7000S || is7000A || is8000A || is6000A || is5000 || is3000A || isV700) }
function IsFIPSSupported () {return !(is7000 || is3000 || isV500 || isV400 || isV700 || is6000)}
function getNumSerialPorts ()
{
  if (is8000A) return 3
  else if (is8000 || isRoosevelt || isGuadalupe) return 2
  else if (Is5000Family () || Is6000Family () || Is7000Family () || isTruman) return 1
  else if (isTahoe || isV400 || isReno || isV700) return 0
  return 0
}


function IsTelephony () {return !(Is3000Family() || isV500 || isV400 || isV700)}

// Camera 1 is ether always PTZ or never PTX
function isCamera1PTZCapable ()
{
  return !(Is3000Family () || isV500 || isV400 || isV700)
}
function isVCROutputAvailable () {return Is8000Family () || is7000S || isNG}
function isSingleMonitorVGACapable () {return IsCharlesFamily () || Is8000Family () || is5000 || isNG}
function isSubwooferCapable () {return Is7000Family () || is5000}
function isVGAOutputConfigurable () {return is8000 || is7000e || is7000S || is6000A || is5000 || isNG}
function needToMonitorVisualConcertAudioInputOption () {return Is8000Family () || isRoosevelt}
function isPOTSCapable () {return Is8000Family () || isNG}
function isSystemEmbeddedVisualConcertCapable () {return Is8000Family () || isRoosevelt}
function isConferenceLinkCapable () {return !(isV500 || isV400 || isV700 || Is3000Family() || isNG)}
function IsContentSupported ()
{
  return isConferenceLinkCapable () || isSystemEmbeddedVisualConcertCapable ()
}
function isUsingFixedCamera () {return isV500 || isV400 || isV700 || Is3000Family() || is5000}
function isMultiPointCapable () {return !(isV500 || isV400 || isV700 || is5000 || Is6000Family())}
function getMaxConference () {return 1}

// These functions are not static and must be in a html or ssi file
//function getMaxEndpointsPerConference () {return }
//function getMaxVideoEndpointsPerConference () {return }
//function getMaxAudioEndpointsPerConference () {return }

function isStereoCapable () {return !(isV500 || isV400 || isV700)}
function isPathNavigatorCapable () {return true}
function isOuputSpeakerCapable () {return !(isV500 || isV400 || isV700 || Is3000Family () || is5000 || is6000)}
function getMaxSpeed () {return (isV400 ? 384 :(isV500 || isV700 || is5000 || is6000 || is6000A) ? 768 : 1920)}
function isCameraTrackingCapable () {return Is8000Family () || isNG}
function getEchoCancellerFieldName ()//V400 & V500 doesn't support Stereo 
{
  if (is7000S || is7000e) return "lineinechocanceller"
  if (is8000 || isNG) return "echocanceller"
  else return "lineinredechocanceller"
}
function hasMidRangeSpeakers () {return is6000 || is7000 || is7000S}
function shouldSecondMonitorRequireOptionKey () {return is5000 || is6000A}
function isOptionKeyRequiredForPPCIP () {return !(is8000 || is8000A || isNG)}
function hasOrionCamera () {return is5000}
function isWeathermanCapable () {return isG3}

// These functions are not used on the embedded side
function HasSerialPort (){return (getNumSerialPorts() > 0)}
function IsEnternalMP () {return (isMultiPointCapable () && g_IsEnternalMP)}
function IsMP () {return (g_IsPNAvail || IsEnternalMP ())}
function NeedsMPKey () {return isMultiPointCapable ()}
function IsStreamingCapable () {return !isV500 && !isV400 && !isG3}
// Feature variables
function HasVOC () {return !isMarley}
function HasInternalRinger () {return (isV500 || isV400 || isV700 || is3000)}
function SupportsPolcyomMics () {return (!isV500 && !isV400 && !isV700 && !is3000)}

function MaxMonitors ()
{
  if (isReno || isTahoe || isV400 || isV700) return 1
  if (isTruman) return 3
  if (isRoosevelt) return 4
  else return 2
}
function Is2ndMonCapable () {return (!isReno && !isTahoe && !isV400 && !isV700)}
function IsPCVGACapable () {return (!isTahoe && !isReno && !isV400 && !isV700)}
function IsStereoCapable () {return !isTahoe && !isV400}
function NeedsPCVGAKey () {return (IsPCVGACapable () && (isSabreMinusC || isCharlesMinusC || isGuadalupe))}

function IsProMotionCapable () {return (!isMarley && !Is6000Family ())}
function IsMon1Configurable () {return !isReno && !isV700}
function IsMon1SourceConfigurable () {return IsMon1Configurable() && !is6000 && !isTahoe && !is7000 && !isV400}
function IsSecondInputCapable () {return !isTahoe && !isV400 && !isV700}
function IsDigitCamera () {return (isReno || isTahoe || isMarley || isV400 || isV700)}

function DoWeYahoo() {return false}
function AreCamerasConfigurable () {return  !isTahoe && !isV400 && !isV700}
function GetMaxCallsSupported ()
{
  if (isRoosevelt) return 7
  else if (isMultiPointCapable ()) return 3
  else return 1
}
function GetMaxLineRateSupported ()
{
  if (isRoosevelt) return 6
  else if (isTruman) return 4
  else return 2
}

