From 9d1b42c39a779c84dd091a817d2f6e5f434777c4 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Tue, 25 Mar 2008 03:49:08 +0000
Subject: Comment out unused private methods.
---
.../Communications/RestClient/RestClient.cs | 101 ++++++++--------
OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs | 13 +-
OpenSim/Framework/Data.MySQL/MySQLDataStore.cs | 78 ++++++------
OpenSim/Framework/Data.SQLite/SQLiteManager.cs | 134 +++++++++++----------
OpenSim/Framework/Data.SQLite/SQLiteUserData.cs | 27 +++--
5 files changed, 181 insertions(+), 172 deletions(-)
(limited to 'OpenSim/Framework')
diff --git a/OpenSim/Framework/Communications/RestClient/RestClient.cs b/OpenSim/Framework/Communications/RestClient/RestClient.cs
index 7212e5e..1178fed 100644
--- a/OpenSim/Framework/Communications/RestClient/RestClient.cs
+++ b/OpenSim/Framework/Communications/RestClient/RestClient.cs
@@ -195,15 +195,16 @@ namespace OpenSim.Framework.Communications
return s.Substring(s.Length - 1, 1) == "/";
}
- ///
- /// return a slash or blank. A slash will be returned if the string does not contain one
- ///
- /// stromg to be examined
- /// slash '/' if not already present
- private string slash(string s)
- {
- return isSlashed(s) ? String.Empty : "/";
- }
+// TODO: unused
+// ///
+// /// return a slash or blank. A slash will be returned if the string does not contain one
+// ///
+// /// stromg to be examined
+// /// slash '/' if not already present
+// private string slash(string s)
+// {
+// return isSlashed(s) ? String.Empty : "/";
+// }
///
/// Build a Uri based on the initial Url, path elements and parameters
@@ -278,46 +279,48 @@ namespace OpenSim.Framework.Communications
}
}
- ///
- /// Async method, invoked when the initial response if received from the server
- ///
- ///
- 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;
- }
- }
-
- // 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();
- }
- }
- }
+// TODO: unused
+// ///
+// /// Async method, invoked when the initial response if received from the server
+// ///
+// ///
+// 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
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs b/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs
index c86cfb6..d34abe3 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLDataStore.cs
@@ -1351,12 +1351,13 @@ namespace OpenSim.Framework.Data.MSSQL
return param;
}
- private SqlParameter createParamWithValue(string name, Type type, Object o)
- {
- SqlParameter param = createSqlParameter(name, type);
- param.Value = o;
- 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)
{
diff --git a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
index b1ab42fd..eaa7f14 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLDataStore.cs
@@ -478,38 +478,39 @@ namespace OpenSim.Framework.Data.MySQL
return landDataForRegion;
}
- 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);
- }
- }
- }
+// 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()
{
@@ -1397,12 +1398,13 @@ namespace OpenSim.Framework.Data.MySQL
return param;
}
- private MySqlParameter createParamWithValue(string name, Type type, Object o)
- {
- MySqlParameter param = createMySqlParameter(name, type);
- param.Value = o;
- 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)
{
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
index 4dd89f5..bec0cd8 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteManager.cs
@@ -92,72 +92,74 @@ namespace OpenSim.Framework.Data.SQLite
return (IDbCommand) dbcommand;
}
- 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;
- }
-
- 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;
- }
-
- private void InitDB(SQLiteConnection conn)
- {
- string createUsers = defineTable(createRegionsTable());
- SQLiteCommand pcmd = new SQLiteCommand(createUsers, conn);
- conn.Open();
- pcmd.ExecuteNonQuery();
- conn.Close();
- }
-
+// 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();
+// }
///
/// Reads a region row from a database reader
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index d65e8d5..0b2df9d 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -624,19 +624,20 @@ namespace OpenSim.Framework.Data.SQLite
return user;
}
- private void fillFriendRow(DataRow row, LLUUID ownerID, LLUUID friendID, uint perms)
- {
- row["ownerID"] = ownerID.UUID.ToString();
- row["friendID"] = friendID.UUID.ToString();
- row["friendPerms"] = perms;
- foreach (DataColumn col in ds.Tables["userfriends"].Columns)
- {
- if (row[col] == null)
- {
- row[col] = String.Empty;
- }
- }
- }
+// TODO: unused
+// private void fillFriendRow(DataRow row, LLUUID ownerID, LLUUID friendID, uint perms)
+// {
+// row["ownerID"] = ownerID.UUID.ToString();
+// row["friendID"] = friendID.UUID.ToString();
+// row["friendPerms"] = perms;
+// foreach (DataColumn col in ds.Tables["userfriends"].Columns)
+// {
+// if (row[col] == null)
+// {
+// row[col] = String.Empty;
+// }
+// }
+// }
private void fillUserRow(DataRow row, UserProfileData user)
{
--
cgit v1.1