diff options
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/General/Interfaces/IClientAPI.cs | 3 | ||||
-rw-r--r-- | OpenSim/Framework/General/OpenSim.Framework.csproj | 40 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.API.cs | 25 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | 14 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | 24 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Scenes/Scene.cs | 1 |
6 files changed, 89 insertions, 18 deletions
diff --git a/OpenSim/Framework/General/Interfaces/IClientAPI.cs b/OpenSim/Framework/General/Interfaces/IClientAPI.cs index 2c7e143..acacabe 100644 --- a/OpenSim/Framework/General/Interfaces/IClientAPI.cs +++ b/OpenSim/Framework/General/Interfaces/IClientAPI.cs | |||
@@ -34,6 +34,7 @@ using OpenSim.Framework.Types; | |||
34 | namespace OpenSim.Framework.Interfaces | 34 | namespace OpenSim.Framework.Interfaces |
35 | { | 35 | { |
36 | public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); | 36 | public delegate void ChatFromViewer(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); |
37 | public delegate void ImprovedInstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message); // Cut down from full list | ||
37 | public delegate void RezObject(AssetBase primAsset, LLVector3 pos); | 38 | public delegate void RezObject(AssetBase primAsset, LLVector3 pos); |
38 | public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west); | 39 | public delegate void ModifyTerrain(float height, float seconds, byte size, byte action, float north, float west); |
39 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); | 40 | public delegate void SetAppearance(byte[] texture, AgentSetAppearancePacket.VisualParamBlock[] visualParam); |
@@ -74,6 +75,7 @@ namespace OpenSim.Framework.Interfaces | |||
74 | 75 | ||
75 | public interface IClientAPI | 76 | public interface IClientAPI |
76 | { | 77 | { |
78 | event ImprovedInstantMessage OnInstantMessage; | ||
77 | event ChatFromViewer OnChatFromViewer; | 79 | event ChatFromViewer OnChatFromViewer; |
78 | event RezObject OnRezObject; | 80 | event RezObject OnRezObject; |
79 | event ModifyTerrain OnModifyTerrain; | 81 | event ModifyTerrain OnModifyTerrain; |
@@ -146,6 +148,7 @@ namespace OpenSim.Framework.Interfaces | |||
146 | void SendRegionHandshake(RegionInfo regionInfo); | 148 | void SendRegionHandshake(RegionInfo regionInfo); |
147 | void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); | 149 | void SendChatMessage(string message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); |
148 | void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); | 150 | void SendChatMessage(byte[] message, byte type, LLVector3 fromPos, string fromName, LLUUID fromAgentID); |
151 | void SendInstantMessage(string message, LLUUID target); | ||
149 | void SendLayerData(float[] map); | 152 | void SendLayerData(float[] map); |
150 | void SendLayerData(int px, int py, float[] map); | 153 | void SendLayerData(int px, int py, float[] map); |
151 | void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); | 154 | void MoveAgentIntoRegion(RegionInfo regInfo, LLVector3 pos, LLVector3 look); |
diff --git a/OpenSim/Framework/General/OpenSim.Framework.csproj b/OpenSim/Framework/General/OpenSim.Framework.csproj index c5124cd..192e757 100644 --- a/OpenSim/Framework/General/OpenSim.Framework.csproj +++ b/OpenSim/Framework/General/OpenSim.Framework.csproj | |||
@@ -1,4 +1,4 @@ | |||
1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | 1 | <Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> |
2 | <PropertyGroup> | 2 | <PropertyGroup> |
3 | <ProjectType>Local</ProjectType> | 3 | <ProjectType>Local</ProjectType> |
4 | <ProductVersion>8.0.50727</ProductVersion> | 4 | <ProductVersion>8.0.50727</ProductVersion> |
@@ -6,7 +6,8 @@ | |||
6 | <ProjectGuid>{8ACA2445-0000-0000-0000-000000000000}</ProjectGuid> | 6 | <ProjectGuid>{8ACA2445-0000-0000-0000-000000000000}</ProjectGuid> |
7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> | 7 | <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> |
8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> | 8 | <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> |
9 | <ApplicationIcon></ApplicationIcon> | 9 | <ApplicationIcon> |
10 | </ApplicationIcon> | ||
10 | <AssemblyKeyContainerName> | 11 | <AssemblyKeyContainerName> |
11 | </AssemblyKeyContainerName> | 12 | </AssemblyKeyContainerName> |
12 | <AssemblyName>OpenSim.Framework</AssemblyName> | 13 | <AssemblyName>OpenSim.Framework</AssemblyName> |
@@ -15,9 +16,11 @@ | |||
15 | <DefaultTargetSchema>IE50</DefaultTargetSchema> | 16 | <DefaultTargetSchema>IE50</DefaultTargetSchema> |
16 | <DelaySign>false</DelaySign> | 17 | <DelaySign>false</DelaySign> |
17 | <OutputType>Library</OutputType> | 18 | <OutputType>Library</OutputType> |
18 | <AppDesignerFolder></AppDesignerFolder> | 19 | <AppDesignerFolder> |
20 | </AppDesignerFolder> | ||
19 | <RootNamespace>OpenSim.Framework</RootNamespace> | 21 | <RootNamespace>OpenSim.Framework</RootNamespace> |
20 | <StartupObject></StartupObject> | 22 | <StartupObject> |
23 | </StartupObject> | ||
21 | <FileUpgradeFlags> | 24 | <FileUpgradeFlags> |
22 | </FileUpgradeFlags> | 25 | </FileUpgradeFlags> |
23 | </PropertyGroup> | 26 | </PropertyGroup> |
@@ -28,7 +31,8 @@ | |||
28 | <ConfigurationOverrideFile> | 31 | <ConfigurationOverrideFile> |
29 | </ConfigurationOverrideFile> | 32 | </ConfigurationOverrideFile> |
30 | <DefineConstants>TRACE;DEBUG</DefineConstants> | 33 | <DefineConstants>TRACE;DEBUG</DefineConstants> |
31 | <DocumentationFile></DocumentationFile> | 34 | <DocumentationFile> |
35 | </DocumentationFile> | ||
32 | <DebugSymbols>True</DebugSymbols> | 36 | <DebugSymbols>True</DebugSymbols> |
33 | <FileAlignment>4096</FileAlignment> | 37 | <FileAlignment>4096</FileAlignment> |
34 | <Optimize>False</Optimize> | 38 | <Optimize>False</Optimize> |
@@ -37,7 +41,8 @@ | |||
37 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 41 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
38 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 42 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
39 | <WarningLevel>4</WarningLevel> | 43 | <WarningLevel>4</WarningLevel> |
40 | <NoWarn></NoWarn> | 44 | <NoWarn> |
45 | </NoWarn> | ||
41 | </PropertyGroup> | 46 | </PropertyGroup> |
42 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> | 47 | <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> |
43 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> | 48 | <AllowUnsafeBlocks>False</AllowUnsafeBlocks> |
@@ -46,7 +51,8 @@ | |||
46 | <ConfigurationOverrideFile> | 51 | <ConfigurationOverrideFile> |
47 | </ConfigurationOverrideFile> | 52 | </ConfigurationOverrideFile> |
48 | <DefineConstants>TRACE</DefineConstants> | 53 | <DefineConstants>TRACE</DefineConstants> |
49 | <DocumentationFile></DocumentationFile> | 54 | <DocumentationFile> |
55 | </DocumentationFile> | ||
50 | <DebugSymbols>False</DebugSymbols> | 56 | <DebugSymbols>False</DebugSymbols> |
51 | <FileAlignment>4096</FileAlignment> | 57 | <FileAlignment>4096</FileAlignment> |
52 | <Optimize>True</Optimize> | 58 | <Optimize>True</Optimize> |
@@ -55,36 +61,34 @@ | |||
55 | <RemoveIntegerChecks>False</RemoveIntegerChecks> | 61 | <RemoveIntegerChecks>False</RemoveIntegerChecks> |
56 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> | 62 | <TreatWarningsAsErrors>False</TreatWarningsAsErrors> |
57 | <WarningLevel>4</WarningLevel> | 63 | <WarningLevel>4</WarningLevel> |
58 | <NoWarn></NoWarn> | 64 | <NoWarn> |
65 | </NoWarn> | ||
59 | </PropertyGroup> | 66 | </PropertyGroup> |
60 | <ItemGroup> | 67 | <ItemGroup> |
61 | <Reference Include="Db4objects.Db4o.dll" > | 68 | <Reference Include="Db4objects.Db4o.dll"> |
62 | <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> | 69 | <HintPath>..\..\..\bin\Db4objects.Db4o.dll</HintPath> |
63 | <Private>False</Private> | 70 | <Private>False</Private> |
64 | </Reference> | 71 | </Reference> |
65 | <Reference Include="libsecondlife.dll" > | 72 | <Reference Include="libsecondlife.dll"> |
66 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> | 73 | <HintPath>..\..\..\bin\libsecondlife.dll</HintPath> |
67 | <Private>False</Private> | 74 | <Private>False</Private> |
68 | </Reference> | 75 | </Reference> |
69 | <Reference Include="System" > | 76 | <Reference Include="System"> |
70 | <HintPath>System.dll</HintPath> | 77 | <HintPath>System.dll</HintPath> |
71 | <Private>False</Private> | 78 | <Private>False</Private> |
72 | </Reference> | 79 | </Reference> |
73 | <Reference Include="System.Xml" > | 80 | <Reference Include="System.Xml"> |
74 | <HintPath>System.Xml.dll</HintPath> | 81 | <HintPath>System.Xml.dll</HintPath> |
75 | <Private>False</Private> | 82 | <Private>False</Private> |
76 | </Reference> | 83 | </Reference> |
77 | <Reference Include="XMLRPC.dll" > | 84 | <Reference Include="XMLRPC, Version=0.0.0.0, Culture=neutral, processorArchitecture=MSIL" /> |
78 | <HintPath>..\..\..\bin\XMLRPC.dll</HintPath> | ||
79 | <Private>False</Private> | ||
80 | </Reference> | ||
81 | </ItemGroup> | 85 | </ItemGroup> |
82 | <ItemGroup> | 86 | <ItemGroup> |
83 | <ProjectReference Include="..\Console\OpenSim.Framework.Console.csproj"> | 87 | <ProjectReference Include="..\Console\OpenSim.Framework.Console.csproj"> |
84 | <Name>OpenSim.Framework.Console</Name> | 88 | <Name>OpenSim.Framework.Console</Name> |
85 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> | 89 | <Project>{A7CD0630-0000-0000-0000-000000000000}</Project> |
86 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> | 90 | <Package>{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</Package> |
87 | <Private>False</Private> | 91 | <Private>False</Private> |
88 | </ProjectReference> | 92 | </ProjectReference> |
89 | </ItemGroup> | 93 | </ItemGroup> |
90 | <ItemGroup> | 94 | <ItemGroup> |
@@ -201,4 +205,4 @@ | |||
201 | <PostBuildEvent> | 205 | <PostBuildEvent> |
202 | </PostBuildEvent> | 206 | </PostBuildEvent> |
203 | </PropertyGroup> | 207 | </PropertyGroup> |
204 | </Project> | 208 | </Project> \ No newline at end of file |
diff --git a/OpenSim/Region/ClientStack/ClientView.API.cs b/OpenSim/Region/ClientStack/ClientView.API.cs index 9e7117f..cefe856 100644 --- a/OpenSim/Region/ClientStack/ClientView.API.cs +++ b/OpenSim/Region/ClientStack/ClientView.API.cs | |||
@@ -40,6 +40,7 @@ namespace OpenSim.Region.ClientStack | |||
40 | { | 40 | { |
41 | partial class ClientView | 41 | partial class ClientView |
42 | { | 42 | { |
43 | public event ImprovedInstantMessage OnInstantMessage; | ||
43 | public event ChatFromViewer OnChatFromViewer; | 44 | public event ChatFromViewer OnChatFromViewer; |
44 | public event RezObject OnRezObject; | 45 | public event RezObject OnRezObject; |
45 | public event GenericCall4 OnDeRezObject; | 46 | public event GenericCall4 OnDeRezObject; |
@@ -236,6 +237,30 @@ namespace OpenSim.Region.ClientStack | |||
236 | this.OutPacket(reply); | 237 | this.OutPacket(reply); |
237 | } | 238 | } |
238 | 239 | ||
240 | /// <summary> | ||
241 | /// | ||
242 | /// </summary> | ||
243 | /// <remarks>TODO</remarks> | ||
244 | /// <param name="message"></param> | ||
245 | /// <param name="target"></param> | ||
246 | public void SendInstantMessage(string message, LLUUID target) | ||
247 | { | ||
248 | ImprovedInstantMessagePacket msg = new ImprovedInstantMessagePacket(); | ||
249 | msg.AgentData.AgentID = this.AgentID; | ||
250 | msg.AgentData.SessionID = this.SessionID; | ||
251 | |||
252 | msg.MessageBlock.Dialog = 0; | ||
253 | msg.MessageBlock.FromGroup = false; | ||
254 | msg.MessageBlock.ID = target.Combine(this.AgentID); | ||
255 | msg.MessageBlock.Offline = 0; | ||
256 | msg.MessageBlock.ParentEstateID = 0; | ||
257 | msg.MessageBlock.Position = new LLVector3(); | ||
258 | msg.MessageBlock.RegionID = new LLUUID(); | ||
259 | msg.MessageBlock.Timestamp = 0; | ||
260 | msg.MessageBlock.ToAgentID = target; | ||
261 | |||
262 | this.OutPacket(msg); | ||
263 | } | ||
239 | 264 | ||
240 | /// <summary> | 265 | /// <summary> |
241 | /// Send the region heightmap to the client | 266 | /// Send the region heightmap to the client |
diff --git a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs index 0114fb1..def14c7 100644 --- a/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs +++ b/OpenSim/Region/ClientStack/ClientView.ProcessPackets.cs | |||
@@ -92,6 +92,20 @@ namespace OpenSim.Region.ClientStack | |||
92 | this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID); | 92 | this.OnChatFromViewer(message, type, fromPos, fromName, fromAgentID); |
93 | } | 93 | } |
94 | break; | 94 | break; |
95 | case PacketType.ImprovedInstantMessage: | ||
96 | ImprovedInstantMessagePacket msgpack = (ImprovedInstantMessagePacket)Pack; | ||
97 | |||
98 | string IMfromName = Util.FieldToString(msgpack.MessageBlock.FromAgentName); | ||
99 | string IMmessage = Util.FieldToString(msgpack.MessageBlock.Message); | ||
100 | |||
101 | if (OnInstantMessage != null) | ||
102 | { | ||
103 | this.OnInstantMessage(msgpack.AgentData.AgentID, msgpack.MessageBlock.ToAgentID, | ||
104 | msgpack.MessageBlock.Timestamp, IMfromName, IMmessage); | ||
105 | } | ||
106 | |||
107 | break; | ||
108 | |||
95 | case PacketType.RezObject: | 109 | case PacketType.RezObject: |
96 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; | 110 | RezObjectPacket rezPacket = (RezObjectPacket)Pack; |
97 | AgentInventory inven = this.m_inventoryCache.GetAgentsInventory(this.AgentID); | 111 | AgentInventory inven = this.m_inventoryCache.GetAgentsInventory(this.AgentID); |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs index bcef137..7535049 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.PacketHandlers.cs | |||
@@ -100,6 +100,30 @@ namespace OpenSim.Region.Environment.Scenes | |||
100 | /// <summary> | 100 | /// <summary> |
101 | /// | 101 | /// |
102 | /// </summary> | 102 | /// </summary> |
103 | /// <remarks>Inefficient. TODO: Fixme</remarks> | ||
104 | /// <param name="fromAgentID"></param> | ||
105 | /// <param name="toAgentID"></param> | ||
106 | /// <param name="timestamp"></param> | ||
107 | /// <param name="fromAgentName"></param> | ||
108 | /// <param name="message"></param> | ||
109 | public void InstantMessage(LLUUID fromAgentID, LLUUID toAgentID, uint timestamp, string fromAgentName, string message) | ||
110 | { | ||
111 | if (this.Avatars.ContainsKey(toAgentID)) | ||
112 | { | ||
113 | // Local sim message | ||
114 | ScenePresence avatar = this.Avatars[toAgentID]; | ||
115 | |||
116 | |||
117 | } | ||
118 | else | ||
119 | { | ||
120 | // Grid message | ||
121 | } | ||
122 | } | ||
123 | |||
124 | /// <summary> | ||
125 | /// | ||
126 | /// </summary> | ||
103 | /// <param name="message"></param> | 127 | /// <param name="message"></param> |
104 | /// <param name="type"></param> | 128 | /// <param name="type"></param> |
105 | /// <param name="fromPos"></param> | 129 | /// <param name="fromPos"></param> |
diff --git a/OpenSim/Region/Environment/Scenes/Scene.cs b/OpenSim/Region/Environment/Scenes/Scene.cs index 1f370c4..fdf3cc8 100644 --- a/OpenSim/Region/Environment/Scenes/Scene.cs +++ b/OpenSim/Region/Environment/Scenes/Scene.cs | |||
@@ -450,6 +450,7 @@ namespace OpenSim.Region.Environment.Scenes | |||
450 | client.OnRegionHandShakeReply += this.SendLayerData; | 450 | client.OnRegionHandShakeReply += this.SendLayerData; |
451 | //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); | 451 | //remoteClient.OnRequestWearables += new GenericCall(this.GetInitialPrims); |
452 | client.OnChatFromViewer += this.SimChat; | 452 | client.OnChatFromViewer += this.SimChat; |
453 | client.OnInstantMessage += this.InstantMessage; | ||
453 | client.OnRequestWearables += this.InformClientOfNeighbours; | 454 | client.OnRequestWearables += this.InformClientOfNeighbours; |
454 | client.OnAddPrim += this.AddNewPrim; | 455 | client.OnAddPrim += this.AddNewPrim; |
455 | client.OnUpdatePrimPosition += this.UpdatePrimPosition; | 456 | client.OnUpdatePrimPosition += this.UpdatePrimPosition; |