/// <summary> /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> /// </summary> /// <param name="userID"></param> /// <param name="callback"></param> public void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback) { if (!m_RequestingInventory.ContainsKey(userID)) { m_RequestingInventory.Add(userID, callback); try { m_log.InfoFormat( "[OGS1 INVENTORY SERVICE]: Requesting inventory from {0}/GetInventory/ for user {1}", _inventoryServerUrl, userID); RestObjectPosterResponse<InventoryCollection> requester = new RestObjectPosterResponse<InventoryCollection>(); requester.ResponseCallback = InventoryResponse; requester.BeginPostObject<Guid>(_inventoryServerUrl + "/GetInventory/", userID.Guid); } catch (WebException e) { if (StatsManager.SimExtraStats != null) StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure(); m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", e.Source, e.Message); } } else { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: RequestInventoryForUser() - could you not find user profile for {0}", userID); } }
/// <summary> /// <see cref="OpenSim.Framework.Communications.IInventoryServices"></see> /// </summary> /// <param name="userID"></param> /// <param name="callback"></param> public void RequestInventoryForUser(UUID userID, InventoryReceiptCallback callback) { if (!m_RequestingInventory.ContainsKey(userID)) { m_RequestingInventory.Add(userID, callback); try { m_log.InfoFormat( "[OGS1 INVENTORY SERVICE]: Requesting inventory from {0}/GetInventory/ for user {1}", _inventoryServerUrl, userID); RestObjectPosterResponse <InventoryCollection> requester = new RestObjectPosterResponse <InventoryCollection>(); requester.ResponseCallback = InventoryResponse; requester.BeginPostObject <Guid>(_inventoryServerUrl + "/GetInventory/", userID.Guid); } catch (WebException e) { if (StatsManager.SimExtraStats != null) { StatsManager.SimExtraStats.AddInventoryServiceRetrievalFailure(); } m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: Request inventory operation failed, {0} {1}", e.Source, e.Message); } } else { m_log.ErrorFormat("[OGS1 INVENTORY SERVICE]: RequestInventoryForUser() - could you not find user profile for {0}", userID); } }