* Spring cleaned a bunch of '//TODO: unused' marked functions.

0.6.0-stable
Adam Frisby 2008-04-30 23:11:07 +00:00
parent b67cf72bc3
commit 25a49ac4de
12 changed files with 0 additions and 414 deletions

View File

@ -1350,14 +1350,6 @@ namespace OpenSim.Data.MSSQL
return param;
}
// TODO: unused
// private SqlParameter createParamWithValue(string name, Type type, Object o)
// {
// SqlParameter param = createSqlParameter(name, type);
// param.Value = o;
// return param;
// }
private void setupPrimCommands(SqlDataAdapter da, SqlConnection conn)
{
da.InsertCommand = createInsertCommand("prims", m_dataSet.Tables["prims"]);

View File

@ -586,40 +586,6 @@ namespace OpenSim.Data.MySQL
return landDataForRegion;
}
// TODO: unused
// private void DisplayDataSet(DataSet ds, string title)
// {
// Debug.WriteLine(title);
// //--- Loop through the DataTables
// foreach (DataTable table in ds.Tables)
// {
// Debug.WriteLine("*** DataTable: " + table.TableName + "***");
// //--- Loop through each DataTable's DataRows
// foreach (DataRow row in table.Rows)
// {
// //--- Display the original values, if there are any.
// if (row.HasVersion(DataRowVersion.Original))
// {
// Debug.Write("Original Row Values ===> ");
// foreach (DataColumn column in table.Columns)
// Debug.Write(column.ColumnName + " = " +
// row[column, DataRowVersion.Original] + ", ");
// Debug.WriteLine(String.Empty);
// }
// //--- Display the current values, if there are any.
// if (row.HasVersion(DataRowVersion.Current))
// {
// Debug.Write("Current Row Values ====> ");
// foreach (DataColumn column in table.Columns)
// Debug.Write(column.ColumnName + " = " +
// row[column, DataRowVersion.Current] + ", ");
// Debug.WriteLine(String.Empty);
// }
// Debug.WriteLine(String.Empty);
// }
// }
// }
public void Commit()
{
if (m_connection.State != ConnectionState.Open)
@ -1515,14 +1481,6 @@ namespace OpenSim.Data.MySQL
return param;
}
// TODO: unused
// private MySqlParameter createParamWithValue(string name, Type type, Object o)
// {
// MySqlParameter param = createMySqlParameter(name, type);
// param.Value = o;
// return param;
// }
private void SetupPrimCommands(MySqlDataAdapter da, MySqlConnection conn)
{
MySqlCommand insertCommand = createInsertCommand("prims", m_primTable);

View File

@ -92,75 +92,6 @@ namespace OpenSim.Data.SQLite
return (IDbCommand) dbcommand;
}
// TODO: unused
// private bool TestTables(SQLiteConnection conn)
// {
// SQLiteCommand cmd = new SQLiteCommand("SELECT * FROM regions", conn);
// SQLiteDataAdapter pDa = new SQLiteDataAdapter(cmd);
// DataSet tmpDS = new DataSet();
// try
// {
// pDa.Fill(tmpDS, "regions");
// }
// catch (SqliteSyntaxException)
// {
// m_log.Info("[DATASTORE]: SQLite Database doesn't exist... creating");
// InitDB(conn);
// }
// return true;
// }
// TODO: unused
// private DataTable createRegionsTable()
// {
// DataTable regions = new DataTable("regions");
// createCol(regions, "regionHandle", typeof (ulong));
// createCol(regions, "regionName", typeof (String));
// createCol(regions, "uuid", typeof (String));
// createCol(regions, "regionRecvKey", typeof (String));
// createCol(regions, "regionSecret", typeof (String));
// createCol(regions, "regionSendKey", typeof (String));
// createCol(regions, "regionDataURI", typeof (String));
// createCol(regions, "serverIP", typeof (String));
// createCol(regions, "serverPort", typeof (String));
// createCol(regions, "serverURI", typeof (String));
// createCol(regions, "locX", typeof (uint));
// createCol(regions, "locY", typeof (uint));
// createCol(regions, "locZ", typeof (uint));
// createCol(regions, "eastOverrideHandle", typeof (ulong));
// createCol(regions, "westOverrideHandle", typeof (ulong));
// createCol(regions, "southOverrideHandle", typeof (ulong));
// createCol(regions, "northOverrideHandle", typeof (ulong));
// createCol(regions, "regionAssetURI", typeof (String));
// createCol(regions, "regionAssetRecvKey", typeof (String));
// createCol(regions, "regionAssetSendKey", typeof (String));
// createCol(regions, "regionUserURI", typeof (String));
// createCol(regions, "regionUserRecvKey", typeof (String));
// createCol(regions, "regionUserSendKey", typeof (String));
// // Add in contraints
// regions.PrimaryKey = new DataColumn[] {regions.Columns["UUID"]};
// return regions;
// }
// TODO: unused
// private void InitDB(SQLiteConnection conn)
// {
// string createUsers = defineTable(createRegionsTable());
// SQLiteCommand pcmd = new SQLiteCommand(createUsers, conn);
// conn.Open();
// pcmd.ExecuteNonQuery();
// conn.Close();
// }
/// <summary>
/// Reads a region row from a database reader
/// </summary>

