aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/CoreModules
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2010-07-12 15:47:56 +0100
committerJustin Clark-Casey (justincc)2010-07-26 23:34:19 +0100
commit8f403cb4b87fc99c0274929464229b1497395b86 (patch)
tree00fd0580be37bd9eef194b60a55eddd127edd492 /OpenSim/Region/CoreModules
parentImplement media texture persistence over server restarts for sqlite (diff)
downloadopensim-SC-8f403cb4b87fc99c0274929464229b1497395b86.zip
opensim-SC-8f403cb4b87fc99c0274929464229b1497395b86.tar.gz
opensim-SC-8f403cb4b87fc99c0274929464229b1497395b86.tar.bz2
opensim-SC-8f403cb4b87fc99c0274929464229b1497395b86.tar.xz
Implement llGetPrimMediaParams()
Exposes method to get media entry via IMoapModule As yet untested.
Diffstat (limited to 'OpenSim/Region/CoreModules')
-rw-r--r--OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs19
1 files changed, 17 insertions, 2 deletions
diff --git a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
index c3ec2a6..9f74367 100644
--- a/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
+++ b/OpenSim/Region/CoreModules/World/Media/Moap/MoapModule.cs
@@ -51,7 +51,7 @@ using OSDMap = OpenMetaverse.StructuredData.OSDMap;
51namespace OpenSim.Region.CoreModules.Media.Moap 51namespace OpenSim.Region.CoreModules.Media.Moap
52{ 52{
53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")] 53 [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "MoapModule")]
54 public class MoapModule : INonSharedRegionModule 54 public class MoapModule : INonSharedRegionModule, IMoapModule
55 { 55 {
56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 56 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
57 57
@@ -97,7 +97,22 @@ namespace OpenSim.Region.CoreModules.Media.Moap
97 // Even though we're registering for POST we're going to get GETS and UPDATES too 97 // Even though we're registering for POST we're going to get GETS and UPDATES too
98 caps.RegisterHandler( 98 caps.RegisterHandler(
99 "ObjectMediaNavigate", new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), HandleObjectMediaNavigateMessage)); 99 "ObjectMediaNavigate", new RestStreamHandler("POST", "/CAPS/" + UUID.Random(), HandleObjectMediaNavigateMessage));
100 } 100 }
101
102 public MediaEntry GetMediaEntry(SceneObjectPart part, int face)
103 {
104 if (face < 0)
105 throw new ArgumentException("Face cannot be less than zero");
106
107 List<MediaEntry> media = part.Shape.Media;
108
109 if (face > media.Count - 1)
110 throw new ArgumentException(
111 string.Format("Face argument was {0} but max is {1}", face, media.Count - 1));
112
113 // TODO: Really need a proper copy constructor down in libopenmetaverse
114 return MediaEntry.FromOSD(media[face].GetOSD());
115 }
101 116
102 /// <summary> 117 /// <summary>
103 /// Sets or gets per face media textures. 118 /// Sets or gets per face media textures.