diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/Asset.cs b/libsecondlife-cs/AssetSystem/Asset.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/Asset.cs rename to libsecondlife-cs/AssetSystem/Asset.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/AssetImage.cs b/libsecondlife-cs/AssetSystem/AssetImage.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/AssetImage.cs rename to libsecondlife-cs/AssetSystem/AssetImage.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/AssetManager.cs b/libsecondlife-cs/AssetSystem/AssetManager.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/AssetManager.cs rename to libsecondlife-cs/AssetSystem/AssetManager.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/AssetNotecard.cs b/libsecondlife-cs/AssetSystem/AssetNotecard.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/AssetNotecard.cs rename to libsecondlife-cs/AssetSystem/AssetNotecard.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/ImageManager.cs b/libsecondlife-cs/AssetSystem/ImageManager.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/ImageManager.cs rename to libsecondlife-cs/AssetSystem/ImageManager.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/NotecardAsset.cs b/libsecondlife-cs/AssetSystem/NotecardAsset.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/NotecardAsset.cs rename to libsecondlife-cs/AssetSystem/NotecardAsset.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/PacketHelpers/AssetPackets.cs b/libsecondlife-cs/AssetSystem/PacketHelpers/AssetPackets.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/PacketHelpers/AssetPackets.cs rename to libsecondlife-cs/AssetSystem/PacketHelpers/AssetPackets.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssetSystem/PacketHelpers/ImagePackets.cs b/libsecondlife-cs/AssetSystem/PacketHelpers/ImagePackets.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/AssetSystem/PacketHelpers/ImagePackets.cs rename to libsecondlife-cs/AssetSystem/PacketHelpers/ImagePackets.cs diff --git a/libsecondlife-cs/Inventory/Inventory/AssemblyInfo.cs b/libsecondlife-cs/Inventory/Inventory/AssemblyInfo.cs deleted file mode 100644 index 177a4f0e..00000000 --- a/libsecondlife-cs/Inventory/Inventory/AssemblyInfo.cs +++ /dev/null @@ -1,58 +0,0 @@ -using System.Reflection; -using System.Runtime.CompilerServices; - -// -// General Information about an assembly is controlled through the following -// set of attributes. Change these attribute values to modify the information -// associated with an assembly. -// -[assembly: AssemblyTitle("")] -[assembly: AssemblyDescription("")] -[assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("")] -[assembly: AssemblyProduct("")] -[assembly: AssemblyCopyright("")] -[assembly: AssemblyTrademark("")] -[assembly: AssemblyCulture("")] - -// -// Version information for an assembly consists of the following four values: -// -// Major Version -// Minor Version -// Build Number -// Revision -// -// You can specify all the values or you can default the Revision and Build Numbers -// by using the '*' as shown below: - -[assembly: AssemblyVersion("1.0.*")] - -// -// In order to sign your assembly you must specify a key to use. Refer to the -// Microsoft .NET Framework documentation for more information on assembly signing. -// -// Use the attributes below to control which key is used for signing. -// -// Notes: -// (*) If no key is specified, the assembly is not signed. -// (*) KeyName refers to a key that has been installed in the Crypto Service -// Provider (CSP) on your machine. KeyFile refers to a file which contains -// a key. -// (*) If the KeyFile and the KeyName values are both specified, the -// following processing occurs: -// (1) If the KeyName can be found in the CSP, that key is used. -// (2) If the KeyName does not exist and the KeyFile does exist, the key -// in the KeyFile is installed into the CSP and used. -// (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. -// When specifying the KeyFile, the location of the KeyFile should be -// relative to the project output directory which is -// %Project Directory%\obj\. For example, if your KeyFile is -// located in the project directory, you would specify the AssemblyKeyFile -// attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] -// (*) Delay Signing is an advanced option - see the Microsoft .NET Framework -// documentation for more information on this. -// -[assembly: AssemblyDelaySign(false)] -[assembly: AssemblyKeyFile("")] -[assembly: AssemblyKeyName("")] diff --git a/libsecondlife-cs/Inventory/Inventory/ImageTools.cs b/libsecondlife-cs/Inventory/Inventory/ImageTools.cs deleted file mode 100644 index 4be4ea55..00000000 --- a/libsecondlife-cs/Inventory/Inventory/ImageTools.cs +++ /dev/null @@ -1,123 +0,0 @@ -using System; -using System.IO; -using System.Diagnostics; - -namespace libsecondlife -{ - /// - /// Summary description for ImageTools. - /// - public class ImageTools - { - private ImageTools() - { - } - - public static bool Check4Tools() - { - bool status = true; - if( File.Exists("kdu_expand.exe") == false ) - { - status = false; - Console.WriteLine("You need kdu_expand.exe to save SL images."); - } - - if( File.Exists("kdu_compress.exe") == false ) - { - status = false; - Console.WriteLine("You need kdu_compress.exe to load images into SL."); - } - - if( File.Exists("kdu_v51R.dll") == false ) - { - status = false; - Console.WriteLine("You need kdu_v51R.dll for kdu_expand.exe and kdu_compress.exe."); - } - - return status; - } - - public static void WriteJ2CToFile( string j2c_filename, byte[] J2CData ) - { - FileStream fs = System.IO.File.OpenWrite( j2c_filename ); - fs.Write(J2CData, 0, J2CData.Length); - fs.Close(); - } - - - public static void Convert2Tiff( string j2c_filename, string tif_filename ) - { - if( File.Exists("kdu_expand.exe") == false ) - { - throw new Exception("You must have kdu_expand.exe"); - } - - if( tif_filename.ToLower().EndsWith(".tif") == false ) - { - tif_filename += ".tif"; - } - - Process p = new Process(); - p.StartInfo.UseShellExecute = false; - p.StartInfo.FileName = "kdu_expand.exe"; - p.StartInfo.Arguments = "-i " + j2c_filename + " -o " + tif_filename; - p.Start(); - p.WaitForExit(); - } - - public static void WriteJ2CAsTiff( string tif_filename, byte[] J2CData ) - { - String tempname = tif_filename + ".j2c"; - WriteJ2CToFile( tempname, J2CData ); - Convert2Tiff( tempname, tif_filename ); - File.Delete( tempname ); - } - - - /* - * kdu_compress -no_info -no_weights -no_palette -i TestTexture.tif -o TestTexture.J2C - */ - public static void Convert2J2C( string tif_filename, string j2c_filename ) - { - if( File.Exists("kdu_compress.exe") == false ) - { - throw new Exception("You must have kdu_compress.exe"); - } - - if( j2c_filename.ToLower().EndsWith(".j2c") == false ) - { - j2c_filename += ".j2c"; - } - - Process p = new Process(); - p.StartInfo.UseShellExecute = false; - p.StartInfo.FileName = "kdu_compress.exe"; - p.StartInfo.Arguments = "-no_info -no_weights -no_palette -i " + tif_filename + " -o " + j2c_filename; - p.Start(); - p.WaitForExit(); - } - - public static byte[] ReadJ2CData( string filename ) - { - if( (filename.ToLower().EndsWith(".j2c") == false) && (filename.ToLower().EndsWith(".tif") == true) ) - { - string tempname = filename + ".j2c"; - Convert2J2C( filename, tempname ); - filename = tempname; - } - - FileStream fs = File.OpenRead( filename ); - - byte[] data = new byte[fs.Length]; - - if( fs.Length > int.MaxValue ) - { - throw new Exception("AssetImage.cs: Bad stuff going to happen because length bigger then Max Integer"); - } - - fs.Read(data, 0, (int)fs.Length); - - return data; - } - } -} diff --git a/libsecondlife-cs/Inventory/Inventory/Inventory.csproj b/libsecondlife-cs/Inventory/Inventory/Inventory.csproj deleted file mode 100644 index 6cd98319..00000000 --- a/libsecondlife-cs/Inventory/Inventory/Inventory.csproj +++ /dev/null @@ -1,195 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/libsecondlife-cs/Inventory/Inventory/InventoryApp.cs b/libsecondlife-cs/Inventory/Inventory/InventoryApp.cs deleted file mode 100644 index 830ba4d7..00000000 --- a/libsecondlife-cs/Inventory/Inventory/InventoryApp.cs +++ /dev/null @@ -1,89 +0,0 @@ -using System; -using System.Collections; - -using libsecondlife; -using libsecondlife.InventorySystem; - -namespace libsecondlife -{ - /// - /// Summary description for InventoryApp. - /// - abstract public class InventoryApp - { - protected SecondLife client; - protected InventoryManager AgentInventory; - - protected bool DownloadInventoryOnConnect = true; - - protected InventoryApp() - { - try - { - client = new SecondLife("keywords.txt", "protocol.txt"); - } - catch (Exception e) - { - // Error initializing the client, probably missing file(s) - Console.WriteLine(e.ToString()); - return; - } - } - - protected void Connect(string[] args) - { - if (args.Length < 3) - { - Console.WriteLine("Usage: InventoryDump [loginfirstname] [loginlastname] [password]"); - return; - } - - // Setup Login to Second Life - Hashtable loginParams = NetworkManager.DefaultLoginValues(args[0], args[1], args[2], "00:00:00:00:00:00", - "last", 1, 12, 12, 12, "Win", "0", "createnotecard", "static.sprocket@gmail.com"); - Hashtable loginReply = new Hashtable(); - - // Request information on the Root Inventory Folder, and Inventory Skeleton - ArrayList alAdditionalInfo = new ArrayList(); - alAdditionalInfo.Add("inventory-root"); - alAdditionalInfo.Add("inventory-skeleton"); - loginParams.Add("options",alAdditionalInfo); - - // Login - if (!client.Network.Login(loginParams)) - { - // Login failed - Console.WriteLine("Error logging in: " + client.Network.LoginError); - return; - } - - // Login was successful - - - // Get Root Inventory Folder UUID - ArrayList alInventoryRoot = (ArrayList)client.Network.LoginValues["inventory-root"]; - Hashtable htInventoryRoot = (Hashtable)alInventoryRoot[0]; - LLUUID agentRootFolderID = new LLUUID( (string)htInventoryRoot["folder_id"] ); - - // Initialize Inventory Manager object - AgentInventory = new InventoryManager(client, agentRootFolderID); - - if( DownloadInventoryOnConnect ) - { - // and request an inventory download - AgentInventory.DownloadInventory(); - } - - } - - protected void Disconnect() - { - // Logout of Second Life - - Console.WriteLine("Request logout"); - client.Network.Logout(); - } - - abstract protected void doStuff(); - } -} diff --git a/libsecondlife-cs/Inventory/Inventory/Utils.cs b/libsecondlife-cs/Inventory/Inventory/Utils.cs deleted file mode 100644 index 88dd1076..00000000 --- a/libsecondlife-cs/Inventory/Inventory/Utils.cs +++ /dev/null @@ -1,80 +0,0 @@ -using System; - -namespace libsecondlife -{ - /// - /// Summary description for Utils. - /// - public class Utils - { - private Utils() - { - } - - public static string ByteArrayToString( byte[] byteArray ) - { - if ( byteArray == null ) - { - return ""; - } - - string output = ""; - - bool printable = true; - - for (int i = 0; i < byteArray.Length; ++i) - { - // Check if there are any unprintable characters in the array - if ((byteArray[i] < 0x20 || byteArray[i] > 0x7E) && byteArray[i] != 0x09 - && byteArray[i] != 0x0D) - { - printable = false; - } - } - - if (printable) - { - output = Helpers.FieldToString(byteArray); - } - else - { - for (int i = 0; i < byteArray.Length; i += 16) - { - for (int j = 0; j < 16; j++) - { - if ((i + j) < byteArray.Length) - { - string s = String.Format("{0:X} ", byteArray[i + j]); - if( s.Length == 2 ) - { - s = "0" + s; - } - - output += s; - } - else - { - output += " "; - } - } - - for (int j = 0; j < 16 && (i + j) < byteArray.Length; j++) - { - if (byteArray[i + j] >= 0x20 && byteArray[i + j] < 0x7E) - { - output += (char)byteArray[i + j]; - } - else - { - output += "."; - } - } - - output += "\n"; - } - } - - return output; - } - } -} diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryBase.cs b/libsecondlife-cs/InventorySystem/InventoryBase.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryBase.cs rename to libsecondlife-cs/InventorySystem/InventoryBase.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryFolder.cs b/libsecondlife-cs/InventorySystem/InventoryFolder.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryFolder.cs rename to libsecondlife-cs/InventorySystem/InventoryFolder.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryImage.cs b/libsecondlife-cs/InventorySystem/InventoryImage.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryImage.cs rename to libsecondlife-cs/InventorySystem/InventoryImage.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryItem.cs b/libsecondlife-cs/InventorySystem/InventoryItem.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryItem.cs rename to libsecondlife-cs/InventorySystem/InventoryItem.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryManager.cs b/libsecondlife-cs/InventorySystem/InventoryManager.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryManager.cs rename to libsecondlife-cs/InventorySystem/InventoryManager.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryNotecard.cs b/libsecondlife-cs/InventorySystem/InventoryNotecard.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/InventoryNotecard.cs rename to libsecondlife-cs/InventorySystem/InventoryNotecard.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/PacketHelpers/InventoryPackets.cs b/libsecondlife-cs/InventorySystem/PacketHelpers/InventoryPackets.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/PacketHelpers/InventoryPackets.cs rename to libsecondlife-cs/InventorySystem/PacketHelpers/InventoryPackets.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/PacketHelpers/RequestInventoryAsset.cs b/libsecondlife-cs/InventorySystem/PacketHelpers/RequestInventoryAsset.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/PacketHelpers/RequestInventoryAsset.cs rename to libsecondlife-cs/InventorySystem/PacketHelpers/RequestInventoryAsset.cs diff --git a/libsecondlife-cs/Inventory/Inventory/InventorySystem/PacketHelpers/UpdateInventoryItem.cs b/libsecondlife-cs/InventorySystem/PacketHelpers/UpdateInventoryItem.cs similarity index 100% rename from libsecondlife-cs/Inventory/Inventory/InventorySystem/PacketHelpers/UpdateInventoryItem.cs rename to libsecondlife-cs/InventorySystem/PacketHelpers/UpdateInventoryItem.cs