View File

@ -196,17 +196,6 @@ namespace OpenSim.Framework.Communications
return s.Substring(s.Length - 1, 1) == "/";
}
// TODO: unused
// /// <summary>
// /// return a slash or blank. A slash will be returned if the string does not contain one
// /// </summary>
// /// <param name="s">stromg to be examined</param>
// /// <returns>slash '/' if not already present</returns>
// private string slash(string s)
// {
// return isSlashed(s) ? String.Empty : "/";
// }
/// <summary>
/// Build a Uri based on the initial Url, path elements and parameters
/// </summary>
@ -280,49 +269,6 @@ namespace OpenSim.Framework.Communications
}
}
// TODO: unused
// /// <summary>
// /// Async method, invoked when the initial response if received from the server
// /// </summary>
// /// <param name="ar"></param>
// private void ResponseIsReadyDelegate(IAsyncResult ar)
// {
// try
// {
// // grab response
// WebRequest wr = (WebRequest) ar.AsyncState;
// _response = (HttpWebResponse) wr.EndGetResponse(ar);
// // get response stream, and setup async reading
// Stream s = _response.GetResponseStream();
// IAsyncResult asynchronousResult =
// s.BeginRead(_readbuf, 0, BufferSize, new AsyncCallback(StreamIsReadyDelegate), s);
// // TODO! Implement timeout, without killing the server
// // wait until completed, or we timed out
// // ThreadPool.RegisterWaitForSingleObject(asynchronousResult.AsyncWaitHandle, new WaitOrTimerCallback(TimeoutCallback), _request, DefaultTimeout, true);
// }
// catch (Exception e)
// {
// _allDone.Set();
// _asyncException = e;
// }
// }
// TODO: unused
// // Abort the request if the timer fires.
// private static void TimeoutCallback(object state, bool timedOut)
// {
// if (timedOut)
// {
// HttpWebRequest request = state as HttpWebRequest;
// if (request != null)
// {
// request.Abort();
// }
// }
// }
#endregion Async communications with server
/// <summary>

View File

@ -38,18 +38,5 @@ namespace OpenSim.Grid.ScriptServer
m_ScriptServerMain = scm;
m_Connection = Connection;
}
// TODO: unused:
// private void DataReceived(object objectID, object scriptID)
// {
// // TODO: HOW DO WE RECEIVE DATA? ASYNC?
// // ANYHOW WE END UP HERE?
// // NEW SCRIPT? ASK SCRIPTENGINE TO INITIALIZE IT
// ScriptRez();
// // EVENT? DELIVER EVENT DIRECTLY TO SCRIPTENGINE
// touch_start();
// }
}
}

View File

