|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |
Wraps up info about what part of a resource a particular source has
Field Summary | |
---|---|
int |
completeness
Percentage host has of file |
string | discoveryMethod |
long | fileSize |
string[] | likelyAltSources |
bool | preexisting |
bool | queriedOk |
Naanou.ResourceExchange.ByteRange[] | ranges |
string | resource |
Naanou.ResourceExchange.Source | source |
long | totalSize |
double |
transferSpeed
Last recorded bytes/s being read and written to disk |
Constructor Summary | |
---|---|
Source.Manifest(Naanou.ResourceExchange.Source source, string resource, Naanou.ResourceExchange.ByteRange[] ranges, string discoveryMethod) Constructor |
Property Summary | |
---|---|
double |
Completeness
Completeness (percentage), or System.Double.NaN if unavailable, that this host has of the file |
string | DiscoveryMethod |
long |
FileLength
Gets the file length |
bool |
PreExisting
Was this source from preexisting knowledge |
int |
RangeCount
Gets the number of ranges this source has |
Naanou.ResourceExchange.ByteRange[] |
Ranges
Gets the byte ranges that this source has (a copy) |
string |
Resource
Gets or sets the resource this source is for |
Naanou.ResourceExchange.Source |
Source
Gets the source this manifest belongs to |
double |
TransferSpeed
Gets the speed of the transfer |
Method Summary | |
---|---|
Naanou.ResourceExchange.Block |
Download(Naanou.ResourceExchange.Downloader downloader, Naanou.ResourceExchange.ResourceAvailRange range, Naanou.ResourceExchange.WorkStatusHandler statusCallback) Download a range block from source. Closes off block when done, or deletes it if there was a problem. |
string[] |
GetLikelyAlternateSources(int byteRangeIndex) Gets a list of likely alternate sources for a byte range this source has |
bool |
HasRange(Naanou.ResourceExchange.ByteRange range) Has manifest got this range? |
void |
PaintRange(Naanou.ResourceExchange.ByteRange range, long totalSize, System.Drawing.Graphics g, System.Drawing.Rectangle rect, System.Drawing.Brush brush) Paints status |
void |
PaintStatus(System.Drawing.Graphics g, System.Drawing.Rectangle rect) Paints status |
void |
Query() Attempts to identify how much of the resource this source has [blocking] |
Naanou.ResourceExchange.ByteRange |
RangeAt(int index) Gets the range at the specified index |
Methods inherited from class System.Object |
---|
Equals, Finalize, GetHashCode, GetType, MemberwiseClone, ToString |
Field Detail |
---|
private int completeness
Percentage host has of file
private string discoveryMethod
private long fileSize
private string[] likelyAltSources
private bool preexisting
private bool queriedOk
private Naanou.ResourceExchange.ByteRange[] ranges
private string resource
private Naanou.ResourceExchange.Source source
private long totalSize
private double transferSpeed
Last recorded bytes/s being read and written to disk
Constructor Detail |
---|
internal Source.Manifest(Naanou.ResourceExchange.Source source, string resource, Naanou.ResourceExchange.ByteRange[] ranges, string discoveryMethod)
Constructor
Parameters:
resource
- Resource hashranges
- Ranges source hasdiscoveryMethod
- Discovery methodsource
- SourceProperty Detail |
---|
public double Completeness
Completeness (percentage), or System.Double.NaN if unavailable, that this host has of the file
public string DiscoveryMethod
public long FileLength
Gets the file length
public bool PreExisting
Was this source from preexisting knowledge
public int RangeCount
Gets the number of ranges this source has
public Naanou.ResourceExchange.ByteRange[] Ranges
Gets the byte ranges that this source has (a copy)
If the record is preexisting, a query does not need to be done, although ranges on server may be different than what we know. Running a query in this case will update ranges. If a record is not preexisting (i.e. all we know about it is its url), a Query must be run before using this property.
public string Resource
Gets or sets the resource this source is for
public Naanou.ResourceExchange.Source Source
Gets the source this manifest belongs to
public double TransferSpeed
Gets the speed of the transfer
Method Detail |
---|
internal Naanou.ResourceExchange.Block Download(Naanou.ResourceExchange.Downloader downloader, Naanou.ResourceExchange.ResourceAvailRange range, Naanou.ResourceExchange.WorkStatusHandler statusCallback)
Download a range block from source. Closes off block when done, or deletes it if there was a problem.
Parameters:
downloader
- Downloaderrange
- Range to getstatusCallback
- Status callback (can be null)public string[] GetLikelyAlternateSources(int byteRangeIndex)
Gets a list of likely alternate sources for a byte range this source has
Parameters:
byteRangeIndex
- Indexpublic bool HasRange(Naanou.ResourceExchange.ByteRange range)
Has manifest got this range?
Parameters:
range
- public void PaintRange(Naanou.ResourceExchange.ByteRange range, long totalSize, System.Drawing.Graphics g, System.Drawing.Rectangle rect, System.Drawing.Brush brush)
Paints status
Parameters:
range
- totalSize
- g
- rect
- brush
- public void PaintStatus(System.Drawing.Graphics g, System.Drawing.Rectangle rect)
Paints status
Parameters:
g
- rect
- public void Query()
Attempts to identify how much of the resource this source has [blocking]
public Naanou.ResourceExchange.ByteRange RangeAt(int index)
Gets the range at the specified index
Parameters:
index
-
|
.NET Framework | |||||||||
PREV TYPE NEXT TYPE | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONST | PROP | METHOD | OP | EVENT | DETAIL: FIELD | CONST | PROP | METHOD | OP | EVENT |