29 using System.Collections;
30 using System.Collections.Generic;
32 using System.Net.Sockets;
33 using System.Reflection;
38 using OpenSim.Framework;
40 namespace OpenSim.Services.UserProfilesService
53 private string m_serverURI;
61 m_serverURI = serverURI;
76 Hashtable ReqHash =
new Hashtable();
77 ReqHash[
"avatar_id"] = props.UserId.ToString();
79 Hashtable profileData = XMLRPCRequester.SendRequest(ReqHash,
"avatar_properties_request", m_serverURI);
81 if (profileData == null)
83 if (!profileData.ContainsKey(
"data"))
86 ArrayList dataArray = (ArrayList)profileData[
"data"];
88 if (dataArray == null || dataArray[0] == null)
90 profileData = (Hashtable)dataArray[0];
92 props.WebUrl = string.Empty;
93 props.AboutText = String.Empty;
94 props.FirstLifeText = String.Empty;
95 props.ImageId = UUID.Zero;
96 props.FirstLifeImageId = UUID.Zero;
97 props.PartnerId = UUID.Zero;
99 if (profileData[
"ProfileUrl"] != null)
100 props.WebUrl = profileData[
"ProfileUrl"].ToString();
101 if (profileData[
"AboutText"] != null)
102 props.AboutText = profileData[
"AboutText"].ToString();
103 if (profileData[
"FirstLifeAboutText"] != null)
104 props.FirstLifeText = profileData[
"FirstLifeAboutText"].ToString();
105 if (profileData[
"Image"] != null)
106 props.ImageId =
new UUID(profileData[
"Image"].ToString());
107 if (profileData[
"FirstLifeImage"] != null)
108 props.FirstLifeImageId =
new UUID(profileData[
"FirstLifeImage"].ToString());
109 if (profileData[
"Partner"] != null)
110 props.PartnerId =
new UUID(profileData[
"Partner"].ToString());
112 props.WantToMask = 0;
113 props.WantToText = String.Empty;
114 props.SkillsMask = 0;
115 props.SkillsText = String.Empty;
116 props.Language = String.Empty;
118 if (profileData[
"wantmask"] != null)
119 props.WantToMask = Convert.ToInt32(profileData[
"wantmask"].ToString());
120 if (profileData[
"wanttext"] != null)
121 props.WantToText = profileData[
"wanttext"].ToString();
123 if (profileData[
"skillsmask"] != null)
124 props.SkillsMask = Convert.ToInt32(profileData[
"skillsmask"].ToString());
125 if (profileData[
"skillstext"] != null)
126 props.SkillsText = profileData[
"skillstext"].ToString();
128 if (profileData[
"languages"] != null)
129 props.Language = profileData[
"languages"].ToString();
A client for accessing a profile server using the OpenProfile protocol.
bool RequestAvatarPropertiesUsingOpenProfile(ref UserProfileProperties props)
Gets an avatar's profile using the OpenProfile protocol.
OpenProfileClient(string serverURI)
Creates a client for accessing a foreign grid's profile server using the OpenProfile protocol...
Interactive OpenSim region server