@ -178,120 +178,6 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
}
}
// TODO: unused
// private void RunAssetQueue()
// {
// while (true)
// {
// try
// {
// ProcessAssetQueue();
// Thread.Sleep(500);
// }
// catch (Exception)
// {
// // m_log.Error("[ASSET CACHE]: " + e.ToString());
// }
// }
// }
// TODO: unused
// /// <summary>
// /// Process the asset queue which sends packets directly back to the client.
// /// </summary>
// private void ProcessAssetQueue()
// {
// //should move the asset downloading to a module, like has been done with texture downloading
// if (AssetRequests.Count == 0)
// {
// //no requests waiting
// return;
// }
// // if less than 5, do all of them
// int num = Math.Min(5, AssetRequests.Count);
// AssetRequest req;
// for (int i = 0; i < num; i++)
// {
// req = (AssetRequest)AssetRequests[i];
// //Console.WriteLine("sending asset " + req.RequestAssetID);
// TransferInfoPacket Transfer = new TransferInfoPacket();
// Transfer.TransferInfo.ChannelType = 2;
// Transfer.TransferInfo.Status = 0;
// Transfer.TransferInfo.TargetType = 0;
// if (req.AssetRequestSource == 2)
// {
// Transfer.TransferInfo.Params = new byte[20];
// Array.Copy(req.RequestAssetID.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
// int assType = (int)req.AssetInf.Type;
// Array.Copy(Helpers.IntToBytes(assType), 0, Transfer.TransferInfo.Params, 16, 4);
// }
// else if (req.AssetRequestSource == 3)
// {
// Transfer.TransferInfo.Params = req.Params;
// // Transfer.TransferInfo.Params = new byte[100];
// //Array.Copy(req.RequestUser.AgentId.GetBytes(), 0, Transfer.TransferInfo.Params, 0, 16);
// //Array.Copy(req.RequestUser.SessionId.GetBytes(), 0, Transfer.TransferInfo.Params, 16, 16);
// }
// Transfer.TransferInfo.Size = (int)req.AssetInf.Data.Length;
// Transfer.TransferInfo.TransferID = req.TransferRequestID;
// req.RequestUser.OutPacket(Transfer, ThrottleOutPacketType.Asset);
// if (req.NumPackets == 1)
// {
// TransferPacketPacket TransferPacket = new TransferPacketPacket();
// TransferPacket.TransferData.Packet = 0;
// TransferPacket.TransferData.ChannelType = 2;
// TransferPacket.TransferData.TransferID = req.TransferRequestID;
// TransferPacket.TransferData.Data = req.AssetInf.Data;
// TransferPacket.TransferData.Status = 1;
// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
// }
// else
// {
// int processedLength = 0;
// // libsecondlife hardcodes 1500 as the maximum data chunk size
// int maxChunkSize = 1250;
// int packetNumber = 0;
// while (processedLength < req.AssetInf.Data.Length)
// {
// TransferPacketPacket TransferPacket = new TransferPacketPacket();
// TransferPacket.TransferData.Packet = packetNumber;
// TransferPacket.TransferData.ChannelType = 2;
// TransferPacket.TransferData.TransferID = req.TransferRequestID;
// int chunkSize = Math.Min(req.AssetInf.Data.Length - processedLength, maxChunkSize);
// byte[] chunk = new byte[chunkSize];
// Array.Copy(req.AssetInf.Data, processedLength, chunk, 0, chunk.Length);
// TransferPacket.TransferData.Data = chunk;
// // 0 indicates more packets to come, 1 indicates last packet
// if (req.AssetInf.Data.Length - processedLength > maxChunkSize)
// {
// TransferPacket.TransferData.Status = 0;
// }
// else
// {
// TransferPacket.TransferData.Status = 1;
// }
// req.RequestUser.OutPacket(TransferPacket, ThrottleOutPacketType.Asset);
// processedLength += chunkSize;
// packetNumber++;
// }
// }
// }
// //remove requests that have been completed
// for (int i = 0; i < num; i++)
// {
// AssetRequests.RemoveAt(0);
// }
// }
/// <summary>
/// Calculate the number of packets required to send the asset to the client.
/// </summary>

View File

