Finished implementing the XInventory connector. Untested.
parent
2ad2561ed1
commit
16f77fa1f1
|
@ -158,6 +158,16 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
}
|
}
|
||||||
|
|
||||||
private byte[] FailureResult()
|
private byte[] FailureResult()
|
||||||
|
{
|
||||||
|
return BoolResult(false);
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] SuccessResult()
|
||||||
|
{
|
||||||
|
return BoolResult(true);
|
||||||
|
}
|
||||||
|
|
||||||
|
private byte[] BoolResult(bool value)
|
||||||
{
|
{
|
||||||
XmlDocument doc = new XmlDocument();
|
XmlDocument doc = new XmlDocument();
|
||||||
|
|
||||||
|
@ -172,7 +182,7 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
doc.AppendChild(rootElement);
|
doc.AppendChild(rootElement);
|
||||||
|
|
||||||
XmlElement result = doc.CreateElement("", "RESULT", "");
|
XmlElement result = doc.CreateElement("", "RESULT", "");
|
||||||
result.AppendChild(doc.CreateTextNode("False"));
|
result.AppendChild(doc.CreateTextNode(value.ToString()));
|
||||||
|
|
||||||
rootElement.AppendChild(result);
|
rootElement.AppendChild(result);
|
||||||
|
|
||||||
|
@ -218,8 +228,9 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
|
|
||||||
List<InventoryFolderBase> folders = m_InventoryService.GetInventorySkeleton(new UUID(request["PRINCIPAL"].ToString()));
|
List<InventoryFolderBase> folders = m_InventoryService.GetInventorySkeleton(new UUID(request["PRINCIPAL"].ToString()));
|
||||||
|
|
||||||
foreach (InventoryFolderBase f in folders)
|
if (folders != null)
|
||||||
result[f.ID.ToString()] = EncodeFolder(f);
|
foreach (InventoryFolderBase f in folders)
|
||||||
|
result[f.ID.ToString()] = EncodeFolder(f);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
|
@ -234,10 +245,9 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
UUID principal = UUID.Zero;
|
UUID principal = UUID.Zero;
|
||||||
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
InventoryFolderBase rfolder = m_InventoryService.GetRootFolder(principal);
|
InventoryFolderBase rfolder = m_InventoryService.GetRootFolder(principal);
|
||||||
if (rfolder == null)
|
if (rfolder != null)
|
||||||
return FailureResult();
|
result[rfolder.ID.ToString()] = EncodeFolder(rfolder);
|
||||||
|
|
||||||
result[rfolder.ID.ToString()] = EncodeFolder(rfolder);
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
UTF8Encoding encoding = new UTF8Encoding();
|
||||||
|
@ -252,10 +262,9 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
int type = 0;
|
int type = 0;
|
||||||
Int32.TryParse(request["TYPE"].ToString(), out type);
|
Int32.TryParse(request["TYPE"].ToString(), out type);
|
||||||
InventoryFolderBase folder = m_InventoryService.GetFolderForType(principal, (AssetType)type);
|
InventoryFolderBase folder = m_InventoryService.GetFolderForType(principal, (AssetType)type);
|
||||||
if (folder == null)
|
if (folder != null)
|
||||||
return FailureResult();
|
result[folder.ID.ToString()] = EncodeFolder(folder);
|
||||||
|
|
||||||
result[folder.ID.ToString()] = EncodeFolder(folder);
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
UTF8Encoding encoding = new UTF8Encoding();
|
||||||
|
@ -271,19 +280,19 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
UUID.TryParse(request["FOLDER"].ToString(), out folderID);
|
UUID.TryParse(request["FOLDER"].ToString(), out folderID);
|
||||||
|
|
||||||
InventoryCollection icoll = m_InventoryService.GetFolderContent(principal, folderID);
|
InventoryCollection icoll = m_InventoryService.GetFolderContent(principal, folderID);
|
||||||
if (icoll == null)
|
if (icoll != null)
|
||||||
return FailureResult();
|
{
|
||||||
|
Dictionary<string, object> folders = new Dictionary<string, object>();
|
||||||
|
foreach (InventoryFolderBase f in icoll.Folders)
|
||||||
|
folders[f.ID.ToString()] = EncodeFolder(f);
|
||||||
|
result["FOLDERS"] = folders;
|
||||||
|
|
||||||
Dictionary<string, object> folders = new Dictionary<string,object>();
|
Dictionary<string, object> items = new Dictionary<string, object>();
|
||||||
foreach (InventoryFolderBase f in icoll.Folders)
|
foreach (InventoryItemBase i in icoll.Items)
|
||||||
folders[f.ID.ToString()] = EncodeFolder(f);
|
items[i.ID.ToString()] = EncodeItem(i);
|
||||||
result["FOLDERS"] = folders;
|
result["ITEMS"] = items;
|
||||||
|
}
|
||||||
|
|
||||||
Dictionary<string, object> items = new Dictionary<string, object>();
|
|
||||||
foreach (InventoryItemBase i in icoll.Items)
|
|
||||||
items[i.ID.ToString()] = EncodeItem(i);
|
|
||||||
result["ITEMS"] = folders;
|
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
UTF8Encoding encoding = new UTF8Encoding();
|
||||||
|
@ -293,7 +302,16 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
byte[] HandleGetFolderItems(Dictionary<string,object> request)
|
byte[] HandleGetFolderItems(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
UUID principal = UUID.Zero;
|
||||||
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
|
UUID folderID = UUID.Zero;
|
||||||
|
UUID.TryParse(request["FOLDER"].ToString(), out folderID);
|
||||||
|
|
||||||
|
List<InventoryItemBase> items = m_InventoryService.GetFolderItems(principal, folderID);
|
||||||
|
if (items != null)
|
||||||
|
foreach (InventoryItemBase item in items)
|
||||||
|
result[item.ID.ToString()] = EncodeItem(item);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
UTF8Encoding encoding = new UTF8Encoding();
|
||||||
|
@ -303,96 +321,169 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
byte[] HandleAddFolder(Dictionary<string,object> request)
|
byte[] HandleAddFolder(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
InventoryFolderBase folder = BuildFolder(request);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
if (m_InventoryService.AddFolder(folder))
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
return SuccessResult();
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
else
|
||||||
return encoding.GetBytes(xmlString);
|
return FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleUpdateFolder(Dictionary<string,object> request)
|
byte[] HandleUpdateFolder(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||||
|
InventoryFolderBase folder = BuildFolder(request);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
if (m_InventoryService.UpdateFolder(folder))
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
return SuccessResult();
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
else
|
||||||
return encoding.GetBytes(xmlString);
|
return FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleMoveFolder(Dictionary<string,object> request)
|
byte[] HandleMoveFolder(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||||
|
UUID parentID = UUID.Zero;
|
||||||
|
UUID.TryParse(request["ParentID"].ToString(), out parentID);
|
||||||
|
UUID folderID = UUID.Zero;
|
||||||
|
UUID.TryParse(request["ID"].ToString(), out folderID);
|
||||||
|
UUID principal = UUID.Zero;
|
||||||
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
|
|
||||||
|
InventoryFolderBase folder = new InventoryFolderBase(folderID, "", principal, parentID);
|
||||||
|
if (m_InventoryService.MoveFolder(folder))
|
||||||
|
return SuccessResult();
|
||||||
|
else
|
||||||
|
return FailureResult();
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
|
||||||
return encoding.GetBytes(xmlString);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleDeleteFolders(Dictionary<string,object> request)
|
byte[] HandleDeleteFolders(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
UUID principal = UUID.Zero;
|
||||||
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
|
List<string> slist = (List<string>)request["FOLDERS"];
|
||||||
|
List<UUID> uuids = new List<UUID>();
|
||||||
|
foreach (string s in slist)
|
||||||
|
{
|
||||||
|
UUID u = UUID.Zero;
|
||||||
|
if (UUID.TryParse(s, out u))
|
||||||
|
uuids.Add(u);
|
||||||
|
}
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
if (m_InventoryService.DeleteFolders(principal, uuids))
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
return SuccessResult();
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
else
|
||||||
return encoding.GetBytes(xmlString);
|
return
|
||||||
|
FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandlePurgeFolder(Dictionary<string,object> request)
|
byte[] HandlePurgeFolder(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
UUID folderID = UUID.Zero;
|
||||||
|
UUID.TryParse(request["ID"].ToString(), out folderID);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
InventoryFolderBase folder = new InventoryFolderBase(folderID);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
if (m_InventoryService.PurgeFolder(folder))
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
return SuccessResult();
|
||||||
return encoding.GetBytes(xmlString);
|
else
|
||||||
|
return FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleAddItem(Dictionary<string,object> request)
|
byte[] HandleAddItem(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||||
|
InventoryItemBase item = BuildItem(request);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
if (m_InventoryService.AddItem(item))
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
return SuccessResult();
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
else
|
||||||
return encoding.GetBytes(xmlString);
|
return FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleUpdateItem(Dictionary<string,object> request)
|
byte[] HandleUpdateItem(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||||
|
InventoryItemBase item = BuildItem(request);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
if (m_InventoryService.UpdateItem(item))
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
return SuccessResult();
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
else
|
||||||
return encoding.GetBytes(xmlString);
|
return FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleMoveItems(Dictionary<string,object> request)
|
byte[] HandleMoveItems(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
List<string> idlist = (List<string>)request["IDLIST"];
|
||||||
|
List<string> destlist = (List<string>)request["DESTLIST"];
|
||||||
|
UUID principal = UUID.Zero;
|
||||||
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
List<InventoryItemBase> items = new List<InventoryItemBase>();
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
int n = 0;
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
try
|
||||||
return encoding.GetBytes(xmlString);
|
{
|
||||||
|
foreach (string s in idlist)
|
||||||
|
{
|
||||||
|
UUID u = UUID.Zero;
|
||||||
|
if (UUID.TryParse(s, out u))
|
||||||
|
{
|
||||||
|
UUID fid = UUID.Zero;
|
||||||
|
if (UUID.TryParse(destlist[n++], out fid))
|
||||||
|
{
|
||||||
|
InventoryItemBase item = new InventoryItemBase(u, principal);
|
||||||
|
item.Folder = fid;
|
||||||
|
items.Add(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch (Exception e)
|
||||||
|
{
|
||||||
|
m_log.DebugFormat("[XINVENTORY IN CONNECTOR]: Exception in HandleMoveItems: {0}", e.Message);
|
||||||
|
return FailureResult();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (m_InventoryService.MoveItems(principal, items))
|
||||||
|
return SuccessResult();
|
||||||
|
else
|
||||||
|
return FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleDeleteItems(Dictionary<string,object> request)
|
byte[] HandleDeleteItems(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||||
|
UUID principal = UUID.Zero;
|
||||||
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
|
List<string> slist = (List<string>)request["ITEMS"];
|
||||||
|
List<UUID> uuids = new List<UUID>();
|
||||||
|
foreach (string s in slist)
|
||||||
|
{
|
||||||
|
UUID u = UUID.Zero;
|
||||||
|
if (UUID.TryParse(s, out u))
|
||||||
|
uuids.Add(u);
|
||||||
|
}
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
if (m_InventoryService.DeleteItems(principal, uuids))
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
return SuccessResult();
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
else
|
||||||
return encoding.GetBytes(xmlString);
|
return
|
||||||
|
FailureResult();
|
||||||
}
|
}
|
||||||
|
|
||||||
byte[] HandleGetItem(Dictionary<string,object> request)
|
byte[] HandleGetItem(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
UUID id = UUID.Zero;
|
||||||
|
UUID.TryParse(request["ID"].ToString(), out id);
|
||||||
|
|
||||||
|
InventoryItemBase item = new InventoryItemBase(id);
|
||||||
|
item = m_InventoryService.GetItem(item);
|
||||||
|
if (item != null)
|
||||||
|
result[item.ID.ToString()] = EncodeItem(item);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
|
@ -402,7 +493,14 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
|
|
||||||
byte[] HandleGetFolder(Dictionary<string,object> request)
|
byte[] HandleGetFolder(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string, object> result = new Dictionary<string, object>();
|
||||||
|
UUID id = UUID.Zero;
|
||||||
|
UUID.TryParse(request["ID"].ToString(), out id);
|
||||||
|
|
||||||
|
InventoryFolderBase folder = new InventoryFolderBase(id);
|
||||||
|
folder = m_InventoryService.GetFolder(folder);
|
||||||
|
if (folder != null)
|
||||||
|
result[folder.ID.ToString()] = EncodeFolder(folder);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
|
@ -413,6 +511,13 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
byte[] HandleGetActiveGestures(Dictionary<string,object> request)
|
byte[] HandleGetActiveGestures(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
UUID principal = UUID.Zero;
|
||||||
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
|
|
||||||
|
List<InventoryItemBase> gestures = m_InventoryService.GetActiveGestures(principal);
|
||||||
|
if (gestures != null)
|
||||||
|
foreach (InventoryItemBase item in gestures)
|
||||||
|
result[item.ID.ToString()] = EncodeItem(item);
|
||||||
|
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
|
@ -423,7 +528,14 @@ namespace OpenSim.Server.Handlers.Asset
|
||||||
byte[] HandleGetAssetPermissions(Dictionary<string,object> request)
|
byte[] HandleGetAssetPermissions(Dictionary<string,object> request)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> result = new Dictionary<string,object>();
|
Dictionary<string,object> result = new Dictionary<string,object>();
|
||||||
|
UUID principal = UUID.Zero;
|
||||||
|
UUID.TryParse(request["PRINCIPAL"].ToString(), out principal);
|
||||||
|
UUID assetID = UUID.Zero;
|
||||||
|
UUID.TryParse(request["ASSET"].ToString(), out assetID);
|
||||||
|
|
||||||
|
int perms = m_InventoryService.GetAssetPermissions(principal, assetID);
|
||||||
|
|
||||||
|
result["RESULT"] = perms.ToString();
|
||||||
string xmlString = ServerUtils.BuildXmlResponse(result);
|
string xmlString = ServerUtils.BuildXmlResponse(result);
|
||||||
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
m_log.DebugFormat("[XXX]: resp string: {0}", xmlString);
|
||||||
UTF8Encoding encoding = new UTF8Encoding();
|
UTF8Encoding encoding = new UTF8Encoding();
|
||||||
|
|
|
@ -92,6 +92,8 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return false;
|
return false;
|
||||||
|
if (ret.Count == 0)
|
||||||
|
return false;
|
||||||
|
|
||||||
return bool.Parse(ret["RESULT"].ToString());
|
return bool.Parse(ret["RESULT"].ToString());
|
||||||
}
|
}
|
||||||
|
@ -105,6 +107,8 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return null;
|
return null;
|
||||||
|
if (ret.Count == 0)
|
||||||
|
return null;
|
||||||
|
|
||||||
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
List<InventoryFolderBase> folders = new List<InventoryFolderBase>();
|
||||||
|
|
||||||
|
@ -122,8 +126,7 @@ namespace OpenSim.Services.Connectors
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (ret.Count == 0)
|
if (ret.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -140,7 +143,6 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (ret.Count == 0)
|
if (ret.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -157,7 +159,6 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (ret.Count == 0)
|
if (ret.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -182,7 +183,7 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
public List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID)
|
public List<InventoryItemBase> GetFolderItems(UUID principalID, UUID folderID)
|
||||||
{
|
{
|
||||||
Dictionary<string,object> ret = MakeRequest("GETFOLDERCONTENT",
|
Dictionary<string,object> ret = MakeRequest("GETFOLDERITEMS",
|
||||||
new Dictionary<string,object> {
|
new Dictionary<string,object> {
|
||||||
{ "PRINCIPAL", principalID.ToString() },
|
{ "PRINCIPAL", principalID.ToString() },
|
||||||
{ "FOLDER", folderID.ToString() }
|
{ "FOLDER", folderID.ToString() }
|
||||||
|
@ -190,7 +191,6 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (ret.Count == 0)
|
if (ret.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -244,7 +244,8 @@ namespace OpenSim.Services.Connectors
|
||||||
Dictionary<string,object> ret = MakeRequest("MOVEFOLDER",
|
Dictionary<string,object> ret = MakeRequest("MOVEFOLDER",
|
||||||
new Dictionary<string,object> {
|
new Dictionary<string,object> {
|
||||||
{ "ParentID", folder.ParentID.ToString() },
|
{ "ParentID", folder.ParentID.ToString() },
|
||||||
{ "ID", folder.ID.ToString() }
|
{ "ID", folder.ID.ToString() },
|
||||||
|
{ "PRINCIPAL", folder.Owner.ToString() }
|
||||||
});
|
});
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
|
@ -362,7 +363,7 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
Dictionary<string,object> ret = MakeRequest("MOVEITEMS",
|
Dictionary<string,object> ret = MakeRequest("MOVEITEMS",
|
||||||
new Dictionary<string,object> {
|
new Dictionary<string,object> {
|
||||||
{ "PrincipalID", principalID.ToString() },
|
{ "PRINCIPAL", principalID.ToString() },
|
||||||
{ "IDLIST", idlist },
|
{ "IDLIST", idlist },
|
||||||
{ "DESTLIST", destlist }
|
{ "DESTLIST", destlist }
|
||||||
});
|
});
|
||||||
|
@ -401,7 +402,6 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (ret.Count == 0)
|
if (ret.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -417,7 +417,6 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
if (ret == null)
|
if (ret == null)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
if (ret.Count == 0)
|
if (ret.Count == 0)
|
||||||
return null;
|
return null;
|
||||||
|
|
||||||
|
@ -531,5 +530,6 @@ namespace OpenSim.Services.Connectors
|
||||||
|
|
||||||
return item;
|
return item;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue