git-svn-id: http://libopenmetaverse.googlecode.com/svn/trunk@152 52acb1d6-8a22-11de-b505-999d5b087335

This commit is contained in:
Michael Cortez
2006-08-14 19:18:41 +00:00
parent 770774ff69
commit 32e283e5be
13 changed files with 799 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,58 @@
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\<configuration>. 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("")]

View File

@@ -0,0 +1,110 @@
using System;
using System.Collections;
using System.IO;
using libsecondlife;
using libsecondlife.InventorySystem;
using libsecondlife.AssetSystem.PacketHelpers;
namespace InventoryTools
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class CreateNotecard : libsecondlife.InventoryApp
{
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
CreateNotecard cn = new CreateNotecard();
cn.Connect(args);
cn.doStuff();
cn.Disconnect();
System.Threading.Thread.Sleep(500);
}
override protected void doStuff()
{
if( AgentInventory == null )
{
return;
}
client.Avatar.OnChat +=new ChatCallback(Avatar_OnChat);
// Find folder to put notecard in
InventoryFolder ifNotecards = AgentInventory.getFolder("Notecards");
// Create Notecard
Console.WriteLine("Create Notecard");
InventoryItem iiNotecard = ifNotecards.NewNotecard("Test Card " + System.DateTime.Now.ToShortTimeString(),"Test Description", "Test Body");
iiNotecard.GiveTo("e225438416bc4f1788ac5beb5b41f141");
// iiNotecard.GiveTo("4403a8f0-245c-a56b-23a7-cc1c72c8f2e9");
// iiNotecard.GiveTo("25472683-cb32-4516-904a-6cd0ecabf128");
/*
StreamReader sr = System.IO.File.OpenText("bignote.txt");
String body = sr.ReadToEnd();
body = "Testing Inventory Delivery";
// Create Notecard
Console.WriteLine("Create Notecard");
InventoryNotecard iNotecard = ifNotecards.NewNotecard("Big Card " + System.DateTime.Now.ToShortTimeString(),"Test Description", body);
*/
// Delete Notecard
// Console.WriteLine("Delete Notecard");
// iNotecard.Delete();
/*
// Create Folder
InventoryFolder ifTestFolderA = ifNotecards.CreateFolder("SubA");
InventoryFolder ifTestFolderB = ifNotecards.CreateFolder("SubB");
// Move a folder
ifTestFolderB.MoveTo( ifTestFolderA );
// Rename a folder
ifTestFolderA.Name = "Sub1";
// Delete Folder
ifTestFolderB.Delete();
// Create Notecard
Console.WriteLine("Create Notecard");
InventoryItem iiNotecard = ifNotecards.NewNotecard("Test Card " + System.DateTime.Now.ToShortTimeString(),"Test Description", "Test Body");
// Move Notecard
Console.WriteLine("Move Notecard");
iiNotecard.MoveTo( ifTestFolderA );
// Delete Notecard
Console.WriteLine("Delete Notecard");
iiNotecard.Delete();
// Delete Folder
ifTestFolderA.Delete();
// Download inventory and output to visually verify Folder has been deleted
AgentInventory.DownloadInventory();
ifNotecards = AgentInventory.getFolder("Notecards");
Console.WriteLine(ifNotecards.toXML());
*/
}
private void Avatar_OnChat(string message, byte audible, byte type, byte sourcetype, string name, LLUUID id, byte command, LLUUID commandID)
{
}
}
}

View File

@@ -0,0 +1,109 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{D5ACEEA1-89CD-4FD2-8A1F-1BD828988FDC}"
>
<Build>
<Settings
ApplicationIcon = "App.ico"
AssemblyKeyContainerName = ""
AssemblyName = "CreateNotecard"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Exe"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "CreateNotecard"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "libsecondlife"
Project = "{D9CDEDFB-8169-4B03-B57F-0DF638F044EC}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "App.ico"
BuildAction = "Content"
/>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "CreateNotecard.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,58 @@
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\<configuration>. 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("")]

View File

@@ -0,0 +1,109 @@
using System;
using System.Collections;
using System.IO;
using libsecondlife;
using libsecondlife.InventorySystem;
using libsecondlife.AssetSystem;
namespace ImageTool
{
/// <summary>
/// Summary description for Class1.
/// </summary>
class ImageTool : libsecondlife.InventoryApp
{
private LLUUID _ImageID;
private string _FileName;
private bool _Put;
/// <summary>
/// Sample texture for downloading: 0444bf21-f77e-7f63-89e9-b839ec66bc15
/// </summary>
[STAThread]
static void Main(string[] args)
{
if( ImageTools.Check4Tools() == false )
{
return;
}
if (args.Length < 5)
{
Console.WriteLine("Usage: ImageTool [first] [last] [password] [get] [uuid] [(filename)]");
Console.WriteLine("Usage: ImageTool [first] [last] [password] [put] [filename]");
Console.WriteLine();
Console.WriteLine("Example: ImageTool John Doe Password get 0444bf21-f77e-7f63-89e9-b839ec66bc15 cloud.tif");
Console.WriteLine("Example: ImageTool John Doe Password put Sample.tif");
return;
}
LLUUID id = null;
string filename = "";
bool put = false;
if( args[3].ToLower().Equals("put") )
{
put = true;
filename = args[4];
}
else
{
id = new LLUUID(args[4]);
if( args.Length == 6 )
{
filename = args[5];
}
else
{
filename = args[4] + ".tif";
}
}
ImageTool it = new ImageTool( id, filename, put );
it.Connect(args);
it.doStuff();
it.Disconnect();
System.Threading.Thread.Sleep(500);
}
protected ImageTool( LLUUID imageID, string filename, bool put )
{
_ImageID = imageID;
_FileName = filename;
_Put = put;
}
protected override void doStuff()
{
if( _Put )
{
Console.WriteLine("Reading: " + _FileName);
byte[] j2cdata = ImageTools.ReadJ2CData( _FileName );
Console.WriteLine("Connecting to your Texture folder...");
InventoryFolder iFolder = AgentInventory.getFolder("Textures");
Console.WriteLine("Uploading Texture...");
iFolder.NewImage( _FileName, "ImageTool Upload", j2cdata );
}
else
{
Console.WriteLine("Downloading: " + _ImageID);
ImageManager im = new ImageManager( base.client );
byte[] j2cdata = im.RequestImage( _ImageID );
Console.WriteLine("Writing to: " + _FileName);
ImageTools.WriteJ2CAsTiff( _FileName, j2cdata );
}
Console.WriteLine("Done...");
}
}
}

