2005-12-01 Aaron Bockover <aaron@aaronbock.net>

* configure.ac: Fixed typo in detecting MONODOCER, bumped to version 0.2
    * src/Makefile.am: Added DataFile.cs, link against Mono.Posix.dll
    * njb-sharp.md[sp]: MonoDevelop solution/project file
    * src/Device.cs: Added fetch support for songs; fixed minor syntax issues;
    added DataFile container list support; do not cache Song/DataFile objects
    * src/Global.cs:
    * src/SongFrame.cs:
    * src/Song.cs: fixed syntaxt issues
    * src/Discoverer.cs: Remove IDisposable, fixed minor syntax issues
    * src/NjbTest.cs: Added song transfer support to test case
    * src/DataFile.cs: Skeleton bindings for Data File support
    * Makefile.am: Make DISTCLEANFILES standard
    * vacuum.sh: Clean out autogenerated build gunk
    * src/en/*: Updated docs


svn path=/trunk/njb-sharp/; revision=53816
This commit is contained in:
Aaron Bockover 2005-12-02 04:01:49 +00:00
Родитель a1bbee5833
Коммит 222c0443a7
27 изменённых файлов: 977 добавлений и 221 удалений

Просмотреть файл

@ -1,3 +1,20 @@
2005-12-01 Aaron Bockover <aaron@aaronbock.net>
* configure.ac: Fixed typo in detecting MONODOCER, bumped to version 0.2
* src/Makefile.am: Added DataFile.cs, link against Mono.Posix.dll
* njb-sharp.md[sp]: MonoDevelop solution/project file
* src/Device.cs: Added fetch support for songs; fixed minor syntax issues;
added DataFile container list support; do not cache Song/DataFile objects
* src/Global.cs:
* src/SongFrame.cs:
* src/Song.cs: fixed syntaxt issues
* src/Discoverer.cs: Remove IDisposable, fixed minor syntax issues
* src/NjbTest.cs: Added song transfer support to test case
* src/DataFile.cs: Skeleton bindings for Data File support
* Makefile.am: Make DISTCLEANFILES standard
* vacuum.sh: Clean out autogenerated build gunk
* src/en/*: Updated docs
2005-10-11 Aaron Bockover <aaron@aaronbock.net>
* src/Discoverer.cs: Make ArrayHandle internal

Просмотреть файл

@ -3,5 +3,6 @@ SUBDIRS = src
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = njb-sharp.pc
DISTCLEANFILES = config.* aclocal.m4 configure depcomp INSTALL install-sh missing ltmain.sh Makefile.in
DISTCLEANFILES = Makefile.in

Просмотреть файл

@ -2,8 +2,8 @@ AC_INIT(README)
AC_CANONICAL_SYSTEM
MAJOR_VERSION=0
MINOR_VERSION=1
MICRO_VERSION=1
MINOR_VERSION=2
MICRO_VERSION=0
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION
AM_INIT_AUTOMAKE(njb-sharp, $VERSION)
@ -16,8 +16,7 @@ AM_MAINTAINER_MODE
AC_PROG_CC
AM_PROG_LIBTOOL
PKG_CHECK_MODULES(NJB,
libnjb >= 2.2.4)
PKG_CHECK_MODULES(NJB, libnjb >= 2.2.4)
AC_PATH_PROG(MONO, mono, no)
if test "x$MONO" = "xno"; then
@ -33,7 +32,7 @@ AC_ARG_ENABLE(docs, AC_HELP_STRING([--disable-docs], [Do not build documentation
if test "x$with_docs" = "xyes"; then
AC_PATH_PROG(MONODOCER, monodocer, no)
if test "x$MONODOC" = "xno"; then
if test "x$MONODOCER" = "xno"; then
AC_MSG_ERROR([You need to install monodoc])
fi

34
njb-sharp.mdp Normal file
Просмотреть файл

@ -0,0 +1,34 @@
<Project name="njb-sharp" fileversion="2.0" Description="C# bindings to libnjb: http://libnjb.sourceforge.net/" language="C#" ctype="DotNetProject">
<Configurations active="Debug">
<Configuration name="Debug" ctype="DotNetProjectConfiguration">
<Output directory="./src" assembly="njb-sharp" />
<Build debugmode="True" target="Library" />
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" />
<CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
</Configuration>
<Configuration name="Release" ctype="DotNetProjectConfiguration">
<Output directory="./src" assembly="njb-sharp" />
<Build debugmode="False" target="Library" />
<Execution runwithwarnings="True" consolepause="True" runtime="MsNet" />
<CodeGeneration compiler="Csc" warninglevel="4" optimize="True" unsafecodeallowed="False" generateoverflowchecks="True" mainclass="" generatexmldocumentation="False" ctype="CSharpCompilerParameters" />
</Configuration>
</Configurations>
<DeploymentInformation strategy="File">
<excludeFiles />
</DeploymentInformation>
<Contents>
<File name="./src/Device.cs" subtype="Code" buildaction="Compile" />
<File name="./src/Discoverer.cs" subtype="Code" buildaction="Compile" />
<File name="./src/Global.cs" subtype="Code" buildaction="Compile" />
<File name="./src/njb-glue.c" subtype="Code" buildaction="Nothing" />
<File name="./src/NjbTest.cs" subtype="Code" buildaction="Nothing" />
<File name="./src/Revision.cs" subtype="Code" buildaction="Compile" />
<File name="./src/Song.cs" subtype="Code" buildaction="Compile" />
<File name="./src/SongFrame.cs" subtype="Code" buildaction="Compile" />
<File name="./src/Utility.cs" subtype="Code" buildaction="Compile" />
<File name="./src/DataFile.cs" subtype="Code" buildaction="Compile" />
</Contents>
<References>
<ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, Version=1.0.5000.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
</References>
</Project>

16
njb-sharp.mds Normal file
Просмотреть файл

@ -0,0 +1,16 @@
<Combine name="njb-sharp" fileversion="2.0">
<Configurations active="Debug">
<Configuration name="Debug" ctype="CombineConfiguration">
<Entry configuration="Debug" build="True" name="njb-sharp" />
</Configuration>
<Configuration name="Release" ctype="CombineConfiguration">
<Entry configuration="Debug" build="True" name="njb-sharp" />
</Configuration>
</Configurations>
<StartMode startupentry="njb-sharp" single="True">
<Execute type="None" entry="njb-sharp" />
</StartMode>
<Entries>
<Entry filename="./njb-sharp.mdp" />
</Entries>
</Combine>

123
src/DataFile.cs Normal file
Просмотреть файл

@ -0,0 +1,123 @@
/* -*- Mode: csharp; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: t -*- */
/***************************************************************************
* DataFile.cs
*
* Copyright (C) 2005 Novell
* Written by Aaron Bockover (aaron@aaronbock.net)
****************************************************************************/
/* THIS FILE IS LICENSED UNDER THE MIT LICENSE AS OUTLINED IMMEDIATELY BELOW:
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
using System;
using System.Collections;
using System.Runtime.InteropServices;
namespace Njb
{
[StructLayout(LayoutKind.Sequential)]
internal struct njb_datafile_t
{
public IntPtr filename;
public IntPtr folder;
public uint timestamp;
public uint flags;
public uint dfid;
public ulong filesize;
#pragma warning disable 0169
private IntPtr nextdf;
#pragma warning restore 0169
}
public class DataFile : IDisposable
{
[DllImport("libnjb")]
private static extern void NJB_Datafile_Destroy(HandleRef df);
private HandleRef handle;
private string filename;
private string folder;
private uint timestamp;
private uint flags;
private uint dfid;
private ulong filesize;
internal DataFile(IntPtr df_ptr)
{
handle = new HandleRef(this, df_ptr);
njb_datafile_t df_raw = (njb_datafile_t)Marshal.PtrToStructure(df_ptr, typeof(njb_datafile_t));
filename = Utility.PtrToUtf8String(df_raw.filename);
folder = Utility.PtrToUtf8String(df_raw.folder);
timestamp = df_raw.timestamp;
flags = df_raw.flags;
dfid = df_raw.dfid;
filesize = df_raw.filesize;
}
public void Dispose()
{
NJB_Datafile_Destroy(handle);
}
public string FileName {
get {
return filename;
}
}
public string Folder {
get {
return folder;
}
}
public uint TimeStamp {
get {
return timestamp;
}
}
public uint Flags {
get {
return flags;
}
}
public uint Id {
get {
return dfid;
}
}
public ulong FileSize {
get {
return filesize;
}
}
public override string ToString()
{
return String.Format("{0}/{1} ({2}) T:{3}", Folder, FileName, FileSize, TimeStamp);
}
}
}

Просмотреть файл

@ -28,14 +28,26 @@
*/
using System;
using System.IO;
using System.Collections;
using System.Runtime.InteropServices;
using Mono.Unix;
namespace Njb
{
public delegate void ForeachErrorCallback(string error);
public delegate void TransferProgressHandler(object o, TransferProgressArgs args);
public class Device
public class TransferProgressArgs : EventArgs
{
public Song Song;
public ulong Current;
public ulong Total;
}
internal delegate void NjbXferCallback(ulong sent, ulong total, IntPtr buf, uint len, IntPtr data);
public class Device : IDisposable
{
private Discoverer discoverer;
private int index;
@ -65,8 +77,7 @@ namespace Njb
private static extern IntPtr NJB_Get_Owner_String(IntPtr njb);
[DllImport("libnjb")]
private static extern int NJB_Set_Owner_String(IntPtr njb,
IntPtr strPtr);
private static extern int NJB_Set_Owner_String(IntPtr njb, IntPtr strPtr);
[DllImport("libnjb")]
private static extern IntPtr NJB_Get_Device_Name(IntPtr njb, int type);
@ -101,9 +112,21 @@ namespace Njb
[DllImport("libnjb")]
private static extern IntPtr NJB_Get_Track_Tag(IntPtr njb);
[DllImport("libnjb")]
private static extern void NJB_Reset_Get_Datafile_Tag(IntPtr njb);
[DllImport("libnjb")]
private static extern IntPtr NJB_Get_Datafile_Tag(IntPtr njb);
[DllImport("libnjb")]
private static extern int NJB_Get_Track_fd(IntPtr njb, uint trackid, uint size, int fd,
NjbXferCallback cb, IntPtr data);
[DllImport("libnjbglue")]
private static extern IntPtr NJB_Glue_Get_Device(int index);
public event TransferProgressHandler ReadProgressChanged;
public Device(Discoverer discoverer, int index)
{
this.discoverer = discoverer;
@ -115,7 +138,7 @@ namespace Njb
return NJB_Open(Handle) != -1;
}
public void Close()
public void Dispose()
{
NJB_Close(Handle);
}
@ -144,45 +167,39 @@ namespace Njb
}
}
public IntPtr Handle
{
internal IntPtr Handle {
get {
return NJB_Glue_Get_Device(index);
}
}
public int Index
{
public int Index {
get {
return index;
}
}
public Discoverer Discoverer
{
public Discoverer Discoverer {
get {
return discoverer;
}
}
public string Name
{
public string Name {
get {
IntPtr ptr = NJB_Get_Device_Name(Handle, 0);
return Utility.PtrToUtf8String(ptr);
}
}
public string UsbName
{
public string UsbName {
get {
IntPtr ptr = NJB_Get_Device_Name(Handle, 1);
return Utility.PtrToUtf8String(ptr);
}
}
public string Owner
{
public string Owner {
get {
IntPtr ptr = NJB_Get_Owner_String(Handle);
return Utility.PtrToUtf8String(ptr);
@ -199,29 +216,25 @@ namespace Njb
}
}
public int BatteryLevel
{
public int BatteryLevel {
get {
return NJB_Get_Battery_Level(Handle);
}
}
public bool BatteryCharging
{
public bool IsBatteryCharging {
get {
return NJB_Get_Battery_Charging(Handle) == 1;
}
}
public bool AuxilaryPower
{
public bool AuxilaryPower {
get {
return NJB_Get_Auxpower(Handle) == 1;
}
}
public ulong DiskFree
{
public ulong DiskFree {
get {
ulong total, free;
GetDiskUsage(out total, out free);
@ -229,8 +242,7 @@ namespace Njb
}
}
public ulong DiskTotal
{
public ulong DiskTotal {
get {
ulong total, free;
GetDiskUsage(out total, out free);
@ -238,13 +250,11 @@ namespace Njb
}
}
public Revision FirmwareRevision
{
public Revision FirmwareRevision {
get {
Revision rev = new Revision();
if(NJB_Get_Firmware_Revision(Handle, out rev.Major,
out rev.Minor, out rev.Release) == 0) {
if(NJB_Get_Firmware_Revision(Handle, out rev.Major, out rev.Minor, out rev.Release) == 0) {
return rev;
}
@ -252,13 +262,11 @@ namespace Njb
}
}
public Revision HardwareRevision
{
public Revision HardwareRevision {
get {
Revision rev = new Revision();
if(NJB_Get_Hardware_Revision(Handle, out rev.Major,
out rev.Minor, out rev.Release) == 0) {
if(NJB_Get_Hardware_Revision(Handle, out rev.Major, out rev.Minor, out rev.Release) == 0) {
return rev;
}
@ -266,8 +274,7 @@ namespace Njb
}
}
public byte [] SdmiId
{
public byte [] SdmiId {
get {
IntPtr memalloc = Marshal.AllocHGlobal(16);
@ -288,8 +295,7 @@ namespace Njb
}
}
public string SdmiIdString
{
public string SdmiIdString {
get {
string idstr = String.Empty;
byte [] id = SdmiId;
@ -302,22 +308,14 @@ namespace Njb
}
}
private Song [] songs;
public Song [] Songs
{
public Song [] Songs {
get {
if(songs != null) {
return songs;
}
ArrayList list = new ArrayList();
IntPtr songPtr = IntPtr.Zero;
NJB_Reset_Get_Track_Tag(Handle);
while((songPtr = NJB_Get_Track_Tag(Handle))
!= IntPtr.Zero) {
while((songPtr = NJB_Get_Track_Tag(Handle)) != IntPtr.Zero) {
list.Add(new Song(songPtr));
}
@ -325,14 +323,47 @@ namespace Njb
}
}
public Song [] ReloadSongs()
public void ReadSong(Song song, string path)
{
songs = null;
return Songs;
UnixStream stream = (new UnixFileInfo(path)).Open(FileMode.Create, FileAccess.ReadWrite,
Mono.Unix.Native.FilePermissions.S_IWUSR |
Mono.Unix.Native.FilePermissions.S_IRUSR |
Mono.Unix.Native.FilePermissions.S_IRGRP |
Mono.Unix.Native.FilePermissions.S_IROTH);
if(NJB_Get_Track_fd(Handle, (uint)song.Id, song.FileSize,
stream.Handle, delegate(ulong sent, ulong total, IntPtr buf, uint len, IntPtr data) {
if(ReadProgressChanged != null) {
TransferProgressArgs args = new TransferProgressArgs();
args.Current = sent;
args.Total = total;
args.Song = song;
ReadProgressChanged(this, args);
}
}, IntPtr.Zero) == -1) {
stream.Close();
throw new ApplicationException("Error reading song");
}
public string NextError
{
stream.Close();
}
public DataFile [] DataFiles {
get {
ArrayList list = new ArrayList();
IntPtr df_ptr = IntPtr.Zero;
NJB_Reset_Get_Datafile_Tag(Handle);
while((df_ptr = NJB_Get_Datafile_Tag(Handle)) != IntPtr.Zero) {
list.Add(new DataFile(df_ptr));
}
return list.ToArray(typeof(DataFile)) as DataFile [];
}
}
public string NextError {
get {
IntPtr ptr = NJB_Error_Geterror(Handle);
if(ptr == IntPtr.Zero) {
@ -349,15 +380,13 @@ namespace Njb
}
}
public bool IsErrorPending
{
public bool IsErrorPending {
get {
return NJB_Error_Pending(Handle) != 0;
}
}
public string [] ErrorsPending
{
public string [] ErrorsPending {
get {
if(!IsErrorPending) {
return null;
@ -393,7 +422,7 @@ namespace Njb
text.AppendFormat("USB Name: {0}\n", UsbName);
text.AppendFormat("Owner: {0}\n", Owner);
text.AppendFormat("Battery Level: {0}%\n", BatteryLevel);
text.AppendFormat("Battery Charging: {0}\n", BatteryCharging ? "YES" : "NO");
text.AppendFormat("Battery Charging: {0}\n", IsBatteryCharging ? "YES" : "NO");
text.AppendFormat("Aux. Power: {0}\n", AuxilaryPower ? "YES" : "NO");
text.AppendFormat("Disk Total: {0}\n", DiskTotal);
text.AppendFormat("Disk Free: {0}\n", DiskFree);

Просмотреть файл

@ -33,11 +33,10 @@ using System.Runtime.InteropServices;
namespace Njb
{
public class Discoverer : IDisposable, IEnumerable
public class Discoverer : IEnumerable
{
[DllImport("libnjb")]
private static extern int NJB_Discover(IntPtr njbs, int limit,
out int count);
private static extern int NJB_Discover(IntPtr njbs, int limit, out int count);
[DllImport("libnjbglue")]
private static extern IntPtr NJB_Glue_Get_Device_Array();
@ -62,20 +61,13 @@ namespace Njb
}
}
public void Dispose()
{
}
internal IntPtr ArrayHandle
{
internal IntPtr ArrayHandle {
get {
return njbs;
}
}
public Device this[int i]
{
public Device this [int i] {
get {
return devices[i];
}

Просмотреть файл

@ -32,7 +32,7 @@ using System.Runtime.InteropServices;
namespace Njb
{
public class Global
public static class Global
{
[DllImport("libnjb")]
private static extern void NJB_Set_Debug(int debug_flags);
@ -48,15 +48,13 @@ namespace Njb
ALL = 1 | 2 | 4 | 8
}
public static DebugFlags Debug
{
public static DebugFlags Debug {
set {
NJB_Set_Debug((int)value);
}
}
public static bool Unicode
{
public static bool Unicode {
set {
NJB_Set_Unicode(value ? 1 : 0);
}

Просмотреть файл

@ -1,3 +1,4 @@
MCS_FLAGS = -debug
ASSEMBLY = njb-sharp.dll
TESTASM = njb-test.exe
INCLUDES = $(NJB_CFLAGS)
@ -6,7 +7,7 @@ DOC_UPDATER = @MONODOCER@ -delete
DOC_ASSEMBLER = @MDASSEMBLER@ --out njb-sharp-docs --ecma
njbdir = $(prefix)/lib/njb-sharp
njb_DATA = $(ASSEMBLY)
njb_SCRIPTS = $(ASSEMBLY) $(ASSEMBLY).mdb
njb_LTLIBRARIES = libnjbglue.la
noinst_DATA = $(TESTASM)
@ -19,6 +20,7 @@ libnjbglue_la_LIBADD = $(NJB_LIBS)
ASSEMBLY_SOURCES = \
$(srcdir)/Discoverer.cs \
$(srcdir)/Device.cs \
$(srcdir)/DataFile.cs \
$(srcdir)/Song.cs \
$(srcdir)/SongFrame.cs \
$(srcdir)/Global.cs \
@ -42,7 +44,7 @@ njb_sharp_generated_sources = $(njb_sharp_sources_in:.in=)
all: $(ASSEMBLY) $(TESTASM)
$(ASSEMBLY): $(ASSEMBLY_SOURCES)
$(MCS) $(MCS_FLAGS) -target:library -out:$@ $(ASSEMBLY_SOURCES) $(njb_sharp_generated_sources)
$(MCS) $(MCS_FLAGS) -target:library -r:Mono.Posix -out:$@ $(ASSEMBLY_SOURCES) $(njb_sharp_generated_sources)
$(TESTASM): $(TESTASM_SOURCES)
$(MCS) $(MCS_FLAGS) -out:$@ -r:$(ASSEMBLY) $(TESTASM_SOURCES)
@ -64,6 +66,6 @@ EXTRA_DIST = \
njb-sharp-docs.source \
AssemblyInfo.cs.in
CLEANFILES = $(ASSEMBLY) $(TESTASM)
CLEANFILES = $(ASSEMBLY) $(TESTASM) *.mdb
DISTCLEANFILES = Makefile.in njb-sharp-docs.zip njb-sharp-docs.tree

Просмотреть файл

@ -39,7 +39,7 @@ public class Test
}
}
public static void Main()
public static void Main(string [] args)
{
Discoverer discoverer = new Discoverer();
//Global.Debug = Global.DebugFlags.ALL;
@ -57,17 +57,51 @@ public class Test
device.Capture();
//device.Owner = "Aaron Bockover";
Console.WriteLine(device);
if(args.Length == 0) {
foreach(Song song in device.Songs) {
Console.WriteLine(song);
}
} else {
bool get_all = args[0] == "all";
foreach(string sid in args) {
int id =0;
if(!get_all) {
try {
id = Convert.ToInt32(sid);
} catch(Exception) {
continue;
}
}
foreach(Song song in device.Songs) {
if(song.Id != id && !get_all) {
continue;
}
string filename = song.TrackNumber.ToString("00") + ". " + song.Artist
+ " - " + song.Title + "." + song.Codec.ToLower();
device.ReadProgressChanged += OnProgress;
device.ReadSong(song, filename);
device.ReadProgressChanged -= OnProgress;
Console.WriteLine("");
}
}
}
device.Release();
device.Close();
device.Dispose();
}
}
discoverer.Dispose();
public static void OnProgress(object o, TransferProgressArgs args)
{
Console.Write("Transferring {0} - {1}: {2}%\r", args.Song.Artist, args.Song.Title,
(args.Current * 100) / args.Total);
}
}

Просмотреть файл

@ -44,6 +44,25 @@ namespace Njb
public IntPtr next;
}
internal sealed class FrameName
{
public static readonly string
Album = "ALBUM",
Artist = "ARTIST",
Bitrate = "BITRATE",
Codec = "CODEC",
Comment = "COMMENT",
FileName = "FNAME",
Folder = "FOLDER",
Genre = "GENRE",
Length = "LENGTH",
Protected = "PlayOnly",
FileSize = "FILE SIZE",
Title = "TITLE",
TrackNumber = "TRACK NUM",
Year = "YEAR";
}
public class Song : IDisposable
{
[DllImport("libnjb")]
@ -61,24 +80,159 @@ namespace Njb
private HandleRef handle;
private int id;
private int nframes;
private ArrayList frames;
public Song() : this(NJB_Songid_New())
{
}
public Song(IntPtr songidPtr)
{
handle = new HandleRef(this, songidPtr);
njb_songid_t songidRaw = (njb_songid_t)Marshal.PtrToStructure(
songidPtr, typeof(njb_songid_t));
njb_songid_t songidRaw = (njb_songid_t)Marshal.PtrToStructure(songidPtr, typeof(njb_songid_t));
id = (int)songidRaw.trid;
nframes = (int)songidRaw.nframes;
}
frames = new ArrayList();
internal HandleRef Handle {
get {
return handle;
}
}
public int Id {
get {
return id;
}
}
public int FrameCount {
get {
return nframes;
}
}
private SongFrame FindFrame(string label)
{
return SongFrame.Find(this, label);
}
private string GetFrameString(string label)
{
SongFrame frame = FindFrame(label);
if(frame == null) {
return null;
}
return frame.DataString;
}
private ushort GetFrameShort(string label)
{
SongFrame frame = FindFrame(label);
if(frame == null) {
return 0;
}
return frame.DataShort;
}
private uint GetFrameInt(string label)
{
SongFrame frame = FindFrame(label);
if(frame == null) {
return 0;
}
return frame.DataInt;
}
public string Album {
get {
return GetFrameString(FrameName.Album);
}
}
public string Artist {
get {
return GetFrameString(FrameName.Artist);
}
}
public uint Bitrate {
get {
return GetFrameInt(FrameName.Bitrate);
}
}
public string Codec {
get {
return GetFrameString(FrameName.Codec);
}
}
public string Comment {
get {
return GetFrameString(FrameName.Comment);
}
}
public string FileName {
get {
return GetFrameString(FrameName.FileName);
}
}
public uint FileSize {
get {
return GetFrameInt(FrameName.FileSize);
}
}
public string Folder {
get {
return GetFrameString(FrameName.Folder);
}
}
public string Genre {
get {
return GetFrameString(FrameName.Genre);
}
}
public ushort Length {
get {
return GetFrameShort(FrameName.Length);
}
}
public bool IsProtected {
get {
return GetFrameShort(FrameName.Protected) != 0;
}
}
public string Title {
get {
return GetFrameString(FrameName.Title);
}
}
public ushort TrackNumber {
get {
return GetFrameShort(FrameName.TrackNumber);
}
}
public ushort Year {
get {
return GetFrameShort(FrameName.Year);
}
}
public SongFrame [] Frames {
get {
ArrayList frames = new ArrayList();
IntPtr framePtr = IntPtr.Zero;
NJB_Songid_Reset_Getframe(handle);
@ -86,25 +240,7 @@ namespace Njb
while((framePtr = NJB_Songid_Getframe(handle)) != IntPtr.Zero) {
frames.Add(new SongFrame(framePtr));
}
}
public int Id
{
get {
return id;
}
}
public int FrameCount
{
get {
return nframes;
}
}
public SongFrame [] Frames
{
get {
return frames.ToArray(typeof(SongFrame)) as SongFrame [];
}
}

Просмотреть файл

@ -62,6 +62,19 @@ namespace Njb
[DllImport("libnjbglue")]
private static extern uint NJB_Glue_Song_Frame_Get_Data_UInt32(IntPtr frame);
[DllImport("libnjb")]
private static extern IntPtr NJB_Songid_Findframe(HandleRef handle, IntPtr label);
public static SongFrame Find(Song song, string label)
{
IntPtr ptr = NJB_Songid_Findframe(song.Handle, Utility.Utf8StringToPtr(label));
if(ptr == IntPtr.Zero) {
return null;
}
return new SongFrame(ptr);
}
public SongFrame(IntPtr framePtr)
{
label = Utility.PtrToUtf8String(NJB_Glue_Song_Frame_Get_Label(framePtr));
@ -84,22 +97,19 @@ namespace Njb
}
}
public string Label
{
public string Label {
get {
return label;
}
}
public SongFrameType FrameType
{
public SongFrameType FrameType {
get {
return frameType;
}
}
public string DataString
{
public string DataString {
get {
if(FrameType != SongFrameType.String) {
throw new ApplicationException("Frame data is not string");
@ -109,8 +119,7 @@ namespace Njb
}
}
public ushort DataShort
{
public ushort DataShort {
get {
if(FrameType != SongFrameType.UInt16) {
throw new ApplicationException("Frame data is not uint16");
@ -120,8 +129,7 @@ namespace Njb
}
}
public uint DataInt
{
public uint DataInt {
get {
if(FrameType != SongFrameType.UInt32) {
throw new ApplicationException("Frame data is not uint32");

105
src/en/Njb/DataFile.xml Normal file
Просмотреть файл

@ -0,0 +1,105 @@
<Type Name="DataFile" FullName="Njb.DataFile">
<TypeSignature Language="C#" Value="public class DataFile : System.IDisposable" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Members>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FileName">
<MemberSignature Language="C#" Value="public string FileName { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Folder">
<MemberSignature Language="C#" Value="public string Folder { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TimeStamp">
<MemberSignature Language="C#" Value="public uint TimeStamp { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Flags">
<MemberSignature Language="C#" Value="public uint Flags { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Id">
<MemberSignature Language="C#" Value="public uint Id { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FileSize">
<MemberSignature Language="C#" Value="public ulong FileSize { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt64</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Type>

Просмотреть файл

@ -1,13 +1,17 @@
<Type Name="Device" FullName="Njb.Device">
<TypeSignature Language="C#" Value="public class Device" />
<TypeSignature Language="C#" Value="public class Device : System.IDisposable" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Interfaces>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Device (Njb.Discoverer discoverer, int index);" />
@ -36,18 +40,6 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Close">
<MemberSignature Language="C#" Value="public void Close ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Capture">
<MemberSignature Language="C#" Value="public bool Capture ();" />
<MemberType>Method</MemberType>
@ -103,19 +95,6 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ReloadSongs">
<MemberSignature Language="C#" Value="public Njb.Song[] ReloadSongs ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Njb.Song[]</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ForeachError">
<MemberSignature Language="C#" Value="public void ForeachError (Njb.ForeachErrorCallback callback);" />
<MemberType>Method</MemberType>
@ -131,18 +110,6 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Handle">
<MemberSignature Language="C#" Value="public IntPtr Handle { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Index">
<MemberSignature Language="C#" Value="public int Index { get; };" />
<MemberType>Property</MemberType>
@ -215,18 +182,6 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="BatteryCharging">
<MemberSignature Language="C#" Value="public bool BatteryCharging { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="AuxilaryPower">
<MemberSignature Language="C#" Value="public bool AuxilaryPower { get; };" />
<MemberType>Property</MemberType>
@ -359,6 +314,70 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ReadProgressChanged">
<MemberSignature Language="C#" Value="public event Njb.TransferProgressHandler ReadProgressChanged;" />
<MemberType>Event</MemberType>
<ReturnValue>
<ReturnType>Njb.TransferProgressHandler</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ReadSong">
<MemberSignature Language="C#" Value="public void ReadSong (Njb.Song song, string path);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="song" Type="Njb.Song" />
<Parameter Name="path" Type="System.String" />
</Parameters>
<Docs>
<param name="song">To be added.</param>
<param name="path">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsBatteryCharging">
<MemberSignature Language="C#" Value="public bool IsBatteryCharging { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="DataFiles">
<MemberSignature Language="C#" Value="public Njb.DataFile[] DataFiles { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>Njb.DataFile[]</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
<Docs>
<summary>To be added.</summary>

Просмотреть файл

@ -1,8 +1,8 @@
<Type Name="Discoverer" FullName="Njb.Discoverer">
<TypeSignature Language="C#" Value="public class Discoverer : System.Collections.IEnumerable, System.IDisposable" />
<TypeSignature Language="C#" Value="public class Discoverer : System.Collections.IEnumerable" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
@ -11,9 +11,6 @@
<Interface>
<InterfaceName>System.Collections.IEnumerable</InterfaceName>
</Interface>
<Interface>
<InterfaceName>System.IDisposable</InterfaceName>
</Interface>
</Interfaces>
<Attributes>
<Attribute>
@ -30,18 +27,6 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Dispose">
<MemberSignature Language="C#" Value="public void Dispose ();" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="GetEnumerator">
<MemberSignature Language="C#" Value="public System.Collections.IEnumerator GetEnumerator ();" />
<MemberType>Method</MemberType>
@ -55,18 +40,6 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="ArrayHandle">
<MemberSignature Language="C#" Value="public IntPtr ArrayHandle { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.IntPtr</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Item">
<MemberSignature Language="C#" Value="public Njb.Device Item[int i] { get; };" />
<MemberType>Property</MemberType>

Просмотреть файл

@ -2,7 +2,7 @@
<TypeSignature Language="C#" Value="public delegate void ForeachErrorCallback(string error);" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>

Просмотреть файл

@ -2,7 +2,7 @@
<TypeSignature Language="C#" Value="public enum DebugFlags" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Enum</BaseTypeName>

Просмотреть файл

@ -1,23 +1,14 @@
<Type Name="Global" FullName="Njb.Global">
<TypeSignature Language="C#" Value="public class Global" />
<TypeSignature Language="C#" Value="public abstract sealed class Global" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
</Base>
<Interfaces />
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public Global ();" />
<MemberType>Constructor</MemberType>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Debug">
<MemberSignature Language="C#" Value="public static Njb.Global+DebugFlags Debug { set; };" />
<MemberType>Property</MemberType>

Просмотреть файл

@ -2,7 +2,7 @@
<TypeSignature Language="C#" Value="public class Revision" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>

Просмотреть файл

@ -2,7 +2,7 @@
<TypeSignature Language="C#" Value="public class Song : System.IDisposable" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
@ -82,6 +82,174 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Album">
<MemberSignature Language="C#" Value="public string Album { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Artist">
<MemberSignature Language="C#" Value="public string Artist { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Bitrate">
<MemberSignature Language="C#" Value="public uint Bitrate { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Codec">
<MemberSignature Language="C#" Value="public string Codec { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Comment">
<MemberSignature Language="C#" Value="public string Comment { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FileName">
<MemberSignature Language="C#" Value="public string FileName { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="FileSize">
<MemberSignature Language="C#" Value="public uint FileSize { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt32</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Folder">
<MemberSignature Language="C#" Value="public string Folder { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Genre">
<MemberSignature Language="C#" Value="public string Genre { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Length">
<MemberSignature Language="C#" Value="public ushort Length { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt16</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="IsProtected">
<MemberSignature Language="C#" Value="public bool IsProtected { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.Boolean</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Title">
<MemberSignature Language="C#" Value="public string Title { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.String</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="TrackNumber">
<MemberSignature Language="C#" Value="public ushort TrackNumber { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt16</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Year">
<MemberSignature Language="C#" Value="public ushort Year { get; };" />
<MemberType>Property</MemberType>
<ReturnValue>
<ReturnType>System.UInt16</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<value>To be added.</value>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
<Docs>
<summary>To be added.</summary>

Просмотреть файл

@ -2,7 +2,7 @@
<TypeSignature Language="C#" Value="public class SongFrame" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Object</BaseTypeName>
@ -81,6 +81,24 @@
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Find">
<MemberSignature Language="C#" Value="public static Njb.SongFrame Find (Njb.Song song, string label);" />
<MemberType>Method</MemberType>
<ReturnValue>
<ReturnType>Njb.SongFrame</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="song" Type="Njb.Song" />
<Parameter Name="label" Type="System.String" />
</Parameters>
<Docs>
<param name="song">To be added.</param>
<param name="label">To be added.</param>
<summary>To be added.</summary>
<returns>To be added.</returns>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
<Docs>
<summary>To be added.</summary>

Просмотреть файл

@ -2,7 +2,7 @@
<TypeSignature Language="C#" Value="public enum SongFrameType" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.1.1.26824</AssemblyVersion>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Enum</BaseTypeName>

Просмотреть файл

@ -0,0 +1,59 @@
<Type Name="TransferProgressArgs" FullName="Njb.TransferProgressArgs">
<TypeSignature Language="C#" Value="public class TransferProgressArgs : System.EventArgs" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.EventArgs</BaseTypeName>
</Base>
<Interfaces />
<Members>
<Member MemberName=".ctor">
<MemberSignature Language="C#" Value="public TransferProgressArgs ();" />
<MemberType>Constructor</MemberType>
<Parameters />
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Song">
<MemberSignature Language="C#" Value="public Njb.Song Song;" />
<MemberType>Field</MemberType>
<ReturnValue>
<ReturnType>Njb.Song</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Current">
<MemberSignature Language="C#" Value="public ulong Current;" />
<MemberType>Field</MemberType>
<ReturnValue>
<ReturnType>System.UInt64</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
<Member MemberName="Total">
<MemberSignature Language="C#" Value="public ulong Total;" />
<MemberType>Field</MemberType>
<ReturnValue>
<ReturnType>System.UInt64</ReturnType>
</ReturnValue>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Member>
</Members>
<Docs>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Type>

Просмотреть файл

@ -0,0 +1,23 @@
<Type Name="TransferProgressHandler" FullName="Njb.TransferProgressHandler">
<TypeSignature Language="C#" Value="public delegate void TransferProgressHandler(object o, Njb.TransferProgressArgs args);" />
<AssemblyInfo>
<AssemblyName>njb-sharp</AssemblyName>
<AssemblyVersion>0.2.0.40905</AssemblyVersion>
</AssemblyInfo>
<Base>
<BaseTypeName>System.Delegate</BaseTypeName>
</Base>
<Parameters>
<Parameter Name="o" Type="System.Object" />
<Parameter Name="args" Type="Njb.TransferProgressArgs" />
</Parameters>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Docs>
<param name="o">To be added.</param>
<param name="args">To be added.</param>
<summary>To be added.</summary>
<remarks>To be added.</remarks>
</Docs>
</Type>

Просмотреть файл

@ -1,6 +1,6 @@
<Overview>
<Assemblies>
<Assembly Name="njb-sharp" Version="0.1.1.26824">
<Assembly Name="njb-sharp" Version="0.2.0.40905">
<Attributes>
<Attribute>
<AttributeName>System.Reflection.AssemblyCompany(Company="Novell, Inc")</AttributeName>
@ -30,6 +30,9 @@
<Type Name="Revision" />
<Type Name="ForeachErrorCallback" />
<Type Name="SongFrameType" />
<Type Name="TransferProgressArgs" />
<Type Name="DataFile" />
<Type Name="TransferProgressHandler" />
</Namespace>
</Types>
<Title>njb-sharp</Title>

8
vacuum.sh Executable file
Просмотреть файл

@ -0,0 +1,8 @@
#!/bin/sh
if [ -f Makefile ]; then
make maintainer-clean
fi
rm -f compile INSTALL config.h.in aclocal.m4 ltmain.sh Makefile.in depcomp missing install-sh configure config.sub config.guess mkinstalldirs