Revision: 2807
Author: [email protected]
Date: Wed Jan 20 07:46:11 2010
Log: Added instant communication plugin code
http://code.google.com/p/openmeetings/source/detail?r=2807

Added:
 /trunk/plugins/instant_communication_plugin/uuid.js

=======================================
--- /dev/null
+++ /trunk/plugins/instant_communication_plugin/uuid.js Wed Jan 20 07:46:11 2010
@@ -0,0 +1,129 @@
+/*file chiron src/uuid.js */
+
+/**
+    an UUID generator library.
+*/
+
+/*
+
+    Latest version:   http://www.broofa.com/Tools/randomUUID.js
+    Version:          1.0
+    Information:      http://www.broofa.com/blog/?p=151
+    Contact:          [email protected]
+
+    Copyright (c) 2008 Robert Kieffer
+    All rights reserved.
+
+    Redistribution and use in source and binary forms, with or without
+    modification, are permitted provided that the following conditions
+    are met:
+
+     * Redistributions of source code must retain the above copyright
+       notice, this list of conditions and the following disclaimer.
+     * Redistributions in binary form must reproduce the above
+       copyright notice, this list of conditions and the following
+       disclaimer in the documentation and/or other materials provided
+       with the distribution.
+     * Neither the name of Robert Kieffer nor the names of its
+       contributors may be used to endorse or promote products derived
+       from this software without specific prior written permission.
+
+    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
+    CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
+    INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+    MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+    DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS
+    BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED
+    TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+    DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+    ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
+    TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF
+    THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+    SUCH DAMAGE.
+
+*/
+
+/*preamble
+
+    Copyright (c) 2002-2008 Kris Kowal <http://cixar.com/~kris.kowal>
+    MIT License
+
+    The license terms are stated in full in <license.rst> and at the end
+    of all source files.
+
+*/
+
+/*** uuid4String
+    creates and return an RFC 4122 (version 4) UUID
+*/
+
+uuid4String = function () {
+    var uuid = [], itoh = '0123456789ABCDEF';
+
+    // Array of digits in UUID (32 digits + 4 dashes)
+    for (var i = 0; i < 36; i++) {
+        uuid[i] = 0xf & Math.random() * 0x10;
+    }
+
+    // Conform to RFC 4122, section 4.4
+    uuid[14] = 4; // version
+    uuid[19] = (uuid[19] & 0x3) | 0x8; // high bits of clock sequence
+
+    // Convert to hex chars
+    for (var i = 0; i < 36; i++) {
+        uuid[i] = itoh[uuid[i]];
+    }
+
+    // Insert dashes
+    uuid[8] = uuid[13] = uuid[18] = uuid[23] = '-';
+
+    return uuid.join('');
+};
+
+
+/*license
+
+    Legal
+    =======
+
+    Chiron is a component of the Tale web-game project.
+
+    See <credit.txt> for a complete list of
+    contributions and their licenses.  All contributions are provided
+ under permissive, non-viral licenses including MIT, BSD, Creative Commons
+    Attribution 2.5, Public Domain, or Unrestricted.
+
+
+    License
+    =======
+
+    Copyright (c) 2002-2008 Kris Kowal <http://cixar.com/~kris.kowal>
+    MIT License
+
+
+    MIT License
+    -----------
+
+    Permission is hereby granted, free of charge, to any person
+    obtaining a copy of this software and associated documentation
+    files (the "Software"), to deal in the Software without
+    restriction, including without limitation the rights to use,
+    copy, modify, merge, publish, distribute, sublicense, and/or sell
+    copies of the Software, and to permit persons to whom the
+    Software is furnished to do so, subject to the following
+    conditions:
+
+    The above copyright notice and this permission notice shall be
+    included in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+    OTHER DEALINGS IN THE SOFTWARE.
+
+*/
-- 
You received this message because you are subscribed to the Google Groups 
"OpenMeetings developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/openmeetings-dev?hl=en.


Reply via email to