diff options
author | UbitUmarov | 2012-03-23 03:41:48 +0000 |
---|---|---|
committer | UbitUmarov | 2012-03-23 03:41:48 +0000 |
commit | 4db05a98c2c1678b612e0a3d2f95c24e34ac5f13 (patch) | |
tree | 3929bd993c504a3de7697f449e36535aeeddf737 /OpenSim/Framework | |
parent | Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork (diff) | |
parent | Merge branch 'master' into careminster (diff) | |
download | opensim-SC_OLD-4db05a98c2c1678b612e0a3d2f95c24e34ac5f13.zip opensim-SC_OLD-4db05a98c2c1678b612e0a3d2f95c24e34ac5f13.tar.gz opensim-SC_OLD-4db05a98c2c1678b612e0a3d2f95c24e34ac5f13.tar.bz2 opensim-SC_OLD-4db05a98c2c1678b612e0a3d2f95c24e34ac5f13.tar.xz |
Merge branch 'master' of ssh://3dhosting.de/var/git/careminster into ubitwork
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/GcNotify.cs | 62 | ||||
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/ILandObject.cs | 1 | ||||
-rw-r--r-- | OpenSim/Framework/SLUtil.cs | 50 |
4 files changed, 65 insertions, 51 deletions
diff --git a/OpenSim/Framework/GcNotify.cs b/OpenSim/Framework/GcNotify.cs new file mode 100644 index 0000000..14a22a6 --- /dev/null +++ b/OpenSim/Framework/GcNotify.cs | |||
@@ -0,0 +1,62 @@ | |||
1 | /* | ||
2 | * Copyright (c) Contributors, http://opensimulator.org/ | ||
3 | * See CONTRIBUTORS.TXT for a full list of copyright holders. | ||
4 | * | ||
5 | * Redistribution and use in source and binary forms, with or without | ||
6 | * modification, are permitted provided that the following conditions are met: | ||
7 | * * Redistributions of source code must retain the above copyright | ||
8 | * notice, this list of conditions and the following disclaimer. | ||
9 | * * Redistributions in binary form must reproduce the above copyright | ||
10 | * notice, this list of conditions and the following disclaimer in the | ||
11 | * documentation and/or other materials provided with the distribution. | ||
12 | * * Neither the name of the OpenSimulator Project nor the | ||
13 | * names of its contributors may be used to endorse or promote products | ||
14 | * derived from this software without specific prior written permission. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY | ||
17 | * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED | ||
18 | * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
19 | * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY | ||
20 | * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES | ||
21 | * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
22 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND | ||
23 | * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
25 | * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | */ | ||
27 | |||
28 | using System; | ||
29 | using System.Reflection; | ||
30 | using log4net; | ||
31 | |||
32 | public class GcNotify | ||
33 | { | ||
34 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
35 | |||
36 | public static bool Enabled | ||
37 | { | ||
38 | get { return s_initialized; } | ||
39 | set | ||
40 | { | ||
41 | if (!s_initialized && value) | ||
42 | new GcNotify(); | ||
43 | |||
44 | s_initialized = value; | ||
45 | } | ||
46 | } | ||
47 | |||
48 | private static bool s_initialized = false; | ||
49 | |||
50 | private GcNotify() {} | ||
51 | |||
52 | ~GcNotify() | ||
53 | { | ||
54 | if (!Environment.HasShutdownStarted && !AppDomain.CurrentDomain.IsFinalizingForUnload()) | ||
55 | { | ||
56 | m_log.DebugFormat("[GC NOTIFY]: Garbage collection triggered."); | ||
57 | |||
58 | if (Enabled) | ||
59 | new GcNotify(); | ||
60 | } | ||
61 | } | ||
62 | } \ No newline at end of file | ||
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 94acdba..004b1a6 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -1226,10 +1226,9 @@ namespace OpenSim.Framework | |||
1226 | /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param> | 1226 | /// <param name="OrbitalPosition">The orbital position is given in radians, and must be "adjusted" for the linden client, see LLClientView</param> |
1227 | void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, | 1227 | void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, |
1228 | float OrbitalPosition); | 1228 | float OrbitalPosition); |
1229 | 1229 | ||
1230 | void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks); | 1230 | void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks); |
1231 | void SendViewerTime(int phase); | 1231 | void SendViewerTime(int phase); |
1232 | UUID GetDefaultAnimation(string name); | ||
1233 | 1232 | ||
1234 | void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout, | 1233 | void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, Byte[] charterMember, string flAbout, |
1235 | uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID); | 1234 | uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID); |
diff --git a/OpenSim/Framework/ILandObject.cs b/OpenSim/Framework/ILandObject.cs index dd73b3f..4f98d7b 100644 --- a/OpenSim/Framework/ILandObject.cs +++ b/OpenSim/Framework/ILandObject.cs | |||
@@ -71,6 +71,7 @@ namespace OpenSim.Framework | |||
71 | bool IsEitherBannedOrRestricted(UUID avatar); | 71 | bool IsEitherBannedOrRestricted(UUID avatar); |
72 | bool IsBannedFromLand(UUID avatar); | 72 | bool IsBannedFromLand(UUID avatar); |
73 | bool IsRestrictedFromLand(UUID avatar); | 73 | bool IsRestrictedFromLand(UUID avatar); |
74 | bool IsInLandAccessList(UUID avatar); | ||
74 | void SendLandUpdateToClient(IClientAPI remote_client); | 75 | void SendLandUpdateToClient(IClientAPI remote_client); |
75 | void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client); | 76 | void SendLandUpdateToClient(bool snap_selection, IClientAPI remote_client); |
76 | List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag); | 77 | List<LandAccessEntry> CreateAccessListArrayByFlag(AccessList flag); |
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs index f9cb851..db4541e 100644 --- a/OpenSim/Framework/SLUtil.cs +++ b/OpenSim/Framework/SLUtil.cs | |||
@@ -27,6 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.IO; | ||
30 | using System.Reflection; | 31 | using System.Reflection; |
31 | using System.Xml; | 32 | using System.Xml; |
32 | using log4net; | 33 | using log4net; |
@@ -40,13 +41,6 @@ namespace OpenSim.Framework | |||
40 | 41 | ||
41 | #region SL / file extension / content-type conversions | 42 | #region SL / file extension / content-type conversions |
42 | 43 | ||
43 | public static Dictionary<string, UUID> DefaultAvatarAnimations = new Dictionary<string, UUID>(); | ||
44 | |||
45 | static SLUtil() | ||
46 | { | ||
47 | DefaultAvatarAnimations = LoadDefaultAvatarAnimations("data/avataranimations.xml"); | ||
48 | } | ||
49 | |||
50 | public static string SLAssetTypeToContentType(int assetType) | 44 | public static string SLAssetTypeToContentType(int assetType) |
51 | { | 45 | { |
52 | switch ((AssetType)assetType) | 46 | switch ((AssetType)assetType) |
@@ -382,47 +376,5 @@ namespace OpenSim.Framework | |||
382 | 376 | ||
383 | return output; | 377 | return output; |
384 | } | 378 | } |
385 | |||
386 | /// <summary> | ||
387 | /// Load the default SL avatar animations. | ||
388 | /// </summary> | ||
389 | /// <returns></returns> | ||
390 | public static Dictionary<string, UUID> LoadDefaultAvatarAnimations(string path) | ||
391 | { | ||
392 | Dictionary<string, UUID> animations = new Dictionary<string, UUID>(); | ||
393 | |||
394 | using (XmlTextReader reader = new XmlTextReader(path)) | ||
395 | { | ||
396 | XmlDocument doc = new XmlDocument(); | ||
397 | doc.Load(reader); | ||
398 | if (doc.DocumentElement != null) | ||
399 | { | ||
400 | foreach (XmlNode nod in doc.DocumentElement.ChildNodes) | ||
401 | { | ||
402 | if (nod.Attributes["name"] != null) | ||
403 | { | ||
404 | string name = nod.Attributes["name"].Value.ToLower(); | ||
405 | string id = nod.InnerText; | ||
406 | animations.Add(name, (UUID)id); | ||
407 | } | ||
408 | } | ||
409 | } | ||
410 | } | ||
411 | |||
412 | return animations; | ||
413 | } | ||
414 | |||
415 | /// <summary> | ||
416 | /// Get the default SL avatar animation with the given name. | ||
417 | /// </summary> | ||
418 | /// <param name="name"></param> | ||
419 | /// <returns></returns> | ||
420 | public static UUID GetDefaultAvatarAnimation(string name) | ||
421 | { | ||
422 | if (DefaultAvatarAnimations.ContainsKey(name)) | ||
423 | return DefaultAvatarAnimations[name]; | ||
424 | |||
425 | return UUID.Zero; | ||
426 | } | ||
427 | } | 379 | } |
428 | } \ No newline at end of file | 380 | } \ No newline at end of file |