aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ClientStack
diff options
context:
space:
mode:
authorMelanie2010-01-08 05:29:29 +0000
committerMelanie2010-01-08 05:29:29 +0000
commit17efecd6c57c7abf6cc67bd9e347ec6176caab27 (patch)
tree2db34a14f2f2699cda16c3e7446c056b5f4f1ffd /OpenSim/Region/ClientStack
parentSecond Fix to the new Packets as per Melanie's request. (diff)
downloadopensim-SC_OLD-17efecd6c57c7abf6cc67bd9e347ec6176caab27.zip
opensim-SC_OLD-17efecd6c57c7abf6cc67bd9e347ec6176caab27.tar.gz
opensim-SC_OLD-17efecd6c57c7abf6cc67bd9e347ec6176caab27.tar.bz2
opensim-SC_OLD-17efecd6c57c7abf6cc67bd9e347ec6176caab27.tar.xz
Moving the new group data structures out of LLClientView into GroupData.
The new methods are still not in IClientAPI, so some work remains to be done.
Diffstat (limited to 'OpenSim/Region/ClientStack')
-rw-r--r--OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs78
1 files changed, 28 insertions, 50 deletions
diff --git a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
index 195e9aa..7d90a68 100644
--- a/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
+++ b/OpenSim/Region/ClientStack/LindenUDP/LLClientView.cs
@@ -824,21 +824,11 @@ namespace OpenSim.Region.ClientStack.LindenUDP
824 gmp.ParamList[i++].Parameter = Util.StringToBytes256(val); 824 gmp.ParamList[i++].Parameter = Util.StringToBytes256(val);
825 } 825 }
826 OutPacket(gmp, ThrottleOutPacketType.Task); 826 OutPacket(gmp, ThrottleOutPacketType.Task);
827 }
828 public struct GroupActiveProposals
829 {
830 public string VoteID;
831 public string VoteInitiator;
832 public string Majority;
833 public string Quorum;
834 public string TerseDateID;
835 public string StartDateTime;
836 public string EndDateTime;
837 public string ProposalText;
838 } 827 }
828
839 public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) 829 public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals)
840 { 830 {
841 int i = 0; 831 int i = 0;
842 foreach (GroupActiveProposals Proposal in Proposals) 832 foreach (GroupActiveProposals Proposal in Proposals)
843 { 833 {
844 GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); 834 GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
@@ -849,20 +839,20 @@ namespace OpenSim.Region.ClientStack.LindenUDP
849 GAPIRP.TransactionData.TotalNumItems = ((uint)i+1); 839 GAPIRP.TransactionData.TotalNumItems = ((uint)i+1);
850 GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock(); 840 GroupActiveProposalItemReplyPacket.ProposalDataBlock ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock();
851 GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1]; 841 GAPIRP.ProposalData = new GroupActiveProposalItemReplyPacket.ProposalDataBlock[1];
852 ProposalData.VoteCast = Utils.StringToBytes("false"); 842 ProposalData.VoteCast = Utils.StringToBytes("false");
853 ProposalData.VoteID = new UUID(Proposal.VoteID); 843 ProposalData.VoteID = new UUID(Proposal.VoteID);
854 ProposalData.VoteInitiator = new UUID(Proposal.VoteInitiator); 844 ProposalData.VoteInitiator = new UUID(Proposal.VoteInitiator);
855 ProposalData.Majority = (float)Convert.ToInt32(Proposal.Majority); 845 ProposalData.Majority = (float)Convert.ToInt32(Proposal.Majority);
856 ProposalData.Quorum = Convert.ToInt32(Proposal.Quorum); 846 ProposalData.Quorum = Convert.ToInt32(Proposal.Quorum);
857 ProposalData.TerseDateID = Utils.StringToBytes(Proposal.TerseDateID); 847 ProposalData.TerseDateID = Utils.StringToBytes(Proposal.TerseDateID);
858 ProposalData.StartDateTime = Utils.StringToBytes(Proposal.StartDateTime); 848 ProposalData.StartDateTime = Utils.StringToBytes(Proposal.StartDateTime);
859 ProposalData.EndDateTime = Utils.StringToBytes(Proposal.EndDateTime); 849 ProposalData.EndDateTime = Utils.StringToBytes(Proposal.EndDateTime);
860 ProposalData.ProposalText = Utils.StringToBytes(Proposal.ProposalText); 850 ProposalData.ProposalText = Utils.StringToBytes(Proposal.ProposalText);
861 ProposalData.AlreadyVoted = false; 851 ProposalData.AlreadyVoted = false;
862 GAPIRP.ProposalData[i] = ProposalData; 852 GAPIRP.ProposalData[i] = ProposalData;
863 OutPacket(GAPIRP, ThrottleOutPacketType.Task); 853 OutPacket(GAPIRP, ThrottleOutPacketType.Task);
864 i++; 854 i++;
865 } 855 }
866 if (Proposals.Length == 0) 856 if (Proposals.Length == 0)
867 { 857 {
868 GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket(); 858 GroupActiveProposalItemReplyPacket GAPIRP = new GroupActiveProposalItemReplyPacket();
@@ -886,40 +876,28 @@ namespace OpenSim.Region.ClientStack.LindenUDP
886 GAPIRP.ProposalData[0] = ProposalData; 876 GAPIRP.ProposalData[0] = ProposalData;
887 OutPacket(GAPIRP, ThrottleOutPacketType.Task); 877 OutPacket(GAPIRP, ThrottleOutPacketType.Task);
888 } 878 }
889 }
890 public struct GroupVoteHistory
891 {
892 public string VoteID;
893 public string VoteInitiator;
894 public string Majority;
895 public string Quorum;
896 public string TerseDateID;
897 public string StartDateTime;
898 public string EndDateTime;
899 public string VoteType;
900 public string VoteResult;
901 public string ProposalText;
902 } 879 }
880
903 public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) 881 public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes)
904 { 882 {
905 int i = 0; 883 int i = 0;
906 foreach (GroupVoteHistory Vote in Votes) 884 foreach (GroupVoteHistory Vote in Votes)
907 { 885 {
908 GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket(); 886 GroupVoteHistoryItemReplyPacket GVHIRP = new GroupVoteHistoryItemReplyPacket();
909 887
910 GVHIRP.AgentData.AgentID = AgentId; 888 GVHIRP.AgentData.AgentID = AgentId;
911 GVHIRP.AgentData.GroupID = groupID; 889 GVHIRP.AgentData.GroupID = groupID;
912 GVHIRP.TransactionData.TransactionID = transactionID; 890 GVHIRP.TransactionData.TransactionID = transactionID;
913 GVHIRP.TransactionData.TotalNumItems = ((uint)i+1); 891 GVHIRP.TransactionData.TotalNumItems = ((uint)i+1);
914 GVHIRP.HistoryItemData.VoteID = new UUID(Vote.VoteID); 892 GVHIRP.HistoryItemData.VoteID = new UUID(Vote.VoteID);
915 GVHIRP.HistoryItemData.VoteInitiator = new UUID(Vote.VoteInitiator); 893 GVHIRP.HistoryItemData.VoteInitiator = new UUID(Vote.VoteInitiator);
916 GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Vote.Majority); 894 GVHIRP.HistoryItemData.Majority = (float)Convert.ToInt32(Vote.Majority);
917 GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Vote.Quorum); 895 GVHIRP.HistoryItemData.Quorum = Convert.ToInt32(Vote.Quorum);
918 GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(Vote.TerseDateID); 896 GVHIRP.HistoryItemData.TerseDateID = Utils.StringToBytes(Vote.TerseDateID);
919 GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(Vote.StartDateTime); 897 GVHIRP.HistoryItemData.StartDateTime = Utils.StringToBytes(Vote.StartDateTime);
920 GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(Vote.EndDateTime); 898 GVHIRP.HistoryItemData.EndDateTime = Utils.StringToBytes(Vote.EndDateTime);
921 GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(Vote.VoteType); 899 GVHIRP.HistoryItemData.VoteType = Utils.StringToBytes(Vote.VoteType);
922 GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(Vote.VoteResult); 900 GVHIRP.HistoryItemData.VoteResult = Utils.StringToBytes(Vote.VoteResult);
923 GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(Vote.ProposalText); 901 GVHIRP.HistoryItemData.ProposalText = Utils.StringToBytes(Vote.ProposalText);
924 GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock(); 902 GroupVoteHistoryItemReplyPacket.VoteItemBlock VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock();
925 GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1]; 903 GVHIRP.VoteItem = new GroupVoteHistoryItemReplyPacket.VoteItemBlock[1];
@@ -927,7 +905,7 @@ namespace OpenSim.Region.ClientStack.LindenUDP
927 VoteItem.NumVotes = 0; //TODO: FIX THIS!!! 905 VoteItem.NumVotes = 0; //TODO: FIX THIS!!!
928 VoteItem.VoteCast = Utils.StringToBytes("Yes"); 906 VoteItem.VoteCast = Utils.StringToBytes("Yes");
929 GVHIRP.VoteItem[i] = VoteItem; 907 GVHIRP.VoteItem[i] = VoteItem;
930 OutPacket(GVHIRP, ThrottleOutPacketType.Task); 908 OutPacket(GVHIRP, ThrottleOutPacketType.Task);
931 i++; 909 i++;
932 } 910 }
933 if (Votes.Length == 0) 911 if (Votes.Length == 0)