aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/ApplicationPlugins/Rest/Inventory
diff options
context:
space:
mode:
authorDr Scofield2008-08-20 15:28:51 +0000
committerDr Scofield2008-08-20 15:28:51 +0000
commit2363cd2113261ac456e18f79e9e37622d2c7eca7 (patch)
treec58698b7269653d0df5adab697f66d86a425036e /OpenSim/ApplicationPlugins/Rest/Inventory
parentoops. forgot. (diff)
downloadopensim-SC-2363cd2113261ac456e18f79e9e37622d2c7eca7.zip
opensim-SC-2363cd2113261ac456e18f79e9e37622d2c7eca7.tar.gz
opensim-SC-2363cd2113261ac456e18f79e9e37622d2c7eca7.tar.bz2
opensim-SC-2363cd2113261ac456e18f79e9e37622d2c7eca7.tar.xz
fixing Rest/Inventory stuff again. changes somehow got lost locally.
Diffstat (limited to 'OpenSim/ApplicationPlugins/Rest/Inventory')
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs2
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs4
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs12
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs9
-rw-r--r--OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs4
5 files changed, 11 insertions, 20 deletions
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs
index f67f8b1..69f91e4 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/IRestHandler.cs
@@ -40,7 +40,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
40 /// </remarks> 40 /// </remarks>
41 41
42 public delegate void RestMethodHandler(RequestData rdata); 42 public delegate void RestMethodHandler(RequestData rdata);
43 public delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response); 43 public delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response, string path);
44 44
45 /// <summary> 45 /// <summary>
46 /// This interface represents the boundary between the general purpose 46 /// This interface represents the boundary between the general purpose
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
index a40d197..9e4fae6 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestAssetServices.cs
@@ -102,9 +102,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
102 102
103 #region Interface 103 #region Interface
104 104
105 private RequestData Allocate(OSHttpRequest request, OSHttpResponse response) 105 private RequestData Allocate(OSHttpRequest request, OSHttpResponse response, string prefix)
106 { 106 {
107 return (RequestData) new AssetRequestData(request, response, qPrefix); 107 return (RequestData) new AssetRequestData(request, response, prefix);
108 } 108 }
109 109
110 // Asset Handler 110 // Asset Handler
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs
index cb80846..61cf0e4 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestHandler.cs
@@ -56,16 +56,6 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
56 public class RestHandler : RestPlugin, IRestHandler, IHttpAgentHandler 56 public class RestHandler : RestPlugin, IRestHandler, IHttpAgentHandler
57 { 57 {
58 58
59 /// <remarks>
60 /// The handler delegates are not noteworthy. The allocator allows
61 /// a given handler to optionally subclass the base RequestData
62 /// structure to carry any locally required per-request state
63 /// needed.
64 /// </remarks>
65
66 // internal delegate void RestMethodHandler(RequestData rdata);
67 // internal delegate RequestData RestMethodAllocator(OSHttpRequest request, OSHttpResponse response);
68
69 // Handler tables: both stream and REST are supported. The path handlers and their 59 // Handler tables: both stream and REST are supported. The path handlers and their
70 // respective allocators are stored in separate tables. 60 // respective allocators are stored in separate tables.
71 61
@@ -623,7 +613,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
623 if (!String.IsNullOrEmpty(bestMatch)) 613 if (!String.IsNullOrEmpty(bestMatch))
624 { 614 {
625 615
626 rdata = pathAllocators[bestMatch](request, response); 616 rdata = pathAllocators[bestMatch](request, response, bestMatch);
627 617
628 Rest.Log.DebugFormat("{0} Path based REST handler matched with <{1}>", MsgId, bestMatch); 618 Rest.Log.DebugFormat("{0} Path based REST handler matched with <{1}>", MsgId, bestMatch);
629 619
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
index 6a0fdf2..1ea598e 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestInventoryServices.cs
@@ -128,9 +128,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
128 /// <param name=qPrefix>REST service domain prefix</param> 128 /// <param name=qPrefix>REST service domain prefix</param>
129 /// <returns>A RequestData instance suitable for this service</returns> 129 /// <returns>A RequestData instance suitable for this service</returns>
130 130
131 private RequestData Allocate(OSHttpRequest request, OSHttpResponse response) 131 private RequestData Allocate(OSHttpRequest request, OSHttpResponse response, string prefix)
132 { 132 {
133 return (RequestData) new InventoryRequestData(request, response, qPrefix); 133 return (RequestData) new InventoryRequestData(request, response, prefix);
134 } 134 }
135 135
136 /// <summary> 136 /// <summary>
@@ -2168,7 +2168,8 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2168 } 2168 }
2169 break; 2169 break;
2170 default : 2170 default :
2171 Rest.Log.DebugFormat("{0} Type was not inferred", MsgId); 2171 Rest.Log.DebugFormat("{0} Asset/Inventory type could not be inferred for {1}",
2172 MsgId,ic.Item.Name);
2172 break; 2173 break;
2173 } 2174 }
2174 } 2175 }
@@ -2177,7 +2178,7 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
2177 /// If this is a TGA remember the fact 2178 /// If this is a TGA remember the fact
2178 2179
2179 if (ic.Item.AssetType == (int) AssetType.TextureTGA || 2180 if (ic.Item.AssetType == (int) AssetType.TextureTGA ||
2180 ic.Item.AssetType == (int) AssetType.ImageTGA) 2181 ic.Item.AssetType == (int) AssetType.ImageTGA)
2181 { 2182 {
2182 Bitmap temp; 2183 Bitmap temp;
2183 Stream tgadata = new MemoryStream(ic.Asset.Data); 2184 Stream tgadata = new MemoryStream(ic.Asset.Data);
diff --git a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs
index 984f6d3..3ac48c9 100644
--- a/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs
+++ b/OpenSim/ApplicationPlugins/Rest/Inventory/RestTestServices.cs
@@ -110,9 +110,9 @@ namespace OpenSim.ApplicationPlugins.Rest.Inventory
110 110
111 #region Interface 111 #region Interface
112 112
113 private RequestData Allocate(OSHttpRequest request, OSHttpResponse response) 113 private RequestData Allocate(OSHttpRequest request, OSHttpResponse response, string prefix)
114 { 114 {
115 return new RequestData(request, response, qPrefix); 115 return new RequestData(request, response, prefix);
116 } 116 }
117 117
118 // Inventory Handler 118 // Inventory Handler