public void HandleAvatarClassifiedsRequest(Object sender, string method, List <String> args) { if (!(sender is IClientAPI)) { return; } IClientAPI remoteClient = (IClientAPI)sender; UUID requestedUUID = new UUID(args[0]); #if (!ISWIN) Dictionary <UUID, string> classifieds = new Dictionary <UUID, string>(); foreach (Classified classified in ProfileFrontend.GetClassifieds(requestedUUID)) { classifieds.Add(classified.ClassifiedUUID, classified.Name); } #else Dictionary <UUID, string> classifieds = ProfileFrontend.GetClassifieds(requestedUUID).ToDictionary(classified => classified.ClassifiedUUID, classified => classified.Name); #endif remoteClient.SendAvatarClassifiedReply(requestedUUID, classifieds); }
public byte[] GetClassifieds(OSDMap request) { UUID principalID = request["PrincipalID"].AsUUID(); List <Classified> Classified = ProfileConnector.GetClassifieds(principalID); OSDMap result = new OSDMap(); OSDArray array = new OSDArray(); foreach (Classified info in Classified) { array.Add(info.ToOSD()); } result["Result"] = array; string xmlString = OSDParser.SerializeJsonString(result); //MainConsole.Instance.DebugFormat("[AuroraDataServerPostHandler]: resp string: {0}", xmlString); UTF8Encoding encoding = new UTF8Encoding(); return(encoding.GetBytes(xmlString)); }
public void HandleAvatarClassifiedsRequest(object sender, string method, List <string> args) { if (!(sender is IClientAPI)) { return; } IClientAPI remoteClient = (IClientAPI)sender; UUID requestedUUID = new UUID(args [0]); // 20170120 - greythane - May need to check for NPC bots here and send an appropriate reply Dictionary <UUID, string> classifieds = new Dictionary <UUID, string> (); foreach (Classified classified in ProfileFrontend.GetClassifieds(requestedUUID)) { classifieds.Add(classified.ClassifiedUUID, classified.Name); } remoteClient.SendAvatarClassifiedReply(requestedUUID, classifieds); }