aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorMelanie2010-01-09 12:02:48 +0000
committerMelanie2010-01-09 12:02:48 +0000
commitd22bdb5095a6f08271014a52f91aadaff5ae9083 (patch)
tree76a09afdbae760025e0fc2d9306823d343ead349 /OpenSim/Framework
parentMaintain control() event stream (diff)
parentMerge branch 'master' of melanie@opensimulator.org:/var/git/opensim (diff)
downloadopensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.zip
opensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.tar.gz
opensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.tar.bz2
opensim-SC_OLD-d22bdb5095a6f08271014a52f91aadaff5ae9083.tar.xz
Merge branch 'master' into careminster
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs8
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs106
-rw-r--r--OpenSim/Framework/GroupData.cs26
-rw-r--r--OpenSim/Framework/IClientAPI.cs29
4 files changed, 122 insertions, 47 deletions
diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs
index 9671bc2..66f483c 100644
--- a/OpenSim/Framework/Console/CommandConsole.cs
+++ b/OpenSim/Framework/Console/CommandConsole.cs
@@ -552,8 +552,9 @@ namespace OpenSim.Framework.Console
552 } 552 }
553 } 553 }
554 554
555 // A console that processes commands internally 555 /// <summary>
556 // 556 /// A console that processes commands internally
557 /// </summary>
557 public class CommandConsole : ConsoleBase 558 public class CommandConsole : ConsoleBase
558 { 559 {
559 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 560 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -574,6 +575,9 @@ namespace OpenSim.Framework.Console
574 Output(s); 575 Output(s);
575 } 576 }
576 577
578 /// <summary>
579 /// Display a command prompt on the console and wait for user input
580 /// </summary>
577 public void Prompt() 581 public void Prompt()
578 { 582 {
579 string line = ReadLine(m_defaultPrompt + "# ", true, true); 583 string line = ReadLine(m_defaultPrompt + "# ", true, true);
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index 39edd2a..b7e191b 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -36,8 +36,9 @@ using log4net;
36 36
37namespace OpenSim.Framework.Console 37namespace OpenSim.Framework.Console
38{ 38{
39 // A console that uses cursor control and color 39 /// <summary>
40 // 40 /// A console that uses cursor control and color
41 /// </summary>
41 public class LocalConsole : CommandConsole 42 public class LocalConsole : CommandConsole
42 { 43 {
43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -85,30 +86,70 @@ namespace OpenSim.Framework.Console
85 history.Add(text); 86 history.Add(text);
86 } 87 }
87 88
89 /// <summary>
90 /// Set the cursor row.
91 /// </summary>
92 ///
93 /// <param name="top">
94 /// Row to set. If this is below 0, then the row is set to 0. If it is equal to the buffer height or greater
95 /// then it is set to one less than the height.
96 /// </param>
97 /// <returns>
98 /// The new cursor row.
99 /// </returns>
88 private int SetCursorTop(int top) 100 private int SetCursorTop(int top)
89 { 101 {
90 if (top >= 0 && top < System.Console.BufferHeight) 102 // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
91 { 103 // to set a cursor row position with a currently invalid column, mono will throw an exception.
92 System.Console.CursorTop = top; 104 // Therefore, we need to make sure that the column position is valid first.
93 return top; 105 int left = System.Console.CursorLeft;
94 } 106
95 else 107 if (left < 0)
96 { 108 System.Console.CursorLeft = 0;
97 return System.Console.CursorTop; 109 else if (left >= System.Console.BufferWidth)
98 } 110 System.Console.CursorLeft = System.Console.BufferWidth - 1;
111
112 if (top < 0)
113 top = 0;
114 if (top >= System.Console.BufferHeight)
115 top = System.Console.BufferHeight - 1;
116
117 System.Console.CursorTop = top;
118
119 return top;
99 } 120 }
100 121
122 /// <summary>
123 /// Set the cursor column.
124 /// </summary>
125 ///
126 /// <param name="left">
127 /// Column to set. If this is below 0, then the column is set to 0. If it is equal to the buffer width or greater
128 /// then it is set to one less than the width.
129 /// </param>
130 /// <returns>
131 /// The new cursor column.
132 /// </returns>
101 private int SetCursorLeft(int left) 133 private int SetCursorLeft(int left)
102 { 134 {
103 if (left >= 0 && left < System.Console.BufferWidth) 135 // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
104 { 136 // to set a cursor column position with a currently invalid row, mono will throw an exception.
105 System.Console.CursorLeft = left; 137 // Therefore, we need to make sure that the row position is valid first.
106 return left; 138 int top = System.Console.CursorTop;
107 } 139
108 else 140 if (top < 0)
109 { 141 System.Console.CursorTop = 0;
110 return System.Console.CursorLeft; 142 else if (top >= System.Console.BufferHeight)
111 } 143 System.Console.CursorTop = System.Console.BufferHeight - 1;
144
145 if (left < 0)
146 left = 0;
147 if (left >= System.Console.BufferWidth)
148 left = System.Console.BufferWidth - 1;
149
150 System.Console.CursorLeft = left;
151
152 return left;
112 } 153 }
113 154
114 private void Show() 155 private void Show()
@@ -128,21 +169,21 @@ namespace OpenSim.Framework.Console
128 { 169 {
129 y--; 170 y--;
130 new_y--; 171 new_y--;
131 System.Console.CursorLeft = 0; 172 SetCursorLeft(0);
132 System.Console.CursorTop = System.Console.BufferHeight-1; 173 SetCursorTop(System.Console.BufferHeight - 1);
133 System.Console.WriteLine(" "); 174 System.Console.WriteLine(" ");
134 } 175 }
135 176
136 y=SetCursorTop(y); 177 y = SetCursorTop(y);
137 System.Console.CursorLeft = 0; 178 SetCursorLeft(0);
138 179
139 if (echo) 180 if (echo)
140 System.Console.Write("{0}{1}", prompt, cmdline); 181 System.Console.Write("{0}{1}", prompt, cmdline);
141 else 182 else
142 System.Console.Write("{0}", prompt); 183 System.Console.Write("{0}", prompt);
143 184
144 SetCursorLeft(new_x);
145 SetCursorTop(new_y); 185 SetCursorTop(new_y);
186 SetCursorLeft(new_x);
146 } 187 }
147 } 188 }
148 189
@@ -162,8 +203,7 @@ namespace OpenSim.Framework.Console
162 System.Console.Write(" "); 203 System.Console.Write(" ");
163 204
164 y = SetCursorTop(y); 205 y = SetCursorTop(y);
165 System.Console.CursorLeft = 0; 206 SetCursorLeft(0);
166
167 } 207 }
168 } 208 }
169 catch (Exception) 209 catch (Exception)
@@ -252,7 +292,7 @@ namespace OpenSim.Framework.Console
252 } 292 }
253 293
254 y = SetCursorTop(y); 294 y = SetCursorTop(y);
255 System.Console.CursorLeft = 0; 295 SetCursorLeft(0);
256 296
257 int count = cmdline.Length + prompt.Length; 297 int count = cmdline.Length + prompt.Length;
258 298
@@ -260,7 +300,7 @@ namespace OpenSim.Framework.Console
260 System.Console.Write(" "); 300 System.Console.Write(" ");
261 301
262 y = SetCursorTop(y); 302 y = SetCursorTop(y);
263 System.Console.CursorLeft = 0; 303 SetCursorLeft(0);
264 304
265 WriteLocalText(text, level); 305 WriteLocalText(text, level);
266 306
@@ -299,7 +339,7 @@ namespace OpenSim.Framework.Console
299 echo = e; 339 echo = e;
300 int historyLine = history.Count; 340 int historyLine = history.Count;
301 341
302 System.Console.CursorLeft = 0; // Needed for mono 342 SetCursorLeft(0); // Needed for mono
303 System.Console.Write(" "); // Needed for mono 343 System.Console.Write(" "); // Needed for mono
304 344
305 lock (cmdline) 345 lock (cmdline)
@@ -339,7 +379,7 @@ namespace OpenSim.Framework.Console
339 cmdline.Remove(cp-1, 1); 379 cmdline.Remove(cp-1, 1);
340 cp--; 380 cp--;
341 381
342 System.Console.CursorLeft = 0; 382 SetCursorLeft(0);
343 y = SetCursorTop(y); 383 y = SetCursorTop(y);
344 384
345 System.Console.Write("{0}{1} ", prompt, cmdline); 385 System.Console.Write("{0}{1} ", prompt, cmdline);
@@ -387,7 +427,7 @@ namespace OpenSim.Framework.Console
387 cp++; 427 cp++;
388 break; 428 break;
389 case ConsoleKey.Enter: 429 case ConsoleKey.Enter:
390 System.Console.CursorLeft = 0; 430 SetCursorLeft(0);
391 y = SetCursorTop(y); 431 y = SetCursorTop(y);
392 432
393 System.Console.WriteLine("{0}{1}", prompt, cmdline); 433 System.Console.WriteLine("{0}{1}", prompt, cmdline);
@@ -424,4 +464,4 @@ namespace OpenSim.Framework.Console
424 } 464 }
425 } 465 }
426 } 466 }
427} 467} \ No newline at end of file
diff --git a/OpenSim/Framework/GroupData.cs b/OpenSim/Framework/GroupData.cs
index 247420e..e3b8626 100644
--- a/OpenSim/Framework/GroupData.cs
+++ b/OpenSim/Framework/GroupData.cs
@@ -135,4 +135,30 @@ namespace OpenSim.Framework
135 public bool HasAttachment; 135 public bool HasAttachment;
136 public byte AssetType; 136 public byte AssetType;
137 } 137 }
138
139 public struct GroupVoteHistory
140 {
141 public string VoteID;
142 public string VoteInitiator;
143 public string Majority;
144 public string Quorum;
145 public string TerseDateID;
146 public string StartDateTime;
147 public string EndDateTime;
148 public string VoteType;
149 public string VoteResult;
150 public string ProposalText;
151 }
152
153 public struct GroupActiveProposals
154 {
155 public string VoteID;
156 public string VoteInitiator;
157 public string Majority;
158 public string Quorum;
159 public string TerseDateID;
160 public string StartDateTime;
161 public string EndDateTime;
162 public string ProposalText;
163 }
138} 164}
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index defbbb9..861d05e 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -467,7 +467,7 @@ namespace OpenSim.Framework
467 467
468 public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); 468 public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
469 469
470 public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string summery, UUID reporter); 470 public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string Summary, UUID reporter);
471 471
472 public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY); 472 public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY);
473 473
@@ -1069,25 +1069,25 @@ namespace OpenSim.Framework
1069 1069
1070 event PlacesQuery OnPlacesQuery; 1070 event PlacesQuery OnPlacesQuery;
1071 1071
1072 event FindAgentUpdate OnFindAgentEvent; 1072 event FindAgentUpdate OnFindAgent;
1073 event TrackAgentUpdate OnTrackAgentEvent; 1073 event TrackAgentUpdate OnTrackAgent;
1074 event NewUserReport OnUserReportEvent; 1074 event NewUserReport OnUserReport;
1075 event SaveStateHandler OnSaveStateEvent; 1075 event SaveStateHandler OnSaveState;
1076 event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; 1076 event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
1077 event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; 1077 event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
1078 event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; 1078 event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
1079 event FreezeUserUpdate OnParcelFreezeUserEvent; 1079 event FreezeUserUpdate OnParcelFreezeUser;
1080 event EjectUserUpdate OnParcelEjectUserEvent; 1080 event EjectUserUpdate OnParcelEjectUser;
1081 event ParcelBuyPass OnParcelBuyPass; 1081 event ParcelBuyPass OnParcelBuyPass;
1082 event ParcelGodMark OnParcelGodMark; 1082 event ParcelGodMark OnParcelGodMark;
1083 event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; 1083 event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
1084 event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; 1084 event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
1085 event SimWideDeletesDelegate OnSimWideDeletes; 1085 event SimWideDeletesDelegate OnSimWideDeletes;
1086 event SendPostcard OnSendPostcard; 1086 event SendPostcard OnSendPostcard;
1087 event MuteListEntryUpdate OnUpdateMuteListEntryEvent; 1087 event MuteListEntryUpdate OnUpdateMuteListEntry;
1088 event MuteListEntryRemove OnRemoveMuteListEntryEvent; 1088 event MuteListEntryRemove OnRemoveMuteListEntry;
1089 event GodlikeMessage onGodlikeMessageEvent; 1089 event GodlikeMessage onGodlikeMessage;
1090 event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; 1090 event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
1091 1091
1092 /// <summary> 1092 /// <summary>
1093 /// Set the debug level at which packet output should be printed to console. 1093 /// Set the debug level at which packet output should be printed to console.
@@ -1446,7 +1446,12 @@ namespace OpenSim.Framework
1446 void SendUserInfoReply(bool imViaEmail, bool visible, string email); 1446 void SendUserInfoReply(bool imViaEmail, bool visible, string email);
1447 1447
1448 void SendUseCachedMuteList(); 1448 void SendUseCachedMuteList();
1449 void SendMuteListUpdate(string filename); 1449
1450 void SendMuteListUpdate(string filename);
1451
1452 void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals);
1453
1454 void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes);
1450 1455
1451 void KillEndDone(); 1456 void KillEndDone();
1452 1457