Base class for Asset uploads/results via Capabilities
Ejemplo n.º 1
0
        /// <summary>
        /// Deserialize the message
        /// </summary>
        /// <param name="map">An <see cref="OSDMap"/> containing the data</param>
        public void Deserialize(OSDMap map)
        {
            if (map.ContainsKey("task_id"))
                Request = new UpdateScriptTaskUpdateMessage();
            else if (map.ContainsKey("state") && map["state"].AsString().Equals("upload"))
                Request = new UploaderRequestUpload();
            else if (map.ContainsKey("state") && map["state"].AsString().Equals("complete")
                && map.ContainsKey("errors"))
                Request = new UploaderScriptRequestError();
            else if (map.ContainsKey("state") && map["state"].AsString().Equals("complete"))
                Request = new UploaderRequestScriptComplete();
            else
                Logger.Log("Unable to deserialize UpdateScriptTaskMessage: No message handler exists for state " + map["state"].AsString(), Helpers.LogLevel.Warning);

            if (Request != null)
                Request.Deserialize(map);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Deserialize the message
        /// </summary>
        /// <param name="map">An <see cref="OSDMap"/> containing the data</param>
        public void Deserialize(OSDMap map)
        {
            if (map.ContainsKey("state") && map["state"].Equals("upload"))
                Request = new UploaderRequestUpload();
            else if (map.ContainsKey("state") && map["state"].Equals("complete"))
                Request = new UploaderRequestComplete();
            else
                Logger.Log("Unable to deserialize UploadScriptTask: No message handler exists for state " + map["state"].AsString(), Helpers.LogLevel.Warning);

            Request.Deserialize(map);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Deserialize the message
        /// </summary>
        /// <param name="map">An <see cref="OSDMap"/> containing the data</param>
        public void Deserialize(OSDMap map)
        {
            if (map.ContainsKey("item_id"))
                Request = new UpdateAgentInventoryRequestMessage();
            else if (map.ContainsKey("state") && map["state"].AsString().Equals("upload"))
                Request = new UploaderRequestUpload();
            else if (map.ContainsKey("state") && map["state"].AsString().Equals("complete"))
                Request = new UploaderRequestComplete();
            else
                Logger.Log("Unable to deserialize UpdateNotecardAgentInventory: No message handler exists for state " + map["state"].AsString(), Helpers.LogLevel.Warning);

            if (Request != null)
                Request.Deserialize(map);
        }