<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"> <style>
	.KEYW {color: #933;}
	.COMM {color: #bbb; font-style: italic;}
	.NUMB {color: #393;}
	.STRN {color: #393;}
	.REGX {color: #339;}
	.line {border-right: 1px dotted #666; color: #666; font-style: normal;}
	</style></head><body><pre><span class='line'>  1</span> <span class="COMM">/*
<span class='line'>  2</span>  * Copyright (C) 2014 Glyptodon LLC
<span class='line'>  3</span>  *
<span class='line'>  4</span>  * Permission is hereby granted, free of charge, to any person obtaining a copy
<span class='line'>  5</span>  * of this software and associated documentation files (the "Software"), to deal
<span class='line'>  6</span>  * in the Software without restriction, including without limitation the rights
<span class='line'>  7</span>  * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
<span class='line'>  8</span>  * copies of the Software, and to permit persons to whom the Software is
<span class='line'>  9</span>  * furnished to do so, subject to the following conditions:
<span class='line'> 10</span>  *
<span class='line'> 11</span>  * The above copyright notice and this permission notice shall be included in
<span class='line'> 12</span>  * all copies or substantial portions of the Software. 
<span class='line'> 13</span>  *
<span class='line'> 14</span>  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
<span class='line'> 15</span>  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
<span class='line'> 16</span>  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
<span class='line'> 17</span>  * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
<span class='line'> 18</span>  * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
<span class='line'> 19</span>  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
<span class='line'> 20</span>  * THE SOFTWARE. 
<span class='line'> 21</span>  */</span><span class="WHIT">
<span class='line'> 22</span> 
<span class='line'> 23</span> </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">Guacamole</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">Guacamole</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 24</span> 
<span class='line'> 25</span> </span><span class="COMM">/**
<span class='line'> 26</span>  * A Guacamole status.  Each Guacamole status consists of a status code, defined
<span class='line'> 27</span>  * by the protocol, and an optional human-readable message, usually only
<span class='line'> 28</span>  * included for debugging convenience. 
<span class='line'> 29</span>  * 
<span class='line'> 30</span>  * @param {Number} code The Guacamole status code, as defined by
<span class='line'> 31</span>  *                      Guacamole. Status. Code. 
<span class='line'> 32</span>  * @param {String} [message] An optional human-readable message. 
<span class='line'> 33</span>  */</span><span class="WHIT">
<span class='line'> 34</span> </span><span class="NAME">Guacamole. Status</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="NAME">code</span><span class="PUNC">,</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 35</span> 
<span class='line'> 36</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 37</span>      * Reference to this Guacamole. Status. 
<span class='line'> 38</span>      * @private
<span class='line'> 39</span>      */</span><span class="WHIT">
<span class='line'> 40</span> </span><span class="WHIT">    </span><span class="KEYW">var</span><span class="WHIT"> </span><span class="NAME">guac_status</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">this</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 41</span> 
<span class='line'> 42</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 43</span>      * The Guacamole status code. 
<span class='line'> 44</span>      * @see Guacamole. Status. Code
<span class='line'> 45</span>      * @type Number 
<span class='line'> 46</span>      */</span><span class="WHIT">
<span class='line'> 47</span> </span><span class="WHIT">    </span><span class="NAME">this.code</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">code</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 48</span> 
<span class='line'> 49</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 50</span>      * An arbitrary human-readable message associated with this status, if any. 
<span class='line'> 51</span>      * The human-readable message is not required, and is generally provided
<span class='line'> 52</span>      * for debugging purposes only.  For user feedback, it is better to translate
<span class='line'> 53</span>      * the Guacamole status code into a message. 
<span class='line'> 54</span>      * 
<span class='line'> 55</span>      * @type String
<span class='line'> 56</span>      */</span><span class="WHIT">
<span class='line'> 57</span> </span><span class="WHIT">    </span><span class="NAME">this.message</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="NAME">message</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 58</span> 
<span class='line'> 59</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 60</span>      * Returns whether this status represents an error. 
<span class='line'> 61</span>      * @returns {Boolean} true if this status represents an error, false
<span class='line'> 62</span>      *                    otherwise. 
<span class='line'> 63</span>      */</span><span class="WHIT">
<span class='line'> 64</span> </span><span class="WHIT">    </span><span class="NAME">this.isError</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="KEYW">function</span><span class="PUNC">(</span><span class="PUNC">)</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 65</span> </span><span class="WHIT">        </span><span class="KEYW">return</span><span class="WHIT"> </span><span class="NAME">guac_status.code</span><span class="WHIT"> </span><span class="PUNC">&lt;</span><span class="WHIT"> </span><span class="NUMB">0</span><span class="WHIT"> </span><span class="PUNC">||</span><span class="WHIT"> </span><span class="NAME">guac_status.code</span><span class="WHIT"> </span><span class="PUNC">></span><span class="WHIT"> </span><span class="NUMB">0x00FF</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 66</span> </span><span class="WHIT">    </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 67</span> 
<span class='line'> 68</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'> 69</span> 
<span class='line'> 70</span> </span><span class="COMM">/**
<span class='line'> 71</span>  * Enumeration of all Guacamole status codes. 
<span class='line'> 72</span>  */</span><span class="WHIT">
<span class='line'> 73</span> </span><span class="NAME">Guacamole. Status. Code</span><span class="WHIT"> </span><span class="PUNC">=</span><span class="WHIT"> </span><span class="PUNC">{</span><span class="WHIT">
<span class='line'> 74</span> 
<span class='line'> 75</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 76</span>      * The operation succeeded. 
<span class='line'> 77</span>      *
<span class='line'> 78</span>      * @type Number
<span class='line'> 79</span>      */</span><span class="WHIT">
<span class='line'> 80</span> </span><span class="WHIT">    </span><span class="STRN">"SUCCESS"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0000</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 81</span> 
<span class='line'> 82</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 83</span>      * The requested operation is unsupported. 
<span class='line'> 84</span>      *
<span class='line'> 85</span>      * @type Number
<span class='line'> 86</span>      */</span><span class="WHIT">
<span class='line'> 87</span> </span><span class="WHIT">    </span><span class="STRN">"UNSUPPORTED"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0100</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 88</span> 
<span class='line'> 89</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 90</span>      * The operation could not be performed due to an internal failure. 
<span class='line'> 91</span>      *
<span class='line'> 92</span>      * @type Number
<span class='line'> 93</span>      */</span><span class="WHIT">
<span class='line'> 94</span> </span><span class="WHIT">    </span><span class="STRN">"SERVER_ERROR"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0200</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'> 95</span> 
<span class='line'> 96</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'> 97</span>      * The operation could not be performed as the server is busy. 
<span class='line'> 98</span>      *
<span class='line'> 99</span>      * @type Number
<span class='line'>100</span>      */</span><span class="WHIT">
<span class='line'>101</span> </span><span class="WHIT">    </span><span class="STRN">"SERVER_BUSY"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0201</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>102</span> 
<span class='line'>103</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>104</span>      * The operation was unsuccessful due to an error or otherwise unexpected
<span class='line'>105</span>      * condition of the upstream server. 
<span class='line'>106</span>      *
<span class='line'>107</span>      * @type Number
<span class='line'>108</span>      */</span><span class="WHIT">
<span class='line'>109</span> </span><span class="WHIT">    </span><span class="STRN">"UPSTREAM_TIMEOUT"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0202</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>110</span> 
<span class='line'>111</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>112</span>      * The operation could not be performed because the upstream server is not
<span class='line'>113</span>      * responding. 
<span class='line'>114</span>      *
<span class='line'>115</span>      * @type Number
<span class='line'>116</span>      */</span><span class="WHIT">
<span class='line'>117</span> </span><span class="WHIT">    </span><span class="STRN">"UPSTREAM_ERROR"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0203</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>118</span> 
<span class='line'>119</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>120</span>      * The operation could not be performed as the requested resource does not
<span class='line'>121</span>      * exist. 
<span class='line'>122</span>      *
<span class='line'>123</span>      * @type Number
<span class='line'>124</span>      */</span><span class="WHIT">
<span class='line'>125</span> </span><span class="WHIT">    </span><span class="STRN">"RESOURCE_NOT_FOUND"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0204</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>126</span> 
<span class='line'>127</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>128</span>      * The operation could not be performed as the requested resource is
<span class='line'>129</span>      * already in use. 
<span class='line'>130</span>      *
<span class='line'>131</span>      * @type Number
<span class='line'>132</span>      */</span><span class="WHIT">
<span class='line'>133</span> </span><span class="WHIT">    </span><span class="STRN">"RESOURCE_CONFLICT"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0205</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>134</span> 
<span class='line'>135</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>136</span>      * The operation could not be performed because bad parameters were given. 
<span class='line'>137</span>      *
<span class='line'>138</span>      * @type Number
<span class='line'>139</span>      */</span><span class="WHIT">
<span class='line'>140</span> </span><span class="WHIT">    </span><span class="STRN">"CLIENT_BAD_REQUEST"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0300</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>141</span> 
<span class='line'>142</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>143</span>      * Permission was denied to perform the operation, as the user is not yet
<span class='line'>144</span>      * authorized (not yet logged in, for example). 
<span class='line'>145</span>      *
<span class='line'>146</span>      * @type Number
<span class='line'>147</span>      */</span><span class="WHIT">
<span class='line'>148</span> </span><span class="WHIT">    </span><span class="STRN">"CLIENT_UNAUTHORIZED"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0301</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>149</span> 
<span class='line'>150</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>151</span>      * Permission was denied to perform the operation, and this permission will
<span class='line'>152</span>      * not be granted even if the user is authorized. 
<span class='line'>153</span>      *
<span class='line'>154</span>      * @type Number
<span class='line'>155</span>      */</span><span class="WHIT">
<span class='line'>156</span> </span><span class="WHIT">    </span><span class="STRN">"CLIENT_FORBIDDEN"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0303</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>157</span> 
<span class='line'>158</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>159</span>      * The client took too long to respond. 
<span class='line'>160</span>      *
<span class='line'>161</span>      * @type Number
<span class='line'>162</span>      */</span><span class="WHIT">
<span class='line'>163</span> </span><span class="WHIT">    </span><span class="STRN">"CLIENT_TIMEOUT"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x0308</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>164</span> 
<span class='line'>165</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>166</span>      * The client sent too much data. 
<span class='line'>167</span>      *
<span class='line'>168</span>      * @type Number
<span class='line'>169</span>      */</span><span class="WHIT">
<span class='line'>170</span> </span><span class="WHIT">    </span><span class="STRN">"CLIENT_OVERRUN"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x030D</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>171</span> 
<span class='line'>172</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>173</span>      * The client sent data of an unsupported or unexpected type. 
<span class='line'>174</span>      *
<span class='line'>175</span>      * @type Number
<span class='line'>176</span>      */</span><span class="WHIT">
<span class='line'>177</span> </span><span class="WHIT">    </span><span class="STRN">"CLIENT_BAD_TYPE"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x030F</span><span class="PUNC">,</span><span class="WHIT">
<span class='line'>178</span> 
<span class='line'>179</span> </span><span class="WHIT">    </span><span class="COMM">/**
<span class='line'>180</span>      * The operation failed because the current client is already using too
<span class='line'>181</span>      * many resources. 
<span class='line'>182</span>      *
<span class='line'>183</span>      * @type Number
<span class='line'>184</span>      */</span><span class="WHIT">
<span class='line'>185</span> </span><span class="WHIT">    </span><span class="STRN">"CLIENT_TOO_MANY"</span><span class="PUNC">:</span><span class="WHIT"> </span><span class="NUMB">0x031D</span><span class="WHIT">
<span class='line'>186</span> 
<span class='line'>187</span> </span><span class="PUNC">}</span><span class="PUNC">;</span><span class="WHIT">
<span class='line'>188</span> </span></pre>
<!--  Google Analytics -->
<script type="text/javascript">
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', 'UA-75289145-1', 'auto');
  ga('send', 'pageview');

</script>
<!--  End Google Analytics -->
</body></html>