Dr.Bob's TUUCode Component v3.1
Last updated: 1997/10/24
John Kaster and yours truly Bob Swart (aka Dr.Bob) are working on a book entitled "Delphi Internet Solutions", which will contain some interesting topics about Delphi and the internet and intranet.
Little pieces of information and parts of chapters will be made available from now...
New is the 16/32-bits version 3.1 of my TUUCode component, capable of uuencode/decode, xxencode/decode, base64-encode/decode (without MIME-support) and plain filecopy.
You can download version 3.1 from my website at http://www.drbob42.com/ftp:
Note that you get the registration unit and an example program with sources files as well, but the component UUCODE.PAS source file will only be available in .DCU format (and .OBJ for BCB); full sources are not available at this time but will be present in the book of course!
Interface
unit UUCode;
{ TUUCode version 3.1 - 1997/10/24 }
interface
uses
{$IFDEF WIN32}
Windows,
{$ELSE}
WinTypes, WinProcs,
{$ENDIF}
SysUtils, Messages, Classes, Graphics, Controls, Forms;
{$IFNDEF WIN32}
type
ShortString = String;
{$ENDIF}
type
EUUCode = class(Exception);
TAlgorithm = (filecopy,
uuencode, uudecode,
xxencode, xxdecode,
base64encode, base64decode);
TUnixCRLF = (CRLF, LF);
TProgressEvent = procedure(Percent: Word) of Object;
TUUCode = class(TComponent)
public
{ Public class declarations (override) }
constructor Create(AOwner: TComponent); override;
private
{ Private field declarations }
FAbout: ShortString;
FActive: Boolean;
FAlgorithm: TAlgorithm;
FFileMode: Word;
FHeaders: Boolean;
FInputFileName: TFileName;
FOutputFileName: TFileName;
FOnProgress: TProgressEvent;
FUnixCRLF: TUnixCRLF;
{ Dummy method to get read-only About property }
procedure Dummy(Ignore: ShortString);
protected
{ Protected Activate method }
procedure Activate(GoActive: Boolean);
public
{ Public UUCode interface declaration }
procedure UUCode;
published
{ Published design declarations }
property About: ShortString read FAbout write Dummy;
property Active: Boolean read FActive write Activate;
property Algorithm: TAlgorithm read FAlgorithm write FAlgorithm;
property FileMode: Word read FFileMode write FFileMode;
property Headers: Boolean read FHeaders write FHeaders;
property InputFile: TFileName read FInputFileName write FInputFileName;
property OutputFile: TFileName read FOutputFileName write FOutputFileName;
property UnixCRLF: TUnixCRLF read FUnixCRLF write FUnixCRLF;
published
{ Published Event property }
property OnProgress: TProgressEvent read FOnProgress write FOnProgress;
end {TUUCode};
implementation
end.
Properties
Methods
Events
Usage
The code you can download contains a small example program.
I'm already working on some more detailed example programs (and new features in the TUUCode component - based on the feedback I receive, of course).
If you have any problems with this component, I'd love to hear about it by e-mail or in my support newsgroup at news.shoresoft.com/drbob..
You are free to use it in any of your programs in any means you want, as long as you don't hold me responsible for any damage that may result from using TUUCode.
Dr.Bob's Delphi Clinic