public virtual InventoryFolderBase GetFolder(InventoryFolderBase folder)
        {
            XInventoryFolder[] folders = m_Database.GetFolders(
                new string[] { "folderID" },
                new string[] { folder.ID.ToString() });

            if (folders.Length == 0)
            {
                return(null);
            }

            return(ConvertToOpenSim(folders[0]));
        }
        protected virtual XInventoryFolder[] GetSystemFolders(UUID principalID)
        {
//            m_log.DebugFormat("[XINVENTORY SERVICE]: Getting system folders for {0}", principalID);

            XInventoryFolder[] allFolders = m_Database.GetFolders(
                new string[] { "agentID" },
                new string[] { principalID.ToString() });

            XInventoryFolder[] sysFolders = Array.FindAll(
                allFolders,
                delegate(XInventoryFolder f)
            {
                if (f.type > 0)
                {
                    return(true);
                }
                return(false);
            });

//            m_log.DebugFormat(
//                "[XINVENTORY SERVICE]: Found {0} system folders for {1}", sysFolders.Length, principalID);

            return(sysFolders);
        }
Beispiel #3
0
        public override InventoryFolderBase GetRootFolder(UUID principalID)
        {
            // Warp! Root folder for travelers
            XInventoryFolder[] folders = m_Database.GetFolders(
                new string[] { "agentID", "folderName" },
                new string[] { principalID.ToString(), "My Suitcase" });

            if (folders.Length > 0)
            {
                return(ConvertToOpenSim(folders[0]));
            }

            // make one
            XInventoryFolder suitcase = CreateFolder(principalID, UUID.Zero, (int)AssetType.Folder, "My Suitcase");

            return(ConvertToOpenSim(suitcase));
        }