diff options
author | Melanie Thielker | 2008-12-23 18:16:30 +0000 |
---|---|---|
committer | Melanie Thielker | 2008-12-23 18:16:30 +0000 |
commit | fc053a6af8cf2f9dc158d8bc3d3ff5597d50b69f (patch) | |
tree | 4d68ff7e79e99d167b234c7c0cce92715f5a9cd2 /OpenSim | |
parent | * Remove mono compiler warning (diff) | |
download | opensim-SC_OLD-fc053a6af8cf2f9dc158d8bc3d3ff5597d50b69f.zip opensim-SC_OLD-fc053a6af8cf2f9dc158d8bc3d3ff5597d50b69f.tar.gz opensim-SC_OLD-fc053a6af8cf2f9dc158d8bc3d3ff5597d50b69f.tar.bz2 opensim-SC_OLD-fc053a6af8cf2f9dc158d8bc3d3ff5597d50b69f.tar.xz |
Plumb in the 4 missing classified events and the 3 packet methods
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Framework/IClientAPI.cs | 15 | ||||
-rw-r--r-- | OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | 118 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | 12 | ||||
-rw-r--r-- | OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | 13 | ||||
-rw-r--r-- | OpenSim/Tests/Common/Mock/TestClient.cs | 13 |
5 files changed, 171 insertions, 0 deletions
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index f9071a5..d683802 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs | |||
@@ -413,6 +413,11 @@ namespace OpenSim.Framework | |||
413 | public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client); | 413 | public delegate void StartLure(byte lureType, string message, UUID targetID, IClientAPI client); |
414 | public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client); | 414 | public delegate void TeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client); |
415 | 415 | ||
416 | public delegate void ClassifiedInfoRequest(UUID classifiedID, IClientAPI client); | ||
417 | public delegate void ClassifiedInfoUpdate(UUID classifiedID, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, Vector3 globalPos, byte classifiedFlags, int price, IClientAPI client); | ||
418 | public delegate void ClassifiedDelete(UUID classifiedID, IClientAPI client); | ||
419 | |||
420 | |||
416 | #endregion | 421 | #endregion |
417 | 422 | ||
418 | public struct DirPlacesReplyData | 423 | public struct DirPlacesReplyData |
@@ -723,6 +728,13 @@ namespace OpenSim.Framework | |||
723 | event TeleportLureRequest OnTeleportLureRequest; | 728 | event TeleportLureRequest OnTeleportLureRequest; |
724 | event NetworkStats OnNetworkStatsUpdate; | 729 | event NetworkStats OnNetworkStatsUpdate; |
725 | 730 | ||
731 | event ClassifiedInfoRequest OnClassifiedInfoRequest; | ||
732 | event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | ||
733 | event ClassifiedDelete OnClassifiedDelete; | ||
734 | event ClassifiedDelete OnClassifiedGodDelete; | ||
735 | |||
736 | // void ActivateGesture(UUID assetId, UUID gestureId); | ||
737 | |||
726 | /// <summary> | 738 | /// <summary> |
727 | /// Tell this client what items it should be wearing now | 739 | /// Tell this client what items it should be wearing now |
728 | /// </summary> | 740 | /// </summary> |
@@ -1054,6 +1066,9 @@ namespace OpenSim.Framework | |||
1054 | 1066 | ||
1055 | void SendTerminateFriend(UUID exFriendID); | 1067 | void SendTerminateFriend(UUID exFriendID); |
1056 | 1068 | ||
1069 | void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name); | ||
1070 | void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price); | ||
1071 | |||
1057 | void KillEndDone(); | 1072 | void KillEndDone(); |
1058 | 1073 | ||
1059 | bool AddGenericPacketHandler(string MethodName, GenericMessage handler); | 1074 | bool AddGenericPacketHandler(string MethodName, GenericMessage handler); |
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs index 8922364..aac4e32 100644 --- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs +++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs | |||
@@ -274,6 +274,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
274 | 274 | ||
275 | private NetworkStats handlerNetworkStatsUpdate; | 275 | private NetworkStats handlerNetworkStatsUpdate; |
276 | 276 | ||
277 | private ClassifiedInfoRequest handlerClassifiedInfoRequest; | ||
278 | private ClassifiedInfoUpdate handlerClassifiedInfoUpdate; | ||
279 | private ClassifiedDelete handlerClassifiedDelete; | ||
280 | private ClassifiedDelete handlerClassifiedGodDelete; | ||
281 | |||
277 | private readonly IGroupsModule m_GroupsModule; | 282 | private readonly IGroupsModule m_GroupsModule; |
278 | 283 | ||
279 | //private TerrainUnacked handlerUnackedTerrain = null; | 284 | //private TerrainUnacked handlerUnackedTerrain = null; |
@@ -1032,6 +1037,10 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
1032 | public event TeleportLureRequest OnTeleportLureRequest; | 1037 | public event TeleportLureRequest OnTeleportLureRequest; |
1033 | public event NetworkStats OnNetworkStatsUpdate; | 1038 | public event NetworkStats OnNetworkStatsUpdate; |
1034 | 1039 | ||
1040 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | ||
1041 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | ||
1042 | public event ClassifiedDelete OnClassifiedDelete; | ||
1043 | public event ClassifiedDelete OnClassifiedGodDelete; | ||
1035 | 1044 | ||
1036 | public void ActivateGesture(UUID assetId, UUID gestureId) | 1045 | public void ActivateGesture(UUID assetId, UUID gestureId) |
1037 | { | 1046 | { |
@@ -7215,6 +7224,62 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
7215 | this); | 7224 | this); |
7216 | break; | 7225 | break; |
7217 | 7226 | ||
7227 | case PacketType.ClassifiedInfoRequest: | ||
7228 | ClassifiedInfoRequestPacket classifiedInfoRequest = | ||
7229 | (ClassifiedInfoRequestPacket)Pack; | ||
7230 | |||
7231 | handlerClassifiedInfoRequest = OnClassifiedInfoRequest; | ||
7232 | if (handlerClassifiedInfoRequest != null) | ||
7233 | handlerClassifiedInfoRequest( | ||
7234 | classifiedInfoRequest.Data.ClassifiedID, | ||
7235 | this); | ||
7236 | break; | ||
7237 | |||
7238 | case PacketType.ClassifiedInfoUpdate: | ||
7239 | ClassifiedInfoUpdatePacket classifiedInfoUpdate = | ||
7240 | (ClassifiedInfoUpdatePacket)Pack; | ||
7241 | |||
7242 | handlerClassifiedInfoUpdate = OnClassifiedInfoUpdate; | ||
7243 | if (handlerClassifiedInfoUpdate != null) | ||
7244 | handlerClassifiedInfoUpdate( | ||
7245 | classifiedInfoUpdate.Data.ClassifiedID, | ||
7246 | classifiedInfoUpdate.Data.Category, | ||
7247 | Utils.BytesToString( | ||
7248 | classifiedInfoUpdate.Data.Name), | ||
7249 | Utils.BytesToString( | ||
7250 | classifiedInfoUpdate.Data.Desc), | ||
7251 | classifiedInfoUpdate.Data.ParcelID, | ||
7252 | classifiedInfoUpdate.Data.ParentEstate, | ||
7253 | classifiedInfoUpdate.Data.SnapshotID, | ||
7254 | new Vector3( | ||
7255 | classifiedInfoUpdate.Data.PosGlobal), | ||
7256 | classifiedInfoUpdate.Data.ClassifiedFlags, | ||
7257 | classifiedInfoUpdate.Data.PriceForListing, | ||
7258 | this); | ||
7259 | break; | ||
7260 | |||
7261 | case PacketType.ClassifiedDelete: | ||
7262 | ClassifiedDeletePacket classifiedDelete = | ||
7263 | (ClassifiedDeletePacket)Pack; | ||
7264 | |||
7265 | handlerClassifiedDelete = OnClassifiedDelete; | ||
7266 | if (handlerClassifiedDelete != null) | ||
7267 | handlerClassifiedDelete( | ||
7268 | classifiedDelete.Data.ClassifiedID, | ||
7269 | this); | ||
7270 | break; | ||
7271 | |||
7272 | case PacketType.ClassifiedGodDelete: | ||
7273 | ClassifiedGodDeletePacket classifiedGodDelete = | ||
7274 | (ClassifiedGodDeletePacket)Pack; | ||
7275 | |||
7276 | handlerClassifiedGodDelete = OnClassifiedGodDelete; | ||
7277 | if (handlerClassifiedGodDelete != null) | ||
7278 | handlerClassifiedGodDelete( | ||
7279 | classifiedGodDelete.Data.ClassifiedID, | ||
7280 | this); | ||
7281 | break; | ||
7282 | |||
7218 | default: | 7283 | default: |
7219 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); | 7284 | m_log.Warn("[CLIENT]: unhandled packet " + Pack); |
7220 | break; | 7285 | break; |
@@ -8044,6 +8109,59 @@ namespace OpenSim.Region.ClientStack.LindenUDP | |||
8044 | OutPacket(p, ThrottleOutPacketType.Task); | 8109 | OutPacket(p, ThrottleOutPacketType.Task); |
8045 | } | 8110 | } |
8046 | 8111 | ||
8112 | public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) | ||
8113 | { | ||
8114 | if (classifiedID.Length != name.Length) | ||
8115 | return; | ||
8116 | |||
8117 | AvatarClassifiedReplyPacket ac = | ||
8118 | (AvatarClassifiedReplyPacket)PacketPool.Instance.GetPacket( | ||
8119 | PacketType.AvatarClassifiedReply); | ||
8120 | |||
8121 | ac.AgentData = new AvatarClassifiedReplyPacket.AgentDataBlock(); | ||
8122 | ac.AgentData.AgentID = AgentId; | ||
8123 | ac.AgentData.TargetID = targetID; | ||
8124 | |||
8125 | ac.Data = new AvatarClassifiedReplyPacket.DataBlock[classifiedID.Length]; | ||
8126 | int i; | ||
8127 | for (i = 0 ; i < classifiedID.Length ; i++) | ||
8128 | { | ||
8129 | ac.Data[i].ClassifiedID = classifiedID[i]; | ||
8130 | ac.Data[i].Name = Utils.StringToBytes(name[i]); | ||
8131 | } | ||
8132 | |||
8133 | OutPacket(ac, ThrottleOutPacketType.Task); | ||
8134 | } | ||
8135 | |||
8136 | public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) | ||
8137 | { | ||
8138 | ClassifiedInfoReplyPacket cr = | ||
8139 | (ClassifiedInfoReplyPacket)PacketPool.Instance.GetPacket( | ||
8140 | PacketType.ClassifiedInfoReply); | ||
8141 | |||
8142 | cr.AgentData = new ClassifiedInfoReplyPacket.AgentDataBlock(); | ||
8143 | cr.AgentData.AgentID = AgentId; | ||
8144 | |||
8145 | cr.Data = new ClassifiedInfoReplyPacket.DataBlock(); | ||
8146 | cr.Data.ClassifiedID = classifiedID; | ||
8147 | cr.Data.CreatorID = creatorID; | ||
8148 | cr.Data.CreationDate = creationDate; | ||
8149 | cr.Data.ExpirationDate = expirationDate; | ||
8150 | cr.Data.Category = category; | ||
8151 | cr.Data.Name = Utils.StringToBytes(name); | ||
8152 | cr.Data.Desc = Utils.StringToBytes(description); | ||
8153 | cr.Data.ParcelID = parcelID; | ||
8154 | cr.Data.ParentEstate = parentEstate; | ||
8155 | cr.Data.SnapshotID = snapshotID; | ||
8156 | cr.Data.SimName = Utils.StringToBytes(simName); | ||
8157 | cr.Data.PosGlobal = new Vector3d(globalPos); | ||
8158 | cr.Data.ParcelName = Utils.StringToBytes(parcelName); | ||
8159 | cr.Data.ClassifiedFlags = classifiedFlags; | ||
8160 | cr.Data.PriceForListing = price; | ||
8161 | |||
8162 | OutPacket(cr, ThrottleOutPacketType.Task); | ||
8163 | } | ||
8164 | |||
8047 | public void KillEndDone() | 8165 | public void KillEndDone() |
8048 | { | 8166 | { |
8049 | KillPacket kp = new KillPacket(); | 8167 | KillPacket kp = new KillPacket(); |
diff --git a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs index 6ca2bb4..a1e7ade 100644 --- a/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs +++ b/OpenSim/Region/Environment/Modules/World/NPC/NPCAvatar.cs | |||
@@ -346,6 +346,10 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
346 | public event TeleportLureRequest OnTeleportLureRequest; | 346 | public event TeleportLureRequest OnTeleportLureRequest; |
347 | public event NetworkStats OnNetworkStatsUpdate; | 347 | public event NetworkStats OnNetworkStatsUpdate; |
348 | 348 | ||
349 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | ||
350 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | ||
351 | public event ClassifiedDelete OnClassifiedDelete; | ||
352 | public event ClassifiedDelete OnClassifiedGodDelete; | ||
349 | 353 | ||
350 | #pragma warning restore 67 | 354 | #pragma warning restore 67 |
351 | 355 | ||
@@ -1007,6 +1011,14 @@ namespace OpenSim.Region.Environment.Modules.World.NPC | |||
1007 | throw new NotImplementedException(); | 1011 | throw new NotImplementedException(); |
1008 | } | 1012 | } |
1009 | 1013 | ||
1014 | public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) | ||
1015 | { | ||
1016 | } | ||
1017 | |||
1018 | public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) | ||
1019 | { | ||
1020 | } | ||
1021 | |||
1010 | #endregion | 1022 | #endregion |
1011 | } | 1023 | } |
1012 | } | 1024 | } |
diff --git a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs index 4cd5187..e06c4c0 100644 --- a/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs +++ b/OpenSim/Region/Examples/SimpleModule/MyNpcCharacter.cs | |||
@@ -241,6 +241,11 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
241 | public event TeleportLureRequest OnTeleportLureRequest; | 241 | public event TeleportLureRequest OnTeleportLureRequest; |
242 | public event NetworkStats OnNetworkStatsUpdate; | 242 | public event NetworkStats OnNetworkStatsUpdate; |
243 | 243 | ||
244 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | ||
245 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | ||
246 | public event ClassifiedDelete OnClassifiedDelete; | ||
247 | public event ClassifiedDelete OnClassifiedGodDelete; | ||
248 | |||
244 | #pragma warning restore 67 | 249 | #pragma warning restore 67 |
245 | 250 | ||
246 | private UUID myID = UUID.Random(); | 251 | private UUID myID = UUID.Random(); |
@@ -1007,6 +1012,14 @@ namespace OpenSim.Region.Examples.SimpleModule | |||
1007 | return true; | 1012 | return true; |
1008 | } | 1013 | } |
1009 | 1014 | ||
1015 | public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) | ||
1016 | { | ||
1017 | } | ||
1018 | |||
1019 | public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) | ||
1020 | { | ||
1021 | } | ||
1022 | |||
1010 | #endregion | 1023 | #endregion |
1011 | } | 1024 | } |
1012 | } | 1025 | } |
diff --git a/OpenSim/Tests/Common/Mock/TestClient.cs b/OpenSim/Tests/Common/Mock/TestClient.cs index 70a2d11..e7cdee9 100644 --- a/OpenSim/Tests/Common/Mock/TestClient.cs +++ b/OpenSim/Tests/Common/Mock/TestClient.cs | |||
@@ -237,6 +237,11 @@ namespace OpenSim.Tests.Common.Mock | |||
237 | public event TeleportLureRequest OnTeleportLureRequest; | 237 | public event TeleportLureRequest OnTeleportLureRequest; |
238 | public event NetworkStats OnNetworkStatsUpdate; | 238 | public event NetworkStats OnNetworkStatsUpdate; |
239 | 239 | ||
240 | public event ClassifiedInfoRequest OnClassifiedInfoRequest; | ||
241 | public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; | ||
242 | public event ClassifiedDelete OnClassifiedDelete; | ||
243 | public event ClassifiedDelete OnClassifiedGodDelete; | ||
244 | |||
240 | #pragma warning restore 67 | 245 | #pragma warning restore 67 |
241 | 246 | ||
242 | /// <value> | 247 | /// <value> |
@@ -953,5 +958,13 @@ namespace OpenSim.Tests.Common.Mock | |||
953 | return false; | 958 | return false; |
954 | } | 959 | } |
955 | 960 | ||
961 | public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) | ||
962 | { | ||
963 | } | ||
964 | |||
965 | public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) | ||
966 | { | ||
967 | } | ||
968 | |||
956 | } | 969 | } |
957 | } | 970 | } |