diff options
author | Sean Dague | 2008-05-16 18:02:20 +0000 |
---|---|---|
committer | Sean Dague | 2008-05-16 18:02:20 +0000 |
commit | 244c776487c9c2099d9a42a499b0da043341b8df (patch) | |
tree | c36e54acc43f119ea978203e35833d75b59bea21 | |
parent | * Cache knowledge in the region server that the asset service has reported an... (diff) | |
download | opensim-SC_OLD-244c776487c9c2099d9a42a499b0da043341b8df.zip opensim-SC_OLD-244c776487c9c2099d9a42a499b0da043341b8df.tar.gz opensim-SC_OLD-244c776487c9c2099d9a42a499b0da043341b8df.tar.bz2 opensim-SC_OLD-244c776487c9c2099d9a42a499b0da043341b8df.tar.xz |
front end of OGS1 Appearance bits. Now I need to write the
back end.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | 50 |
1 files changed, 47 insertions, 3 deletions
diff --git a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs index d77f190..8c47323 100644 --- a/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs +++ b/OpenSim/Region/Communications/OGS1/OGS1UserServices.cs | |||
@@ -97,6 +97,11 @@ namespace OpenSim.Region.Communications.OGS1 | |||
97 | "): " + data["error_desc"]); | 97 | "): " + data["error_desc"]); |
98 | return null; | 98 | return null; |
99 | } | 99 | } |
100 | else | ||
101 | { | ||
102 | return new AvatarAppearance(data); | ||
103 | } | ||
104 | |||
100 | return null; | 105 | return null; |
101 | } | 106 | } |
102 | 107 | ||
@@ -569,14 +574,14 @@ namespace OpenSim.Region.Communications.OGS1 | |||
569 | try | 574 | try |
570 | { | 575 | { |
571 | Hashtable param = new Hashtable(); | 576 | Hashtable param = new Hashtable(); |
572 | param["ownerID"] = user.ToString(); | 577 | param["owner"] = user.ToString(); |
573 | 578 | ||
574 | IList parameters = new ArrayList(); | 579 | IList parameters = new ArrayList(); |
575 | parameters.Add(param); | 580 | parameters.Add(param); |
576 | XmlRpcRequest req = new XmlRpcRequest("get_user_appearance", parameters); | 581 | XmlRpcRequest req = new XmlRpcRequest("get_user_appearance", parameters); |
577 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); | 582 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); |
578 | Hashtable respData = (Hashtable) resp.Value; | 583 | Hashtable respData = (Hashtable) resp.Value; |
579 | 584 | ||
580 | return ConvertXMLRPCDataToAvatarAppearance(respData); | 585 | return ConvertXMLRPCDataToAvatarAppearance(respData); |
581 | } | 586 | } |
582 | catch (WebException e) | 587 | catch (WebException e) |
@@ -590,7 +595,46 @@ namespace OpenSim.Region.Communications.OGS1 | |||
590 | 595 | ||
591 | public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) | 596 | public void UpdateUserAppearance(LLUUID user, AvatarAppearance appearance) |
592 | { | 597 | { |
593 | return; | 598 | try |
599 | { | ||
600 | Hashtable param = appearance.ToHashTable(); | ||
601 | param["owner"] = user.ToString(); | ||
602 | |||
603 | IList parameters = new ArrayList(); | ||
604 | parameters.Add(param); | ||
605 | XmlRpcRequest req = new XmlRpcRequest("update_user_appearance", parameters); | ||
606 | XmlRpcResponse resp = req.Send(m_parent.NetworkServersInfo.UserURL, 8000); | ||
607 | Hashtable respData = (Hashtable) resp.Value; | ||
608 | |||
609 | if (respData != null) | ||
610 | { | ||
611 | if (respData.Contains("returnString")) | ||
612 | { | ||
613 | if ((string)respData["returnString"] == "TRUE") | ||
614 | { | ||
615 | |||
616 | } | ||
617 | else | ||
618 | { | ||
619 | m_log.Warn("[GRID]: Unable to update_user_appearance, User Server Reported an issue"); | ||
620 | } | ||
621 | } | ||
622 | else | ||
623 | { | ||
624 | m_log.Warn("[GRID]: Unable to update_user_appearance, UserServer didn't understand me!"); | ||
625 | } | ||
626 | } | ||
627 | else | ||
628 | { | ||
629 | m_log.Warn("[GRID]: Unable to update_user_appearance, UserServer didn't understand me!"); | ||
630 | } | ||
631 | } | ||
632 | catch (WebException e) | ||
633 | { | ||
634 | m_log.Warn("[OGS1 USER SERVICES]: Error when trying to update Avatar's appearance: " + | ||
635 | e.Message); | ||
636 | // Return Empty list (no friends) | ||
637 | } | ||
594 | } | 638 | } |
595 | 639 | ||
596 | public void AddAttachment(LLUUID user, LLUUID item) | 640 | public void AddAttachment(LLUUID user, LLUUID item) |