|
////////////////////////////////////////////////////////////////////////////////
// File: LprTransferState.cs
// Purpose: Class containing file transfer information.
// Notice: Copyright 2010 SunCat Services
// Author: Edward F Eaglehouse
//
// THIS WORK IS PROVIDED "AS IS" WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES
// OR CONDITIONS OR GUARANTEES.
//
// This product is licensed under the terms of The Code Project Open
// License (CPOL) 1.02. You are free to use this code in any application,
// private, public, or commercial, subject to this license agreement. A
// copy of this license may be found on the web at
// http://www.codeproject.com/info/cpol10.aspx.
////////////////////////////////////////////////////////////////////////////////
// Revision Contributor
// 12/08/2010 Edward F Eaglehouse
// Initial revision.
////////////////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Text;
using System.IO;
namespace MobileLPR
{
public class LprTransferState
{
#region Private Members
/// <summary>
/// Open stream used to access print data.
/// </summary>
public Stream stream;
/// <summary>
/// Pathname of file being transferred.
/// </summary>
public String pathname;
/// <summary>
/// Server name of file being transferred.
/// </summary>
public String serverFilename;
/// <summary>
/// Indicator for binary (not text) file contents.
/// </summary>
public Boolean isBinary = false;
/// <summary>
/// Total number of local bytes to transfer.
/// </summary>
public Int64 sizeTotal = 0;
/// <summary>
/// Current number of local bytes transferred.
/// </summary>
public Int64 sizeUsed = 0;
/// <summary>
/// File I/O buffer.
/// </summary>
public byte[] buffer;
#endregion
#region Constructors
/// <summary>
/// Initialize a new instance of the LprTransferState class.
/// </summary>
public LprTransferState() { }
/// <summary>
/// Initialize a new instance of the LprTransferState class.
/// </summary>
/// <param name="pathname">Local pathname of file being transferred.</param>
public LprTransferState(String pathname) :
this()
{
this.pathname = pathname;
FileInfo f = new FileInfo(pathname);
this.sizeTotal = f.Length;
}
#endregion
}
}
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Ed is a veteran programmer of over 30 years. He designs and builds myriad enterprise applications improving the service quality of numerous international, national, and local manufacturers and distributors. He also brought the first publicly-available commercial Internet service to Akron, Ohio - not for profit but to provide the community with a desired service. Ed continually strives to learn the most effective skills and techniques in order to provide the greatest benefits to his customers.