OpenSim/Region/ClientStack/Linden/Caps/BunchOfCaps/BunchOfCaps.cs
/// <summary>
/// Called by the notecard update handler.  Provides a URL to which the client can upload a new asset.
/// </summary>
/// <param name="request"></param>
/// <param name="path"></param>
/// <param name="param"></param>
/// <returns></returns>
Called by the notecard update handler.  Provides a URL to which the client can upload a new asset.
Called by the notecard update handler . Provides a URL to which the client can upload a new asset .
public string NoteCardAgentInventory(string request, string path, string param,
                                             IOSHttpRequest httpRequest, IOSHttpResponse httpResponse)
        {
            Hashtable hash = (Hashtable)LLSD.LLSDDeserialize(Utils.StringToBytes(request));
            LLSDItemUpdate llsdRequest = new LLSDItemUpdate();
            LLSDHelpers.DeserialiseOSDMap(hash, llsdRequest);
            string capsBase = "/CAPS/" + m_HostCapsObj.CapsObjectPath;
            string uploaderPath = Util.RandomClass.Next(5000, 8000).ToString("0000");
            ItemUpdater uploader =
                new ItemUpdater(llsdRequest.item_id, capsBase + uploaderPath, m_HostCapsObj.HttpListener, m_dumpAssetsToFile);
            uploader.OnUpLoad += ItemUpdated;
            m_HostCapsObj.HttpListener.AddStreamHandler(
                new BinaryStreamHandler(
                    "POST", capsBase + uploaderPath, uploader.uploaderCaps, "NoteCardAgentInventory", null));
            string protocol = "http://";
            if (m_HostCapsObj.SSLCaps)
                protocol = "https://";
            string uploaderURL = protocol + m_HostCapsObj.HostName + ":" + m_HostCapsObj.Port.ToString() + capsBase +
                                 uploaderPath;
            LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse();
            uploadResponse.uploader = uploaderURL;
            uploadResponse.state = "upload";
            return LLSDHelpers.SerialiseLLSDReply(uploadResponse);
        }
public string NoteCardAgentInventory ( string request , string path , string param , IOSHttpRequest httpRequest , IOSHttpResponse httpResponse ) { Hashtable hash = ( Hashtable ) LLSD . LLSDDeserialize ( Utils . StringToBytes ( request ) ) ; LLSDItemUpdate llsdRequest = new LLSDItemUpdate ( ) ; LLSDHelpers . DeserialiseOSDMap ( hash , llsdRequest ) ; string capsBase = " " + m_HostCapsObj . CapsObjectPath ; string uploaderPath = Util . RandomClass . Next ( 5000 , 8000 ) . ToString ( " " ) ; ItemUpdater uploader = new ItemUpdater ( llsdRequest . item_id , capsBase + uploaderPath , m_HostCapsObj . HttpListener , m_dumpAssetsToFile ) ; uploader . OnUpLoad += ItemUpdated ; m_HostCapsObj . HttpListener . AddStreamHandler ( new BinaryStreamHandler ( " " , capsBase + uploaderPath , uploader . uploaderCaps , " " , null ) ) ; string protocol = " " ; if ( m_HostCapsObj . SSLCaps ) protocol = " " ; string uploaderURL = protocol + m_HostCapsObj . HostName + " " + m_HostCapsObj . Port . ToString ( ) + capsBase + uploaderPath ; LLSDAssetUploadResponse uploadResponse = new LLSDAssetUploadResponse ( ) ; uploadResponse . uploader = uploaderURL ; uploadResponse . state = " " ; return LLSDHelpers . SerialiseLLSDReply ( uploadResponse ) ; }
Called by the notecard update handler.
Called by the notecard update handler .
//m_log.Debug("[CAPS]: NoteCardAgentInventory Request in region: " + m_regionName + "\n" + request); //m_log.Debug("[CAPS]: NoteCardAgentInventory Request is: " + request); //OpenMetaverse.StructuredData.OSDMap hash = (OpenMetaverse.StructuredData.OSDMap)OpenMetaverse.StructuredData.LLSDParser.DeserializeBinary(Utils.StringToBytes(request)); //            m_log.InfoFormat("[CAPS]: " + //                             "NoteCardAgentInventory response: {0}", //                             LLSDHelpers.SerialiseLLSDReply(uploadResponse)));
None
request
string
None
path
string
None
param
string
None
httpRequest
IOSHttpRequest
httpResponse
IOSHttpResponse