public void RequestUploadNotecardAsset(byte[] data, UUID notecardID, NotecardUploadedAssetCallback callback)
{
if (_Client.Network.CurrentSim == null || _Client.Network.CurrentSim.Caps == null)
throw new Exception("UpdateNotecardAgentInventory capability is not currently available");
Uri url = _Client.Network.CurrentSim.Caps.CapabilityURI("UpdateNotecardAgentInventory");
if (url != null)
{
OSDMap query = new OSDMap();
query.Add("item_id", OSD.FromUUID(notecardID));
byte[] postData = StructuredData.OSDParser.SerializeLLSDXmlBytes(query);
// Make the request
CapsClient request = new CapsClient(url);
request.OnComplete += new CapsClient.CompleteCallback(UploadNotecardAssetResponse);
request.UserData = new object[2] { new KeyValuePair<NotecardUploadedAssetCallback, byte[]>(callback, data), notecardID };
request.StartRequest(postData);
}
else
{
throw new Exception("UpdateNotecardAgentInventory capability is not currently available");
}
}