View File

@@ -0,0 +1,109 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{6ACF3FF4-CFA5-478B-993E-F788A1030CEB}"
>
<Build>
<Settings
ApplicationIcon = "App.ico"
AssemblyKeyContainerName = ""
AssemblyName = "ImageTool"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Exe"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "ImageTool"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = "ImageTool.ImageTool"
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "libsecondlife"
Project = "{D9CDEDFB-8169-4B03-B57F-0DF638F044EC}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "App.ico"
BuildAction = "Content"
/>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "ImageTool.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>

View File

@@ -0,0 +1,5 @@
SecondLife uses Kakadu Software's JPEG2000 framework to compress and expand images to/from JPEG2000.
Libsecondlife currently makes use of a freely available set of command line tools from Kakadu to support Image upload and download from SecondLife.
These tools are available from Kakadu's website at http://www.kakadusoftware.com/

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1,58 @@
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\<configuration>. 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("")]

View File

@@ -0,0 +1,74 @@
using System;
using System.Collections;
using System.IO;
using libsecondlife;
using libsecondlife.InventorySystem;
namespace InventoryDump
{
class InventoryDump : libsecondlife.InventoryApp
{
private string sOutputFile;
private bool bOutputAssets;
/// <summary>
/// The main entry point for the application.
/// </summary>
[STAThread]
static void Main(string[] args)
{
if (args.Length < 3)
{
Console.WriteLine("Usage: InventoryDump [loginfirstname] [loginlastname] [password] [output.xml]");
return;
}
InventoryDump id = new InventoryDump();
if( args.Length == 4 )
{
id.sOutputFile = args[3];
} else {
id.sOutputFile = "output.xml";
}
id.bOutputAssets = false;
id.Connect(args);
id.doStuff();
id.Disconnect();
System.Threading.Thread.Sleep(500);
}
override protected void doStuff()
{
if( AgentInventory == null )
{
return;
}
// Request Inventory Download
try
{
AgentInventory.DownloadInventory();
Console.WriteLine("Writing Inventory to " + sOutputFile);
// Save inventory to file.
StreamWriter sw = File.CreateText(sOutputFile);
sw.Write(AgentInventory.getRootFolder().toXML( bOutputAssets ) );
sw.Close();
Console.WriteLine("Done.");
}
catch ( Exception e )
{
Console.WriteLine( e.Message );
Console.WriteLine("An error occured while downloading inventory, please report this along with any output to Static Sprocket.");
}
}
}
}

View File

@@ -0,0 +1,109 @@
<VisualStudioProject>
<CSHARP
ProjectType = "Local"
ProductVersion = "7.10.3077"
SchemaVersion = "2.0"
ProjectGuid = "{6478BE37-9272-4D91-B641-5E2FD0680B27}"
>
<Build>
<Settings
ApplicationIcon = "App.ico"
AssemblyKeyContainerName = ""
AssemblyName = "InventoryDump"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
DefaultTargetSchema = "IE50"
DelaySign = "false"
OutputType = "Exe"
PreBuildEvent = ""
PostBuildEvent = ""
RootNamespace = "InventoryDump"
RunPostBuildEvent = "OnBuildSuccess"
StartupObject = ""
>
<Config
Name = "Debug"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "DEBUG;TRACE"
DocumentationFile = ""
DebugSymbols = "true"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "false"
OutputPath = "bin\Debug\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
<Config
Name = "Release"
AllowUnsafeBlocks = "false"
BaseAddress = "285212672"
CheckForOverflowUnderflow = "false"
ConfigurationOverrideFile = ""
DefineConstants = "TRACE"
DocumentationFile = ""
DebugSymbols = "false"
FileAlignment = "4096"
IncrementalBuild = "false"
NoStdLib = "false"
NoWarn = ""
Optimize = "true"
OutputPath = "bin\Release\"
RegisterForComInterop = "false"
RemoveIntegerChecks = "false"
TreatWarningsAsErrors = "false"
WarningLevel = "4"
/>
</Settings>
<References>
<Reference
Name = "System"
AssemblyName = "System"
HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
/>
<Reference
Name = "System.Data"
AssemblyName = "System.Data"
HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
/>
<Reference
Name = "System.XML"
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
<Reference
Name = "libsecondlife"
Project = "{D9CDEDFB-8169-4B03-B57F-0DF638F044EC}"
Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}"
/>
</References>
</Build>
<Files>
<Include>
<File
RelPath = "App.ico"
BuildAction = "Content"
/>
<File
RelPath = "AssemblyInfo.cs"
SubType = "Code"
BuildAction = "Compile"
/>
<File
RelPath = "InventoryDump.cs"
SubType = "Code"
BuildAction = "Compile"
/>
</Include>
</Files>
</CSHARP>
</VisualStudioProject>