From e1eb1b2cfae7bb18f6004d5c9705eba9f7f300c8 Mon Sep 17 00:00:00 2001
From: MW
Date: Mon, 12 Jan 2009 10:16:33 +0000
Subject: a little bit more work on LLFileTransfer.cs, from over the
christmas/new year period. Still not working/in use but hopefully I can
finish it soon.
---
OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
(limited to 'OpenSim/Region/ClientStack')
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs
index e5783de..517de34 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLFileTransfer.cs
@@ -55,7 +55,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
///
- /// Dictionary of files to be sent to clients
+ /// Dictionary of files ready to be sent to clients
///
protected static Dictionary m_files;
@@ -71,7 +71,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
m_clientAPI = clientAPI;
m_clientAPI.OnXferReceive += XferReceive;
- m_clientAPI.OnAbortXfer += AbortXferHandler;
+ m_clientAPI.OnAbortXfer += AbortXferUploadHandler;
}
public void Close()
@@ -79,11 +79,13 @@ namespace OpenSim.Region.ClientStack.LindenUDP
if (m_clientAPI != null)
{
m_clientAPI.OnXferReceive -= XferReceive;
- m_clientAPI.OnAbortXfer -= AbortXferHandler;
+ m_clientAPI.OnAbortXfer -= AbortXferUploadHandler;
m_clientAPI = null;
}
}
+ #region Upload Handling
+
public bool RequestUpload(string clientFileName, UploadComplete uploadCompleteCallback, UploadAborted abortCallback)
{
if ((String.IsNullOrEmpty(clientFileName)) || (uploadCompleteCallback == null))
@@ -111,7 +113,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
private bool StartUpload(XferUploadHandler uploader, UploadComplete uploadCompleteCallback, UploadAborted abortCallback)
{
uploader.UploadDone += uploadCompleteCallback;
- uploader.UploadDone += RemoveXferHandler;
+ uploader.UploadDone += RemoveXferUploadHandler;
if (abortCallback != null)
{
@@ -130,7 +132,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
{
// something went wrong with the xferID allocation
uploader.UploadDone -= uploadCompleteCallback;
- uploader.UploadDone -= RemoveXferHandler;
+ uploader.UploadDone -= RemoveXferUploadHandler;
if (abortCallback != null)
{
uploader.UploadAborted -= abortCallback;
@@ -140,7 +142,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
- protected void AbortXferHandler(IClientAPI remoteClient, ulong xferID)
+ protected void AbortXferUploadHandler(IClientAPI remoteClient, ulong xferID)
{
lock (m_uploadHandlersLock)
{
@@ -163,10 +165,12 @@ namespace OpenSim.Region.ClientStack.LindenUDP
}
}
- protected void RemoveXferHandler(string filename, UUID fileID, ulong transferID, byte[] fileData, IClientAPI remoteClient)
+ protected void RemoveXferUploadHandler(string filename, UUID fileID, ulong transferID, byte[] fileData, IClientAPI remoteClient)
{
}
+ #endregion
+
}
public class XferUploadHandler
--
cgit v1.1