@ -239,12 +239,6 @@ namespace OpenSim.Region.Environment.Modules.Scripting.DynamicTexture
part.ScheduleFullUpdate();
}
// TODO: unused
// private byte[] BlendTextures(byte[] frontImage, byte[] backImage)
// {
// return BlendTextures(frontImage, backImage, false, 0);
// }
private byte[] BlendTextures(byte[] frontImage, byte[] backImage, bool setNewAlpha, byte newAlpha)
{
Bitmap image1 = new Bitmap(OpenJPEG.DecodeToImage(frontImage));

View File

@ -31,39 +31,6 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
public class FlattenSphere : ITerrainPaintableEffect
{
// TODO: unused
// private double GetBilinearInterpolate(double x, double y, ITerrainChannel map)
// {
// int w = map.Width;
// int h = map.Height;
// if (x > w - 2.0)
// x = w - 2.0;
// if (y > h - 2.0)
// y = h - 2.0;
// if (x < 0.0)
// x = 0.0;
// if (y < 0.0)
// y = 0.0;
// int stepSize = 1;
// double h00 = map[(int)x, (int)y];
// double h10 = map[(int)x + stepSize, (int)y];
// double h01 = map[(int)x, (int)y + stepSize];
// double h11 = map[(int)x + stepSize, (int)y + stepSize];
// double h1 = h00;
// double h2 = h10;
// double h3 = h01;
// double h4 = h11;
// double a00 = h1;
// double a10 = h2 - h1;
// double a01 = h3 - h1;
// double a11 = h1 - h2 - h3 + h4;
// double partialx = x - (int)x;
// double partialz = y - (int)y;
// double hi = a00 + (a10 * partialx) + (a01 * partialz) + (a11 * partialx * partialz);
// return hi;
// }
#region ITerrainPaintableEffect Members

View File

@ -794,28 +794,6 @@ namespace OpenSim.Region.Environment.Scenes
}
}
//Updates the time in the viewer.
// TODO: unused
// private void UpdateInWorldTime()
// {
// m_timeUpdateCount++;
// if (m_timeUpdateCount > 600)
// {
// List<ScenePresence> avatars = GetAvatars();
// foreach (ScenePresence avatar in avatars)
// {
// avatar.ControllingClient.SendViewerTime(m_timePhase);
// }
// m_timeUpdateCount = 0;
// m_timePhase++;
// if (m_timePhase > 94)
// {
// m_timePhase = 0;
// }
// }
// }
private void SendSimStatsPackets(SimStatsPacket pack)
{
List<ScenePresence> StatSendAgents = GetScenePresences();

View File

@ -71,24 +71,5 @@ namespace OpenSim.Region.ExtensionsScriptModule.CSharp.Examples
System.Console.WriteLine(sequence);
}*/
}
// TODO: unused
// private string processPrimitiveToString(SceneObjectPart prim)
// {
// /*string desc = prim.Description;
// string name = prim.Name;
// LLVector3 pos = prim.Pos;
// LLQuaternion rot = new LLQuaternion(prim.Rotation.x, prim.Rotation.y, prim.Rotation.z, prim.Rotation.w);
// LLVector3 scale = prim.Scale;
// LLVector3 rootPos = prim.WorldPos;
// string setPrimParams = String.Empty;
// setPrimParams += "[PRIM_SCALE, " + scale.ToString() + ", PRIM_POS, " + rootPos.ToString() + ", PRIM_ROTATION, " + rot.ToString() + "]\n";
// return setPrimParams;
// */
// return System.String.Empty;
// }
}
}

View File

@ -179,23 +179,6 @@ namespace OpenSim.TestSuite
return new ConsoleBase("Region", this);
}
/// <summary>
/// I don't think the bots use this..
/// </summary>
/// <param name="commandParams"></param>
/// <param name="pos"></param>
/// <returns></returns>
// TODO: unused: private string CombineParams(string[] commandParams, int pos)
// TODO: unused: {
// TODO: unused: string result = String.Empty;
// TODO: unused: for (int i = pos; i < commandParams.Length; i++)
// TODO: unused: {
// TODO: unused: result += commandParams[i] + " ";
// TODO: unused: }
// TODO: unused: result = result.TrimEnd(' ');
// TODO: unused: return result;
// TODO: unused: }
/// <summary>
/// Command runnint tool.. Currently use it to add bots, shutdown and (dangerous)Forcequit
/// </summary>

View File

@ -178,23 +178,6 @@ namespace pCampBot
return new ConsoleBase("Region", this);
}
/// <summary>
/// I don't think the bots use this..
/// </summary>
/// <param name="commandParams"></param>
/// <param name="pos"></param>
/// <returns></returns>
// TODO: unused: private string CombineParams(string[] commandParams, int pos)
// TODO: unused: {
// TODO: unused: string result = String.Empty;
// TODO: unused: for (int i = pos; i < commandParams.Length; i++)
// TODO: unused: {
// TODO: unused: result += commandParams[i] + " ";
// TODO: unused: }
// TODO: unused: result = result.TrimEnd(' ');
// TODO: unused: return result;
// TODO: unused: }
/// <summary>
/// Command runnint tool.. Currently use it to add bots, shutdown and (dangerous)Forcequit
/// </summary>