aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules/TextureNotFoundSender.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Environment/Modules/TextureNotFoundSender.cs')
-rw-r--r--OpenSim/Region/Environment/Modules/TextureNotFoundSender.cs75
1 files changed, 75 insertions, 0 deletions
diff --git a/OpenSim/Region/Environment/Modules/TextureNotFoundSender.cs b/OpenSim/Region/Environment/Modules/TextureNotFoundSender.cs
new file mode 100644
index 0000000..f85e900
--- /dev/null
+++ b/OpenSim/Region/Environment/Modules/TextureNotFoundSender.cs
@@ -0,0 +1,75 @@
1/*
2 * Created by SharpDevelop.
3 * User: caseyj
4 * Date: 25/02/2008
5 * Time: 21:30
6 *
7 * To change this template use Tools | Options | Coding | Edit Standard Headers.
8 */
9
10using System;
11
12using libsecondlife;
13using libsecondlife.Packets;
14
15using OpenSim.Framework;
16using OpenSim.Region.Environment.Interfaces;
17
18namespace OpenSim.Region.Environment.Modules
19{
20 /// <summary>
21 /// Sends a 'texture not found' packet back to the client
22 /// </summary>
23 public class TextureNotFoundSender : ITextureSender
24 {
25 //private static readonly log4net.ILog m_log
26 // = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
27
28 private LLUUID m_textureId;
29 private IClientAPI m_client;
30
31 // See ITextureSender
32 public bool Sending
33 {
34 get { return false; }
35 set { m_sending = value; }
36 }
37
38 private bool m_sending = false;
39
40 // See ITextureSender
41 public bool Cancel
42 {
43 get { return false; }
44 set { m_cancel = value; }
45 }
46
47 private bool m_cancel = false;
48
49 public TextureNotFoundSender(IClientAPI client, LLUUID textureID)
50 {
51 m_client = client;
52 m_textureId = textureID;
53 }
54
55 // See ITextureSender
56 public void UpdateRequest(int discardLevel, uint packetNumber)
57 {
58 // Not need to implement since priority changes don't affect this operation
59 }
60
61 // See ITextureSender
62 public bool SendTexturePacket()
63 {
64 //m_log.InfoFormat(
65 // "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found",
66 // m_textureId);
67
68 ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket();
69 notFound.ImageID.ID = m_textureId;
70 m_client.OutPacket(notFound, ThrottleOutPacketType.Unknown);
71
72 return true;
73 }
74 }
75}