* Replaced fphttpclient with indy10.
* Added compression support
This commit is contained in:
@@ -0,0 +1,178 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
Rev 1.5 8/17/2004 2:54:38 PM JPMugaas
|
||||
Made ShouldUse virtual again.
|
||||
|
||||
Rev 1.4 2004.06.16 8:08:52 PM czhower
|
||||
Temp workaround for D.NET
|
||||
|
||||
Rev 1.3 2004.03.01 11:27:54 AM czhower
|
||||
Bug fix for checking of more than one AF
|
||||
|
||||
Rev 1.2 2004.02.29 9:38:36 PM czhower
|
||||
Bug fix for design mode.
|
||||
|
||||
Rev 1.1 2004.02.03 3:15:50 PM czhower
|
||||
Updates to move to System.
|
||||
|
||||
Rev 1.0 2004.02.03 2:40:34 PM czhower
|
||||
Move
|
||||
|
||||
Rev 1.3 2004.01.20 10:03:20 PM czhower
|
||||
InitComponent
|
||||
|
||||
Rev 1.2 2003.10.01 12:30:02 PM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.1 2003.10.01 1:12:32 AM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.0 11/13/2002 08:37:44 AM JPMugaas
|
||||
}
|
||||
|
||||
unit IdAntiFreezeBase;
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
IdBaseComponent;
|
||||
|
||||
const
|
||||
ID_Default_TIdAntiFreezeBase_Active = True;
|
||||
ID_Default_TIdAntiFreezeBase_ApplicationHasPriority = True;
|
||||
ID_Default_TIdAntiFreezeBase_IdleTimeOut = 250;
|
||||
ID_Default_TIdAntiFreezeBase_OnlyWhenIdle = True;
|
||||
|
||||
type
|
||||
TIdAntiFreezeBase = class(TIdBaseComponent)
|
||||
protected
|
||||
FActive: Boolean;
|
||||
FApplicationHasPriority: Boolean;
|
||||
FIdleTimeOut: Integer;
|
||||
FOnlyWhenIdle: Boolean;
|
||||
//
|
||||
procedure InitComponent; override;
|
||||
public
|
||||
destructor Destroy; override;
|
||||
procedure Process; virtual; abstract;
|
||||
class procedure DoProcess(const AIdle: Boolean = True; const AOverride: Boolean = False);
|
||||
class function ShouldUse: Boolean;
|
||||
class procedure Sleep(ATimeout: Integer);
|
||||
published
|
||||
property Active: boolean read FActive write FActive
|
||||
default ID_Default_TIdAntiFreezeBase_Active;
|
||||
property ApplicationHasPriority: Boolean read FApplicationHasPriority
|
||||
write FApplicationHasPriority
|
||||
default ID_Default_TIdAntiFreezeBase_ApplicationHasPriority;
|
||||
property IdleTimeOut: integer read FIdleTimeOut write FIdleTimeOut
|
||||
default ID_Default_TIdAntiFreezeBase_IdleTimeOut;
|
||||
property OnlyWhenIdle: Boolean read FOnlyWhenIdle write FOnlyWhenIdle
|
||||
default ID_Default_TIdAntiFreezeBase_OnlyWhenIdle;
|
||||
end;
|
||||
|
||||
var
|
||||
GAntiFreeze: TIdAntiFreezeBase = nil;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
//facilitate inlining only.
|
||||
{$IFDEF USE_INLINE}
|
||||
{$IFDEF DOTNET}
|
||||
System.Threading,
|
||||
{$ENDIF}
|
||||
{$IFDEF WINDOWS}
|
||||
{$IFDEF FPC}
|
||||
windows,
|
||||
{$ELSE}
|
||||
Windows,
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
Posix.SysSelect,
|
||||
Posix.SysTime,
|
||||
{$ENDIF}
|
||||
{$IFDEF KYLIXCOMPAT}
|
||||
Libc,
|
||||
{$ENDIF}
|
||||
IdGlobal,
|
||||
IdResourceStrings,
|
||||
IdException;
|
||||
|
||||
{ TIdAntiFreezeBase }
|
||||
|
||||
destructor TIdAntiFreezeBase.Destroy;
|
||||
begin
|
||||
if GAntiFreeze = Self then begin
|
||||
GAntiFreeze := nil;
|
||||
end;
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
class procedure TIdAntiFreezeBase.DoProcess(const AIdle: Boolean = True; const AOverride: Boolean = False);
|
||||
begin
|
||||
if ShouldUse then begin
|
||||
if (not GAntiFreeze.OnlyWhenIdle) or AIdle or AOverride then begin
|
||||
GAntiFreeze.Process;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdAntiFreezeBase.InitComponent;
|
||||
begin
|
||||
inherited InitComponent;
|
||||
if not IsDesignTime then begin
|
||||
if Assigned(GAntiFreeze) then begin
|
||||
raise EIdException.Create(RSAntiFreezeOnlyOne);
|
||||
end;
|
||||
GAntiFreeze := Self;
|
||||
end;
|
||||
FActive := ID_Default_TIdAntiFreezeBase_Active;
|
||||
FApplicationHasPriority := ID_Default_TIdAntiFreezeBase_ApplicationHasPriority;
|
||||
IdleTimeOut := ID_Default_TIdAntiFreezeBase_IdleTimeOut;
|
||||
FOnlyWhenIdle := ID_Default_TIdAntiFreezeBase_OnlyWhenIdle;
|
||||
end;
|
||||
|
||||
class function TIdAntiFreezeBase.ShouldUse: Boolean;
|
||||
begin
|
||||
Result := (GAntiFreeze <> nil) and InMainThread;
|
||||
if Result then begin
|
||||
Result := GAntiFreeze.Active;
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TIdAntiFreezeBase.Sleep(ATimeout: Integer);
|
||||
begin
|
||||
if ShouldUse then begin
|
||||
while ATimeout > GAntiFreeze.IdleTimeOut do begin
|
||||
IndySleep(GAntiFreeze.IdleTimeOut);
|
||||
Dec(ATimeout, GAntiFreeze.IdleTimeOut);
|
||||
DoProcess;
|
||||
end;
|
||||
IndySleep(ATimeout);
|
||||
DoProcess;
|
||||
end else begin
|
||||
IndySleep(ATimeout);
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,92 @@
|
||||
{ $HDR$}
|
||||
{**********************************************************************}
|
||||
{ Unit archived using Team Coherence }
|
||||
{ Team Coherence is Copyright 2002 by Quality Software Components }
|
||||
{ }
|
||||
{ For further information / comments, visit our WEB site at }
|
||||
{ http://www.TeamCoherence.com }
|
||||
{**********************************************************************}
|
||||
{}
|
||||
{ $Log: 116136: IdAssemblyInfo.pas
|
||||
{
|
||||
{ Rev 1.1 3/3/2005 7:45:46 PM JPMugaas
|
||||
{ Various fixes.
|
||||
}
|
||||
{
|
||||
{ Rev 1.0 3/3/2005 4:45:30 PM JPMugaas
|
||||
{ Version info templates for some files.
|
||||
}
|
||||
{
|
||||
{ Rev 1.0 2004.02.03 2:40:36 PM czhower
|
||||
{ Move
|
||||
}
|
||||
{
|
||||
{ Rev 1.0 2004.01.20 12:27:00 AM czhower
|
||||
{ Initial checkin
|
||||
}
|
||||
unit IdAssemblyInfo;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
System.Reflection, 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('Indy')]
|
||||
[assembly: AssemblyDescription('Internet Direct (Indy) 10.6.2 for Visual Studio .NET')]
|
||||
[assembly: AssemblyConfiguration('')]
|
||||
[assembly: AssemblyCompany('Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew')]
|
||||
[assembly: AssemblyProduct('Indy for Microsoft .NET Framework')]
|
||||
[assembly: AssemblyCopyright('Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew')]
|
||||
[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('10.6.2.*')]
|
||||
|
||||
//
|
||||
// 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%\bin\<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: AssemblyDelaySignAttribute(true)]
|
||||
[assembly: AssemblyKeyFileAttribute('Indy.snk')]
|
||||
[assembly: AssemblyKeyName('')]
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,308 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
Rev 1.10 08.11.2004 ã. 20:00:46 DBondzhev
|
||||
changed TObject to &Object
|
||||
|
||||
Rev 1.9 07.11.2004 ã. 18:17:54 DBondzhev
|
||||
This contains fix for proper call to unit initialization sections.
|
||||
|
||||
Rev 1.8 2004.11.06 10:55:00 PM czhower
|
||||
Fix for Delphi 2005.
|
||||
|
||||
Rev 1.7 2004.10.26 9:07:30 PM czhower
|
||||
More .NET implicit conversions
|
||||
|
||||
Rev 1.6 2004.10.26 7:51:58 PM czhower
|
||||
Fixed ifdef and renamed TCLRStrings to TIdCLRStrings
|
||||
|
||||
Rev 1.5 2004.10.26 7:35:16 PM czhower
|
||||
Moved IndyCat to CType in IdBaseComponent
|
||||
|
||||
Rev 1.4 04.10.2004 13:15:06 Andreas Hausladen
|
||||
Thread Safe Unit initialization
|
||||
|
||||
Rev 1.3 6/11/2004 8:28:26 AM DSiders
|
||||
Added "Do not Localize" comments.
|
||||
|
||||
Rev 1.2 2004.04.16 9:18:34 PM czhower
|
||||
.NET fix to call initialization sections. Code taken from IntraWeb.
|
||||
|
||||
Rev 1.1 2004.02.03 3:15:50 PM czhower
|
||||
Updates to move to System.
|
||||
|
||||
Rev 1.0 2004.02.03 2:28:26 PM czhower
|
||||
Move
|
||||
|
||||
Rev 1.4 2004.01.25 11:35:02 PM czhower
|
||||
IFDEF fix for .net.
|
||||
|
||||
Rev 1.3 2004.01.25 10:56:44 PM czhower
|
||||
Bug fix for InitComponent at design time.
|
||||
|
||||
Rev 1.2 2004.01.20 10:03:20 PM czhower
|
||||
InitComponent
|
||||
|
||||
Rev 1.1 2003.12.23 7:33:00 PM czhower
|
||||
.Net change.
|
||||
|
||||
Rev 1.0 11/13/2002 08:38:26 AM JPMugaas
|
||||
}
|
||||
|
||||
unit IdBaseComponent;
|
||||
|
||||
// Kudzu: This unit is permitted to viloate IFDEF restriction to harmonize
|
||||
// VCL / .Net difference at the base level.
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
Classes
|
||||
{$IFDEF DOTNET}
|
||||
{$DEFINE IdDEBUG},
|
||||
System.ComponentModel.Design.Serialization,
|
||||
System.Collections.Specialized,
|
||||
System.ComponentModel,
|
||||
System.Threading,
|
||||
System.Reflection,
|
||||
System.IO // Necessary else System.IO below is confused with RTL System.
|
||||
{$ENDIF};
|
||||
|
||||
|
||||
// ***********************************************************
|
||||
// TIdBaseComponent is the base class for all Indy components.
|
||||
// ***********************************************************
|
||||
type
|
||||
// TIdInitializerComponent exists to consolidate creation differences between .net and vcl.
|
||||
// It looks funny, but because of .net restrictions on constructors we have to do some wierdo
|
||||
// stuff to catch both constructors.
|
||||
//
|
||||
// TIdInitializerComponent implements InitComponent which all components must use to initialize
|
||||
// other members instead of overriding constructors.
|
||||
{$IFDEF DOTNET}
|
||||
//IMPORTANT!!!
|
||||
//Abstract classes should be hidden in the assembly designer.
|
||||
//Otherwise, you get a mess.
|
||||
[DesignTimeVisible(false), ToolboxItem(false)]
|
||||
{$ENDIF}
|
||||
TIdInitializerComponent = class(TComponent)
|
||||
private
|
||||
protected
|
||||
{$IFDEF DOTNET}
|
||||
// This event handler will take care about dynamically loaded assemblies after first initialization.
|
||||
class procedure AssemblyLoadEventHandler(sender: &Object; args: AssemblyLoadEventArgs); static;
|
||||
class procedure InitializeAssembly(AAssembly: Assembly);
|
||||
{$ENDIF}
|
||||
function GetIsLoading: Boolean;
|
||||
function GetIsDesignTime: Boolean;
|
||||
// This is here to handle both types of constructor initializations, VCL and .Net.
|
||||
// It is not abstract so that not all descendants are required to override it.
|
||||
procedure InitComponent; virtual;
|
||||
public
|
||||
{$IFDEF DOTNET}
|
||||
// Should not be able to make this create virtual? But if not
|
||||
// DCCIL complain in IdIOHandler about possible polymorphics....
|
||||
constructor Create; overload; virtual;
|
||||
// Must be overriden here - but VCL version will catch offenders
|
||||
{$ELSE}
|
||||
// Statics to prevent overrides. For Create(AOwner) see TIdBaseComponent
|
||||
//
|
||||
// Create; variant is here to allow calls from VCL the same as from .net
|
||||
constructor Create; reintroduce; overload;
|
||||
// Must be an override and thus virtual to catch when created at design time
|
||||
//constructor Create(AOwner: TComponent); overload; override;
|
||||
{$ENDIF}
|
||||
constructor Create(AOwner: TComponent); overload; override;
|
||||
end;
|
||||
|
||||
// TIdBaseComponent is the base class for all Indy components. Utility components, and other non
|
||||
// socket based components typically inherit directly from this. While socket components inherit
|
||||
// from TIdComponent instead as it introduces OnWork, OnStatus, etc.
|
||||
TIdBaseComponent = class(TIdInitializerComponent)
|
||||
protected
|
||||
function GetIndyVersion: string;
|
||||
property IsLoading: Boolean read GetIsLoading;
|
||||
property IsDesignTime: Boolean read GetIsDesignTime;
|
||||
public
|
||||
// This is here to catch components trying to override at compile time and not let them.
|
||||
// This does not work in .net, but we always test in VCL so this will catch it.
|
||||
{$IFNDEF DOTNET}
|
||||
constructor Create(AOwner: TComponent); reintroduce; overload;
|
||||
{$ENDIF}
|
||||
{$IFNDEF HAS_RemoveFreeNotification}
|
||||
procedure RemoveFreeNotification(AComponent: TComponent);
|
||||
{$ENDIF}
|
||||
property Version: string read GetIndyVersion;
|
||||
published
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
{$IFDEF DOTNET}
|
||||
System.Runtime.CompilerServices,
|
||||
{$ENDIF}
|
||||
IdGlobal;
|
||||
|
||||
{$IFDEF DOTNET}
|
||||
var
|
||||
GInitsCalled: Integer = 0;
|
||||
{$ENDIF}
|
||||
|
||||
{ TIdInitializerComponent }
|
||||
|
||||
constructor TIdInitializerComponent.Create;
|
||||
begin
|
||||
{-$IFDEF DOTNET}
|
||||
inherited Create(nil); // Explicit just in case since are not an override
|
||||
InitComponent;
|
||||
{-$ELSE}
|
||||
// Create(nil);
|
||||
{-$ENDIF}
|
||||
end;
|
||||
|
||||
constructor TIdInitializerComponent.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner);
|
||||
// DCCIL will not call our other create from this one, only .Nets ancestor
|
||||
// so InitCopmonent will NOT be called twice.
|
||||
InitComponent;
|
||||
end;
|
||||
|
||||
{$IFDEF DOTNET}
|
||||
class procedure TIdInitializerComponent.AssemblyLoadEventHandler(sender: &Object;
|
||||
args: AssemblyLoadEventArgs);
|
||||
begin
|
||||
if (args <> nil) then begin
|
||||
InitializeAssembly(args.loadedAssembly);
|
||||
end;
|
||||
end;
|
||||
|
||||
class procedure TIdInitializerComponent.InitializeAssembly(AAssembly: Assembly);
|
||||
var
|
||||
LTypesList: Array of &Type;
|
||||
j: integer;
|
||||
UnitType: &Type;
|
||||
begin
|
||||
LTypesList := AAssembly.GetTypes();
|
||||
|
||||
for j := Low(LTypesList) to High(LTypesList) do begin
|
||||
UnitType := LTypesList[j];
|
||||
|
||||
// Delphi 9 assemblies
|
||||
if (Pos('.Units', UnitType.Namespace) > 0) and (UnitType.Name <> '$map$') then begin
|
||||
RuntimeHelpers.RunClassConstructor(UnitType.TypeHandle);
|
||||
end;
|
||||
// Delphi 8 assemblies
|
||||
// if UnitType.Name = 'Unit' then begin
|
||||
// RuntimeHelpers.RunClassConstructor(UnitType.TypeHandle);
|
||||
// end;
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TIdInitializerComponent.InitComponent;
|
||||
{$IFDEF DOTNET}
|
||||
var
|
||||
LAssemblyList: array of Assembly;
|
||||
i: integer;
|
||||
LM : String;
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF DOTNET}
|
||||
try
|
||||
// With .NET initialization sections are not called unless the unit is referenced. D.NET makes
|
||||
// initializations and globals part of a "Unit" class. So init sections wont get called unless
|
||||
// the Unit class is used. D8 EXEs are ok, but assemblies (ie VS.NET and probably asms in some
|
||||
// cases when used from a D8 EXE) do not call their init sections. So we loop through the list of
|
||||
// classes in the assembly, and for each one named Unit we call the class constructor which
|
||||
// causes the init section to be called.
|
||||
//
|
||||
if Interlocked.CompareExchange(GInitsCalled, 1, 0) = 0 then begin
|
||||
LAssemblyList := AppDomain.get_CurrentDomain.GetAssemblies;
|
||||
|
||||
// Becouse this can be called few times we have to exclu de every time
|
||||
Exclude(AppDomain.get_CurrentDomain.AssemblyLoad, TIdInitializerComponent.AssemblyLoadEventHandler);
|
||||
Include(AppDomain.get_CurrentDomain.AssemblyLoad, TIdInitializerComponent.AssemblyLoadEventHandler);
|
||||
|
||||
for i := low(LAssemblyList) to high(LAssemblyList) do begin
|
||||
//We do things this way because we do not want to initialize stuff that is not
|
||||
//ours. That would cause errors. It turns out that "AppDomain.get_CurrentDomain.GetAssemblies;" will
|
||||
//list stuff that isn't ours. Be careful.
|
||||
if (Pos('Indy',LAssemblyList[i].GetName.Name)=1) then
|
||||
begin
|
||||
initializeAssembly(LAssemblyList[i]);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
except
|
||||
on E : ReflectionTypeLoadException do
|
||||
begin
|
||||
LM := EOL;
|
||||
LM := LM + 'Message: ' + E.Message + EOL;
|
||||
LM := LM + 'Source: ' + E.Source + EOL;
|
||||
LM := LM + 'Stack Trace: ' + E.StackTrace + EOL;
|
||||
for i := Low(E.LoaderExceptions) to High(E.LoaderExceptions) do
|
||||
begin
|
||||
LM := LM + EOL;
|
||||
LM := LM + 'Error #' + i.ToString+EOL;
|
||||
LM := LM + 'Message: ' + E.LoaderExceptions[i].Message + EOL;
|
||||
LM := LM + 'Source: ' + E.LoaderExceptions[i].Source + EOL;
|
||||
LM := LM + 'Stack Trace: ' + EOL+ E.LoaderExceptions[i].StackTrace + EOL;
|
||||
end;
|
||||
IndyRaiseOuterException(Exception.Create('Load Error'+EOL+LM));
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TIdInitializerComponent.GetIsLoading: Boolean;
|
||||
begin
|
||||
Result := (csLoading in ComponentState);
|
||||
end;
|
||||
|
||||
function TIdInitializerComponent.GetIsDesignTime: Boolean;
|
||||
begin
|
||||
Result := (csDesigning in ComponentState);
|
||||
end;
|
||||
|
||||
{ TIdBaseComponent }
|
||||
|
||||
{$IFNDEF DOTNET}
|
||||
constructor TIdBaseComponent.Create(AOwner: TComponent);
|
||||
begin
|
||||
inherited Create(AOwner); // Explicit just in case since are not an override
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF HAS_RemoveFreeNotification}
|
||||
procedure TIdBaseComponent.RemoveFreeNotification(AComponent: TComponent);
|
||||
begin
|
||||
// this is a no-op for now, as we can't access the private TComponent.FFreeNotifies list
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
function TIdBaseComponent.GetIndyVersion: string;
|
||||
begin
|
||||
Result := gsIdVersion;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@@ -0,0 +1,152 @@
|
||||
unit IdCTypes;
|
||||
|
||||
// TODO: deprecate this unit and move the declarations to the IdGlobal unit.
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
{This unit should not contain ANY program code. It is meant to be extremely
|
||||
thin. The idea is that the unit will contain type mappings that used for headers
|
||||
and API calls using the headers. The unit is here because in cross-platform
|
||||
headers, the types may not always be the same as they would for Win32 on x86
|
||||
Intel architecture. We also want to be completely compatiable with Borland
|
||||
Delphi for Win32.}
|
||||
|
||||
{$IFDEF HAS_UNIT_ctypes}
|
||||
uses
|
||||
ctypes;
|
||||
{$ENDIF}
|
||||
|
||||
{
|
||||
IMPORTANT!!!
|
||||
|
||||
The types below are defined to hide architecture differences for various C++
|
||||
types while also making this header compile with Borland Delphi.
|
||||
|
||||
}
|
||||
type
|
||||
{$IFDEF FPC}
|
||||
|
||||
TIdC_LONG = cLong;
|
||||
PIdC_LONG = pcLong;
|
||||
TIdC_ULONG = cuLong;
|
||||
PIdC_ULONG = pculong;
|
||||
|
||||
TIdC_LONGLONG = clonglong;
|
||||
PIdC_LONGLONG = pclonglong;
|
||||
TIdC_ULONGLONG = culonglong;
|
||||
PIdC_ULONGLONG = pculonglong;
|
||||
|
||||
TIdC_SHORT = cshort;
|
||||
PIdC_SHORT = pcshort;
|
||||
TIdC_USHORT = cuShort;
|
||||
PIdC_USHORT = pcuShort;
|
||||
|
||||
TIdC_INT = cInt;
|
||||
PIdC_INT = pcInt;
|
||||
TIdC_UINT = cUInt;
|
||||
PIdC_UINT = pcUInt;
|
||||
|
||||
TIdC_SIGNED = csigned;
|
||||
PIdC_SIGNED = pcsigned;
|
||||
TIdC_UNSIGNED = cunsigned;
|
||||
PIdC_UNSIGNED = pcunsigned;
|
||||
|
||||
TIdC_INT8 = cint8;
|
||||
PIdC_INT8 = pcint8;
|
||||
TIdC_UINT8 = cuint8;
|
||||
PIdC_UINT8 = pcuint8;
|
||||
|
||||
TIdC_INT16 = cint16;
|
||||
PIdC_INT16 = pcint16;
|
||||
TIdC_UINT16 = cuint16;
|
||||
PIdC_UINT16 = pcuint16;
|
||||
|
||||
TIdC_INT32 = cint32;
|
||||
PIdC_INT32 = pcint32;
|
||||
TIdC_UINT32 = cint32;
|
||||
PIdC_UINT32 = pcuint32;
|
||||
|
||||
TIdC_INT64 = cint64;
|
||||
PIdC_INT64 = pcint64;
|
||||
TIdC_UINT64 = cuint64;
|
||||
PIdC_UINT64 = pcuint64;
|
||||
|
||||
TIdC_FLOAT = cfloat;
|
||||
PIdC_FLOAT = pcfloat;
|
||||
TIdC_DOUBLE = cdouble;
|
||||
PIdC_DOUBLE = pcdouble;
|
||||
TIdC_LONGDOUBLE = clongdouble;
|
||||
PIdC_LONGDOUBLE = pclongdouble;
|
||||
|
||||
{$ELSE}
|
||||
|
||||
//this is necessary because Borland still doesn't support QWord
|
||||
// (unsigned 64bit type).
|
||||
{$IFNDEF HAS_QWord}
|
||||
qword = {$IFDEF HAS_UInt64}UInt64{$ELSE}Int64{$ENDIF};
|
||||
{$ENDIF}
|
||||
|
||||
TIdC_LONG = LongInt;
|
||||
PIdC_LONG = ^TIdC_LONG;
|
||||
TIdC_ULONG = LongWord;
|
||||
PIdC_ULONG = ^TIdC_ULONG;
|
||||
|
||||
TIdC_LONGLONG = Int64;
|
||||
PIdC_LONGLONG = ^TIdC_LONGLONG;
|
||||
TIdC_ULONGLONG = QWord;
|
||||
PIdC_ULONGLONG = ^TIdC_ULONGLONG;
|
||||
|
||||
TIdC_SHORT = Smallint;
|
||||
PIdC_SHORT = ^TIdC_SHORT;
|
||||
TIdC_USHORT = Word;
|
||||
PIdC_USHORT = ^TIdC_USHORT;
|
||||
|
||||
TIdC_INT = Integer;
|
||||
PIdC_INT = ^TIdC_INT;
|
||||
TIdC_UINT = Cardinal;
|
||||
PIdC_UINT = ^TIdC_UINT;
|
||||
|
||||
TIdC_SIGNED = Integer;
|
||||
PIdC_SIGNED = ^TIdC_SIGNED;
|
||||
TIdC_UNSIGNED = Cardinal;
|
||||
PIdC_UNSIGNED = ^TIdC_UNSIGNED;
|
||||
|
||||
TIdC_INT8 = Shortint;
|
||||
PIdC_INT8 = ^TIdC_INT8;
|
||||
TIdC_UINT8 = Byte;
|
||||
PIdC_UINT8 = ^TIdC_UINT8;
|
||||
|
||||
TIdC_INT16 = Smallint;
|
||||
PIdC_INT16 = ^TIdC_INT16;
|
||||
TIdC_UINT16 = Word;
|
||||
PIdC_UINT16 = ^TIdC_UINT16;
|
||||
|
||||
TIdC_INT32 = Integer;
|
||||
PIdC_INT32 = ^TIdC_INT32;
|
||||
TIdC_UINT32 = Cardinal;
|
||||
PIdC_UINT32 = ^TIdC_UINT32;
|
||||
|
||||
TIdC_INT64 = Int64;
|
||||
PIdC_INT64 = ^TIdC_INT64;
|
||||
TIdC_UINT64 = QWord;
|
||||
PIdC_UINT64 = ^TIdC_UINT64;
|
||||
|
||||
TIdC_FLOAT = Single;
|
||||
PIdC_FLOAT = ^TIdC_FLOAT;
|
||||
TIdC_DOUBLE = Double;
|
||||
PIdC_DOUBLE = ^TIdC_DOUBLE;
|
||||
TIdC_LONGDOUBLE = Extended;
|
||||
PIdC_LONGDOUBLE = ^TIdC_LONGDOUBLE;
|
||||
|
||||
//Some headers require this in D5 or earlier.
|
||||
//FreePascal already has this in its system unit.
|
||||
{$IFNDEF HAS_PByte}PByte = ^Byte;{$ENDIF}
|
||||
{$IFNDEF HAS_PWord}PWord = ^Word;{$ENDIF}
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,261 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
Rev 1.4 1/17/2005 7:26:12 PM JPMugaas
|
||||
Moved stack management code to IdStack.
|
||||
|
||||
Rev 1.3 2004.06.06 5:18:14 PM czhower
|
||||
OnWork bug fix
|
||||
|
||||
Rev 1.2 2004.06.05 9:46:38 AM czhower
|
||||
IOHandler OnWork fix
|
||||
|
||||
Rev 1.1 2004.02.03 3:15:52 PM czhower
|
||||
Updates to move to System.
|
||||
|
||||
Rev 1.0 2004.02.03 2:28:28 PM czhower
|
||||
Move
|
||||
|
||||
Rev 1.7 2004.01.22 5:59:10 PM czhower
|
||||
IdCriticalSection
|
||||
|
||||
Rev 1.6 2004.01.20 10:03:24 PM czhower
|
||||
InitComponent
|
||||
|
||||
Rev 1.5 2003.10.14 1:26:42 PM czhower
|
||||
Uupdates + Intercept support
|
||||
|
||||
Rev 1.4 2003.10.01 9:11:16 PM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.3 2003.10.01 11:16:30 AM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.2 2003.09.30 1:22:54 PM czhower
|
||||
Stack split for DotNet
|
||||
|
||||
Rev 1.1 2003.09.18 5:17:58 PM czhower
|
||||
Implemented OnWork
|
||||
|
||||
Rev 1.0 11/13/2002 08:41:12 AM JPMugaas
|
||||
}
|
||||
|
||||
unit IdComponent;
|
||||
|
||||
interface
|
||||
|
||||
{$i IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
{$IFNDEF USE_OBJECT_ARC}
|
||||
Classes,
|
||||
{$ENDIF}
|
||||
IdBaseComponent, IdGlobal, IdResourceStrings,
|
||||
IdStack;
|
||||
|
||||
type
|
||||
TIdStatus = ( hsResolving,
|
||||
hsConnecting,
|
||||
hsConnected,
|
||||
hsDisconnecting,
|
||||
hsDisconnected,
|
||||
hsStatusText,
|
||||
ftpTransfer, // These are to eliminate the TIdFTPStatus and the
|
||||
ftpReady, // coresponding event
|
||||
ftpAborted); // These can be use din the other protocols to.
|
||||
|
||||
const
|
||||
IdStati: array[TIdStatus] of string = (
|
||||
RSStatusResolving,
|
||||
RSStatusConnecting,
|
||||
RSStatusConnected,
|
||||
RSStatusDisconnecting,
|
||||
RSStatusDisconnected,
|
||||
RSStatusText,
|
||||
RSStatusText,
|
||||
RSStatusText,
|
||||
RSStatusText);
|
||||
|
||||
type
|
||||
TIdStatusEvent = procedure(ASender: TObject; const AStatus: TIdStatus;
|
||||
const AStatusText: string) of object;
|
||||
|
||||
TWorkMode = (wmRead, wmWrite);
|
||||
TWorkInfo = record
|
||||
Current: Int64;
|
||||
Max: Int64;
|
||||
Level: Integer;
|
||||
end;
|
||||
|
||||
TWorkBeginEvent = procedure(ASender: TObject; AWorkMode: TWorkMode; AWorkCountMax: Int64) of object;
|
||||
TWorkEndEvent = procedure(ASender: TObject; AWorkMode: TWorkMode) of object;
|
||||
TWorkEvent = procedure(ASender: TObject; AWorkMode: TWorkMode; AWorkCount: Int64) of object;
|
||||
|
||||
TIdComponent = class(TIdBaseComponent)
|
||||
protected
|
||||
FOnStatus: TIdStatusEvent;
|
||||
FOnWork: TWorkEvent;
|
||||
FOnWorkBegin: TWorkBeginEvent;
|
||||
FOnWorkEnd: TWorkEndEvent;
|
||||
FWorkInfos: array[TWorkMode] of TWorkInfo;
|
||||
{$IFDEF USE_OBJECT_ARC}[Weak]{$ENDIF} FWorkTarget: TIdComponent;
|
||||
//
|
||||
procedure DoStatus(AStatus: TIdStatus); overload;
|
||||
procedure DoStatus(AStatus: TIdStatus; const AArgs: array of const); overload;
|
||||
procedure InitComponent; override;
|
||||
{$IFNDEF USE_OBJECT_ARC}
|
||||
procedure Notification(AComponent: TComponent; Operation: TOperation); override;
|
||||
{$ENDIF}
|
||||
procedure SetWorkTarget(AValue: TIdComponent);
|
||||
//
|
||||
property OnWork: TWorkEvent read FOnWork write FOnWork;
|
||||
property OnWorkBegin: TWorkBeginEvent read FOnWorkBegin write FOnWorkBegin;
|
||||
property OnWorkEnd: TWorkEndEvent read FOnWorkEnd write FOnWorkEnd;
|
||||
public
|
||||
procedure BeginWork(AWorkMode: TWorkMode; const ASize: Int64 = 0); virtual;
|
||||
destructor Destroy; override;
|
||||
procedure DoWork(AWorkMode: TWorkMode; const ACount: Int64); virtual;
|
||||
procedure EndWork(AWorkMode: TWorkMode); virtual;
|
||||
//
|
||||
property WorkTarget: TIdComponent read FWorkTarget write SetWorkTarget;
|
||||
published
|
||||
property OnStatus: TIdStatusEvent read FOnStatus write FOnStatus;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
{ TIdComponent }
|
||||
|
||||
destructor TIdComponent.Destroy;
|
||||
begin
|
||||
inherited Destroy;
|
||||
// After inherited - do at last possible moment
|
||||
TIdStack.DecUsage;
|
||||
end;
|
||||
|
||||
procedure TIdComponent.DoStatus(AStatus: TIdStatus);
|
||||
begin
|
||||
DoStatus(AStatus, []);
|
||||
end;
|
||||
|
||||
procedure TIdComponent.DoStatus(AStatus: TIdStatus; const AArgs: array of const);
|
||||
begin
|
||||
// We do it this way because Format() can sometimes cause an AV if the
|
||||
// variable array is blank and there is something like a %s or %d. This
|
||||
// is why there was sometimes an AV in TIdFTP
|
||||
if Assigned(OnStatus) then begin
|
||||
if Length(AArgs) = 0 then begin
|
||||
OnStatus(Self, AStatus, IndyFormat(IdStati[AStatus], [''])); {Do not Localize}
|
||||
end else begin
|
||||
OnStatus(Self, AStatus, IndyFormat(IdStati[AStatus], AArgs));
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdComponent.BeginWork(AWorkMode: TWorkMode; const ASize: Int64 = 0);
|
||||
var
|
||||
// under ARC, convert a weak reference to a strong reference before working with it
|
||||
LWorkTarget: TIdComponent;
|
||||
begin
|
||||
LWorkTarget := FWorkTarget;
|
||||
if LWorkTarget <> nil then begin
|
||||
LWorkTarget.BeginWork(AWorkMode, ASize);
|
||||
end else begin
|
||||
Inc(FWorkInfos[AWorkMode].Level);
|
||||
if FWorkInfos[AWorkMode].Level = 1 then begin
|
||||
FWorkInfos[AWorkMode].Max := ASize;
|
||||
FWorkInfos[AWorkMode].Current := 0;
|
||||
if Assigned(OnWorkBegin) then begin
|
||||
OnWorkBegin(Self, AWorkMode, ASize);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdComponent.DoWork(AWorkMode: TWorkMode; const ACount: Int64);
|
||||
var
|
||||
// under ARC, convert a weak reference to a strong reference before working with it
|
||||
LWorkTarget: TIdComponent;
|
||||
begin
|
||||
LWorkTarget := FWorkTarget;
|
||||
if LWorkTarget <> nil then begin
|
||||
LWorkTarget.DoWork(AWorkMode, ACount);
|
||||
end else begin
|
||||
if FWorkInfos[AWorkMode].Level > 0 then begin
|
||||
Inc(FWorkInfos[AWorkMode].Current, ACount);
|
||||
if Assigned(OnWork) then begin
|
||||
OnWork(Self, AWorkMode, FWorkInfos[AWorkMode].Current);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdComponent.EndWork(AWorkMode: TWorkMode);
|
||||
var
|
||||
// under ARC, convert a weak reference to a strong reference before working with it
|
||||
LWorkTarget: TIdComponent;
|
||||
begin
|
||||
LWorkTarget := FWorkTarget;
|
||||
if LWorkTarget <> nil then begin
|
||||
LWorkTarget.EndWork(AWorkMode);
|
||||
end else begin
|
||||
if FWorkInfos[AWorkMode].Level = 1 then begin
|
||||
if Assigned(OnWorkEnd) then begin
|
||||
OnWorkEnd(Self, AWorkMode);
|
||||
end;
|
||||
end;
|
||||
Dec(FWorkInfos[AWorkMode].Level);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdComponent.InitComponent;
|
||||
begin
|
||||
inherited InitComponent;
|
||||
TIdStack.IncUsage;
|
||||
end;
|
||||
|
||||
// under ARC, all weak references to a freed object get nil'ed automatically
|
||||
{$IFNDEF USE_OBJECT_ARC}
|
||||
procedure TIdComponent.Notification(AComponent: TComponent; Operation: TOperation);
|
||||
begin
|
||||
if (Operation = opRemove) and (AComponent = FWorkTarget) then begin
|
||||
FWorkTarget := nil;
|
||||
end;
|
||||
inherited Notification(AComponent, Operation);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TIdComponent.SetWorkTarget(AValue: TIdComponent);
|
||||
begin
|
||||
{$IFDEF USE_OBJECT_ARC}
|
||||
// under ARC, all weak references to a freed object get nil'ed automatically
|
||||
FWorkTarget := AValue;
|
||||
{$ELSE}
|
||||
if FWorkTarget <> AValue then begin
|
||||
if Assigned(FWorkTarget) then begin
|
||||
FWorkTarget.RemoveFreeNotification(Self);
|
||||
end;
|
||||
FWorkTarget := AValue;
|
||||
if Assigned(AValue) then begin
|
||||
AValue.FreeNotification(Self);
|
||||
end;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,4 @@
|
||||
{$IFDEF DEPRECATED_IMPL_BUG}
|
||||
{$WARN SYMBOL_DEPRECATED OFF}
|
||||
{$ENDIF}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
{$IFDEF DEPRECATED_IMPL_BUG}
|
||||
{$IFDEF HAS_DIRECTIVE_WARN_DEFAULT}
|
||||
{$WARN SYMBOL_DEPRECATED DEFAULT}
|
||||
{$ELSE}
|
||||
{$WARN SYMBOL_DEPRECATED ON}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
@@ -0,0 +1,117 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
Rev 1.5 09/06/2004 09:52:52 CCostelloe
|
||||
Kylix 3 patch
|
||||
|
||||
Rev 1.4 2004.04.18 4:38:24 PM czhower
|
||||
EIdExceptionBase created
|
||||
|
||||
Rev 1.3 2004.03.07 11:45:22 AM czhower
|
||||
Flushbuffer fix + other minor ones found
|
||||
|
||||
Rev 1.2 2/10/2004 7:33:24 PM JPMugaas
|
||||
I had to move the wrapper exception here for DotNET stack because Borland's
|
||||
update 1 does not permit unlisted units from being put into a package. That
|
||||
now would report an error and I didn't want to move IdExceptionCore into the
|
||||
System package.
|
||||
|
||||
Rev 1.1 2004.02.03 3:15:52 PM czhower
|
||||
Updates to move to System.
|
||||
|
||||
Rev 1.0 2004.02.03 2:36:00 PM czhower
|
||||
Move
|
||||
}
|
||||
|
||||
unit IdException;
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
type
|
||||
// EIdExceptionBase is the base class which extends Exception. It is separate from EIdException
|
||||
// to allow other users of Indy to use EIdExceptionBase while still being able to separate from
|
||||
// EIdException.
|
||||
EIdException = class(Exception)
|
||||
public
|
||||
{
|
||||
The constructor must be virtual for Delphi NET if you want to call it with class methods.
|
||||
Otherwise, it will not compile in that IDE. Also it's overloaded so that it doesn't close
|
||||
the other methods declared by the DotNet exception (particularly InnerException constructors)
|
||||
}
|
||||
constructor Create(const AMsg: string); overload; virtual;
|
||||
class procedure Toss(const AMsg: string); {$IFDEF HAS_DEPRECATED}deprecated{$IFDEF HAS_DEPRECATED_MSG} 'Use raise instead'{$ENDIF};{$ENDIF}
|
||||
end;
|
||||
|
||||
TClassIdException = class of EIdException;
|
||||
|
||||
// You can add EIdSilentException to the list of ignored exceptions to reduce debugger "trapping"
|
||||
// of "normal" exceptions
|
||||
EIdSilentException = class(EIdException);
|
||||
|
||||
// EIdConnClosedGracefully is raised when remote side closes connection normally
|
||||
EIdConnClosedGracefully = class(EIdSilentException);
|
||||
|
||||
{$IFDEF DOTNET}
|
||||
// This class used in DotNet. Under windows/linux, all errors that come out the
|
||||
// indy layer descend from IdException (actually not all errors in theory, but
|
||||
// certainly all errors in practice)
|
||||
// With DotNet, the socket library itself may raise various exceptions. If the
|
||||
// exception is a socket exception, then Indy will map this to an EIdSocketError.
|
||||
// Otherwise Indy will raise an EIdWrapperException. In this case, the original
|
||||
// exception will be available using the InnerException member
|
||||
EIdWrapperException = class (EIdException);
|
||||
{$ENDIF}
|
||||
|
||||
//used for index out of range
|
||||
{CH EIdRangeException = class(EIdException); }
|
||||
|
||||
// Other shared exceptions
|
||||
EIdSocketHandleError = class(EIdException);
|
||||
{$IFDEF UNIX}
|
||||
EIdNonBlockingNotSupported = class(EIdException);
|
||||
{$ENDIF}
|
||||
EIdPackageSizeTooBig = class(EIdSocketHandleError);
|
||||
EIdNotAllBytesSent = class (EIdSocketHandleError);
|
||||
EIdCouldNotBindSocket = class (EIdSocketHandleError);
|
||||
EIdCanNotBindPortInRange = class (EIdSocketHandleError);
|
||||
EIdInvalidPortRange = class(EIdSocketHandleError);
|
||||
EIdCannotSetIPVersionWhenConnected = class(EIdSocketHandleError);
|
||||
{CH EIdInvalidIPAddress = class(EIdSocketHandleError); }
|
||||
|
||||
implementation
|
||||
|
||||
{ EIdException }
|
||||
|
||||
constructor EIdException.Create(const AMsg : String);
|
||||
begin
|
||||
inherited Create(AMsg);
|
||||
end;
|
||||
|
||||
{$I IdDeprecatedImplBugOff.inc}
|
||||
class procedure EIdException.Toss(const AMsg: string);
|
||||
{$I IdDeprecatedImplBugOn.inc}
|
||||
begin
|
||||
raise Create(AMsg);
|
||||
end;
|
||||
|
||||
end.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,366 @@
|
||||
unit IdIDN;
|
||||
{
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2012, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
|
||||
Original Author: J. Peter Mugaas
|
||||
|
||||
This file uses the "Windows Microsoft Internationalized Domain Names (IDN) Mitigation APIs 1.1"
|
||||
|
||||
There is a download for some Windows versions at:
|
||||
|
||||
http://www.microsoft.com/en-us/download/details.aspx?id=734
|
||||
|
||||
for Windows XP and that SDK includes a package of run-time libraries that might
|
||||
need to be redistributed to Windows XP users.
|
||||
|
||||
On some later Windows versions, this is redistributable is not needed.
|
||||
|
||||
For Windows 8, we do not use this.
|
||||
|
||||
From: http://msdn.microsoft.com/en-us/library/windows/desktop/ms738520%28v=vs.85%29.aspx
|
||||
|
||||
"On Windows 8 Consumer Preview and Windows Server "8" Beta, the getaddrinfo
|
||||
function provides support for IRI or Internationalized Domain Name (IDN) parsing
|
||||
applied to the name passed in the pNodeName parameter. Winsock performs
|
||||
Punycode/IDN encoding and conversion. This behavior can be disabled using the
|
||||
AI_DISABLE_IDN_ENCODING flag discussed below.
|
||||
|
||||
}
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
IdGlobal
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
, Windows
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
|
||||
{
|
||||
|
||||
}
|
||||
// ==++==
|
||||
//
|
||||
// Copyright (c) Microsoft Corporation. All Rights Reserved
|
||||
//
|
||||
// ==++==
|
||||
|
||||
// IdnDl.h
|
||||
//
|
||||
// WARNING: This .DLL is downlevel only.
|
||||
//
|
||||
// This file contains the downlevel versions of the scripts APIs
|
||||
//
|
||||
// 06 Jun 2005 Shawn Steele Initial Implementation
|
||||
const
|
||||
{$EXTERNALSYM VS_ALLOW_LATIN}
|
||||
VS_ALLOW_LATIN = $0001;
|
||||
{$EXTERNALSYM GSS_ALLOW_INHERITED_COMMON}
|
||||
GSS_ALLOW_INHERITED_COMMON = $0001;
|
||||
|
||||
type
|
||||
{$EXTERNALSYM DownlevelGetLocaleScripts_LPFN}
|
||||
DownlevelGetLocaleScripts_LPFN = function (
|
||||
lpLocaleName : LPCWSTR; // Locale Name
|
||||
lpScripts : LPWSTR; // Output buffer for scripts
|
||||
cchScripts : Integer // size of output buffer
|
||||
) : Integer stdcall;
|
||||
{$EXTERNALSYM DownlevelGetStringScripts_LPFN}
|
||||
DownlevelGetStringScripts_LPFN = function (
|
||||
dwFlags : DWORD; // optional behavior flags
|
||||
lpString : LPCWSTR; // Unicode character input string
|
||||
cchString : Integer; // size of input string
|
||||
lpScripts : LPWSTR; // Script list output string
|
||||
cchScripts : Integer // size of output string
|
||||
) : Integer stdcall;
|
||||
{$EXTERNALSYM DownlevelVerifyScripts_LPFN}
|
||||
DownlevelVerifyScripts_LPFN = function (
|
||||
dwFlags : DWORD; // optional behavior flags
|
||||
lpLocaleScripts : LPCWSTR; // Locale list of scripts string
|
||||
cchLocaleScripts : Integer; // size of locale script list string
|
||||
lpTestScripts : LPCWSTR; // test scripts string
|
||||
cchTestScripts : Integer // size of test list string
|
||||
) : BOOL stdcall;
|
||||
|
||||
// Normalization.h
|
||||
// Copyright 2002 Microsoft
|
||||
//
|
||||
// Excerpted from LH winnls.h
|
||||
type
|
||||
{$EXTERNALSYM NORM_FORM}
|
||||
NORM_FORM = DWORD;
|
||||
|
||||
const
|
||||
{$EXTERNALSYM NormalizationOther}
|
||||
NormalizationOther = 0; // Not supported
|
||||
{$EXTERNALSYM NormalizationC}
|
||||
NormalizationC = $1; // Each base plus combining characters to the canonical precomposed equivalent.
|
||||
{$EXTERNALSYM NormalizationD}
|
||||
NormalizationD = $2; // Each precomposed character to its canonical decomposed equivalent.
|
||||
{$EXTERNALSYM NormalizationKC}
|
||||
NormalizationKC = $5; // Each base plus combining characters to the canonical precomposed
|
||||
// equivalents and all compatibility characters to their equivalents.
|
||||
{$EXTERNALSYM NormalizationKD}
|
||||
NormalizationKD = $6; // Each precomposed character to its canonical decomposed equivalent
|
||||
// and all compatibility characters to their equivalents.
|
||||
|
||||
//
|
||||
// IDN (International Domain Name) Flags
|
||||
//
|
||||
const
|
||||
{$EXTERNALSYM IDN_ALLOW_UNASSIGNED}
|
||||
IDN_ALLOW_UNASSIGNED = $01; // Allow unassigned "query" behavior per RFC 3454
|
||||
{$EXTERNALSYM IDN_USE_STD3_ASCII_RULES}
|
||||
IDN_USE_STD3_ASCII_RULES = $02; // Enforce STD3 ASCII restrictions for legal characters
|
||||
|
||||
type
|
||||
//
|
||||
// Windows API Normalization Functions
|
||||
//
|
||||
{$EXTERNALSYM NormalizeString_LPFN}
|
||||
NormalizeString_LPFN = function ( NormForm : NORM_FORM;
|
||||
lpString : LPCWSTR; cwLength : Integer) : DWORD stdcall;
|
||||
{$EXTERNALSYM IsNormalizedString_LPFN}
|
||||
IsNormalizedString_LPFN = function ( NormForm : NORM_FORM;
|
||||
lpString : LPCWSTR; cwLength : Integer ) : BOOL stdcall;
|
||||
//
|
||||
// IDN (International Domain Name) Functions
|
||||
//
|
||||
{$EXTERNALSYM IdnToAscii_LPFN}
|
||||
IdnToAscii_LPFN = function(dwFlags : DWORD;
|
||||
lpUnicodeCharStr : LPCWSTR;
|
||||
cchUnicodeChar : Integer;
|
||||
lpNameprepCharStr : LPWSTR;
|
||||
cchNameprepChar : Integer ) : Integer stdcall;
|
||||
{$EXTERNALSYM IdnToNameprepUnicode_LPFN}
|
||||
IdnToNameprepUnicode_LPFN = function (dwFlags : DWORd;
|
||||
lpUnicodeCharStr : LPCWSTR;
|
||||
cchUnicodeChar : Integer;
|
||||
lpASCIICharStr : LPWSTR;
|
||||
cchASCIIChar : Integer) : Integer stdcall;
|
||||
{$EXTERNALSYM IdnToUnicode_LPFN}
|
||||
IdnToUnicode_LPFN = function (dwFlags : DWORD;
|
||||
lpASCIICharSt : LPCWSTR;
|
||||
cchASCIIChar : Integer;
|
||||
lpUnicodeCharStr : LPWSTR;
|
||||
cchUnicodeChar : Integer) : Integer stdcall;
|
||||
|
||||
var
|
||||
{$EXTERNALSYM DownlevelGetLocaleScripts}
|
||||
DownlevelGetLocaleScripts : DownlevelGetLocaleScripts_LPFN = nil;
|
||||
{$EXTERNALSYM DownlevelGetStringScripts}
|
||||
DownlevelGetStringScripts : DownlevelGetStringScripts_LPFN = nil;
|
||||
{$EXTERNALSYM DownlevelVerifyScripts}
|
||||
DownlevelVerifyScripts : DownlevelVerifyScripts_LPFN = nil;
|
||||
|
||||
{$EXTERNALSYM IsNormalizedString}
|
||||
IsNormalizedString : IsNormalizedString_LPFN = nil;
|
||||
{$EXTERNALSYM NormalizeString}
|
||||
NormalizeString : NormalizeString_LPFN = nil;
|
||||
{$EXTERNALSYM IdnToUnicode}
|
||||
IdnToUnicode : IdnToUnicode_LPFN = nil;
|
||||
{$EXTERNALSYM IdnToNameprepUnicode}
|
||||
IdnToNameprepUnicode : IdnToNameprepUnicode_LPFN = nil;
|
||||
{$EXTERNALSYM IdnToAscii}
|
||||
IdnToAscii : IdnToAscii_LPFN = nil;
|
||||
|
||||
const
|
||||
LibNDL = 'IdnDL.dll';
|
||||
LibNormaliz = 'Normaliz.dll';
|
||||
|
||||
fn_DownlevelGetLocaleScripts = 'DownlevelGetLocaleScripts';
|
||||
fn_DownlevelGetStringScripts = 'DownlevelGetStringScripts';
|
||||
fn_DownlevelVerifyScripts = 'DownlevelVerifyScripts';
|
||||
|
||||
fn_IsNormalizedString = 'IsNormalizedString';
|
||||
fn_NormalizeString = 'NormalizeString';
|
||||
fn_IdnToUnicode = 'IdnToUnicode';
|
||||
fn_IdnToNameprepUnicode = 'IdnToNameprepUnicode';
|
||||
fn_IdnToAscii = 'IdnToAscii';
|
||||
|
||||
{$ENDIF} // {$IFDEF WIN32_OR_WIN64}
|
||||
|
||||
function UseIDNAPI : Boolean;
|
||||
function IDNToPunnyCode(const AIDN : TIdUnicodeString) : String;
|
||||
function PunnyCodeToIDN(const APunnyCode : String) : TIdUnicodeString;
|
||||
|
||||
procedure InitIDNLibrary;
|
||||
procedure CloseIDNLibrary;
|
||||
|
||||
implementation
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
|
||||
uses
|
||||
SysUtils;
|
||||
|
||||
var
|
||||
hIdnDL : THandle = 0;
|
||||
hNormaliz : THandle = 0;
|
||||
|
||||
function UseIDNAPI : Boolean;
|
||||
begin
|
||||
Result := not IndyCheckWindowsVersion(6, 2);
|
||||
if Result then begin
|
||||
Result := Assigned( IdnToAscii ) and Assigned( IdnToUnicode );
|
||||
end;
|
||||
end;
|
||||
|
||||
function PunnyCodeToIDN(const APunnyCode : String) : TIdUnicodeString;
|
||||
var
|
||||
{$IFNDEF STRING_IS_UNICODE}
|
||||
LTemp: TIdUnicodeString;
|
||||
{$ENDIF}
|
||||
LIDN : TIdUnicodeString;
|
||||
Len : Integer;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(IdnToUnicode) then
|
||||
begin
|
||||
{$IFNDEF STRING_IS_UNICODE}
|
||||
LTemp := TIdUnicodeString(APunnyCode); // explicit convert to Unicode
|
||||
{$ENDIF}
|
||||
Len := IdnToUnicode(0,
|
||||
{$IFDEF STRING_IS_UNICODE}
|
||||
PIdWideChar(APunnyCode), Length(APunnyCode)
|
||||
{$ELSE}
|
||||
PIdWideChar(LTemp), Length(LTemp)
|
||||
{$ENDIF},
|
||||
nil, 0);
|
||||
if Len = 0 then begin
|
||||
IndyRaiseLastError;
|
||||
end;
|
||||
SetLength(LIDN, Len);
|
||||
Len := IdnToUnicode(0,
|
||||
{$IFDEF STRING_IS_UNICODE}
|
||||
PIdWideChar(APunnyCode), Length(APunnyCode)
|
||||
{$ELSE}
|
||||
PIdWideChar(LTemp), Length(LTemp)
|
||||
{$ENDIF},
|
||||
PIdWideChar(LIDN), Len);
|
||||
if Len = 0 then begin
|
||||
IndyRaiseLastError;
|
||||
end;
|
||||
Result := LIDN;
|
||||
end else begin
|
||||
// TODO: manual implementation here ...
|
||||
end;
|
||||
end;
|
||||
|
||||
function IDNToPunnyCode(const AIDN : TIdUnicodeString) : String;
|
||||
var
|
||||
LPunnyCode : TIdUnicodeString;
|
||||
Len : Integer;
|
||||
begin
|
||||
Result := '';
|
||||
if Assigned(IdnToAscii) then
|
||||
begin
|
||||
Len := IdnToAscii(0, PIdWideChar(AIDN), Length(AIDN), nil, 0);
|
||||
if Len = 0 then begin
|
||||
IndyRaiseLastError;
|
||||
end;
|
||||
SetLength(LPunnyCode, Len);
|
||||
Len := IdnToAscii(0, PIdWideChar(AIDN), Length(AIDN), PIdWideChar(LPunnyCode), Len);
|
||||
if Len = 0 then begin
|
||||
IndyRaiseLastError;
|
||||
end;
|
||||
{$IFDEF STRING_IS_ANSI}
|
||||
Result := AnsiString(LPunnyCode); // explicit convert to Ansi (no data loss because content is ASCII)
|
||||
{$ELSE}
|
||||
Result := LPunnyCode;
|
||||
{$ENDIF}
|
||||
end else
|
||||
begin
|
||||
// TODO: manual implementation here ...
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure InitIDNLibrary;
|
||||
begin
|
||||
if hIdnDL = 0 then
|
||||
begin
|
||||
hIdnDL := SafeLoadLibrary(LibNDL);
|
||||
if hIdnDL <> 0 then
|
||||
begin
|
||||
DownlevelGetLocaleScripts := GetProcAddress(hIdnDL, fn_DownlevelGetLocaleScripts);
|
||||
DownlevelGetStringScripts := GetProcAddress(hIdnDL, fn_DownlevelGetStringScripts);
|
||||
DownlevelVerifyScripts := GetProcAddress(hIdnDL, fn_DownlevelVerifyScripts);
|
||||
end;
|
||||
end;
|
||||
|
||||
if hNormaliz = 0 then
|
||||
begin
|
||||
hNormaliz := SafeLoadLibrary(LibNormaliz);
|
||||
if hNormaliz <> 0 then
|
||||
begin
|
||||
IdnToUnicode := GetProcAddress(hNormaliz, fn_IdnToUnicode);
|
||||
IdnToNameprepUnicode := GetProcAddress(hNormaliz, fn_IdnToNameprepUnicode);
|
||||
IdnToAscii := GetProcAddress(hNormaliz, fn_IdnToAscii);
|
||||
IsNormalizedString := GetProcAddress(hNormaliz,fn_IsNormalizedString);
|
||||
NormalizeString := GetProcAddress(hNormaliz, fn_NormalizeString);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure CloseIDNLibrary;
|
||||
var
|
||||
h : THandle;
|
||||
begin
|
||||
h := InterlockedExchangeTHandle(hIdnDL, 0);
|
||||
if h <> 0 then begin
|
||||
FreeLibrary(h);
|
||||
end;
|
||||
|
||||
h := InterlockedExchangeTHandle(hNormaliz, 0);
|
||||
if h <> 0 then begin
|
||||
FreeLibrary(h);
|
||||
end;
|
||||
|
||||
IsNormalizedString := nil;
|
||||
NormalizeString := nil;
|
||||
|
||||
IdnToUnicode := nil;
|
||||
IdnToNameprepUnicode := nil;
|
||||
IdnToAscii := nil;
|
||||
end;
|
||||
|
||||
{$ELSE}
|
||||
|
||||
function UseIDNAPI : Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
end;
|
||||
|
||||
function IDNToPunnyCode(const AIDN : TIdUnicodeString) : String;
|
||||
begin
|
||||
Todo('IDNToPunnyCode() is not implemented for this platform');
|
||||
end;
|
||||
|
||||
function PunnyCodeToIDN(const APunnyCode : String) : TIdUnicodeString;
|
||||
begin
|
||||
Todo('PunnyCodeToIDN() is not implemented for this platform');
|
||||
end;
|
||||
|
||||
procedure InitIDNLibrary;
|
||||
begin
|
||||
end;
|
||||
|
||||
procedure CloseIDNLibrary;
|
||||
begin
|
||||
end;
|
||||
|
||||
{$ENDIF} // {$IFDEF WIN32_OR_WIN64}
|
||||
|
||||
initialization
|
||||
finalization
|
||||
CloseIDNLibrary;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,475 @@
|
||||
unit IdIconv;
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
{$IFDEF FPC}
|
||||
DynLibs,
|
||||
{$ENDIF}
|
||||
IdCTypes,
|
||||
IdException
|
||||
{$IFDEF USE_BASEUNIX}
|
||||
,UnixType
|
||||
{$ENDIF}
|
||||
{$IFDEF WINDOWS}
|
||||
,Windows
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
{.$DEFINE STATICLOAD_ICONV}
|
||||
//These should be defined in libc.pas.
|
||||
type
|
||||
{$IFDEF WINDOWS}
|
||||
{$EXTERNALSYM SIZE_T}
|
||||
{$IFDEF CPU64}
|
||||
size_t = QWord;
|
||||
{$ELSE}
|
||||
size_t = DWord;
|
||||
{$ENDIF}
|
||||
Psize_t = ^size_t;
|
||||
{$ENDIF}
|
||||
|
||||
Piconv_t = ^iconv_t;
|
||||
iconv_t = Pointer;
|
||||
|
||||
{$IFNDEF STATICLOAD_ICONV}
|
||||
// This function is a possible cancellation points and therefore not
|
||||
// marked with __THROW. */
|
||||
//extern iconv_t iconv_open (__const char *__tocode, __const char *__fromcode);
|
||||
TIdiconv_open = function (__tocode : PAnsiChar; __fromcode : PAnsiChar) : iconv_t; cdecl;
|
||||
///* Convert at most *INBYTESLEFT bytes from *INBUF according to the
|
||||
// code conversion algorithm specified by CD and place up to
|
||||
// *OUTBYTESLEFT bytes in buffer at *OUTBUF. */
|
||||
//extern size_t iconv (iconv_t __cd, char **__restrict __inbuf,
|
||||
// size_t *__restrict __inbytesleft,
|
||||
// char **__restrict __outbuf,
|
||||
// size_t *__restrict __outbytesleft);
|
||||
TIdiconv = function (__cd : iconv_t; __inbuf : PPAnsiChar;
|
||||
__inbytesleft : Psize_t;
|
||||
__outbuf : PPAnsiChar;
|
||||
__outbytesleft : Psize_t ) : size_t; cdecl;
|
||||
// This function is a possible cancellation points and therefore not
|
||||
// marked with __THROW. */
|
||||
//extern int iconv_close (iconv_t __cd);
|
||||
TIdiconv_close = function (__cd : iconv_t) : TIdC_INT; cdecl;
|
||||
|
||||
type
|
||||
EIdIconvStubError = class(EIdException)
|
||||
protected
|
||||
FError : LongWord;
|
||||
FErrorMessage : String;
|
||||
FTitle : String;
|
||||
public
|
||||
constructor Build(const ATitle : String; AError : LongWord);
|
||||
property Error : LongWord read FError;
|
||||
property ErrorMessage : String read FErrorMessage;
|
||||
property Title : String read FTitle;
|
||||
end;
|
||||
|
||||
var
|
||||
iconv_open : TIdiconv_open = nil;
|
||||
iconv : TIdiconv = nil;
|
||||
iconv_close : TIdiconv_close = nil;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
//errno.h constants that are needed for this and possibly other API's.
|
||||
//It's here only because it seems to be the most sensible place to put it.
|
||||
//These are defined in other operating systems.
|
||||
|
||||
const
|
||||
{$EXTERNALSYM EPERM}
|
||||
EPERM = 1;
|
||||
{$EXTERNALSYM ENOENT}
|
||||
ENOENT = 2;
|
||||
{$EXTERNALSYM ESRCH}
|
||||
ESRCH = 3;
|
||||
{$EXTERNALSYM EINTR}
|
||||
EINTR = 4;
|
||||
{$EXTERNALSYM EIO}
|
||||
EIO = 5;
|
||||
{$EXTERNALSYM ENXIO}
|
||||
ENXIO = 6;
|
||||
{$EXTERNALSYM E2BIG}
|
||||
E2BIG = 7;
|
||||
{$EXTERNALSYM ENOEXEC}
|
||||
ENOEXEC = 8;
|
||||
{$EXTERNALSYM EBADF}
|
||||
EBADF = 9;
|
||||
{$EXTERNALSYM ECHILD}
|
||||
ECHILD = 10;
|
||||
{$EXTERNALSYM EAGAIN}
|
||||
EAGAIN = 11;
|
||||
{$EXTERNALSYM ENOMEM}
|
||||
ENOMEM = 12;
|
||||
{$EXTERNALSYM EACCES}
|
||||
EACCES = 13;
|
||||
{$EXTERNALSYM EFAULT}
|
||||
EFAULT = 14;
|
||||
{$EXTERNALSYM EBUSY}
|
||||
EBUSY = 16;
|
||||
{$EXTERNALSYM EEXIST}
|
||||
EEXIST = 17;
|
||||
{$EXTERNALSYM EXDEV}
|
||||
EXDEV = 18;
|
||||
{$EXTERNALSYM ENODEV}
|
||||
ENODEV = 19;
|
||||
{$EXTERNALSYM ENOTDIR}
|
||||
ENOTDIR = 20;
|
||||
{$EXTERNALSYM EISDIR}
|
||||
EISDIR = 21;
|
||||
{$EXTERNALSYM EINVAL}
|
||||
EINVAL = 22;
|
||||
{$EXTERNALSYM ENFILE}
|
||||
ENFILE = 23;
|
||||
{$EXTERNALSYM EMFILE}
|
||||
EMFILE = 24;
|
||||
{$EXTERNALSYM ENOTTY}
|
||||
ENOTTY = 25;
|
||||
{$EXTERNALSYM EFBIG}
|
||||
EFBIG = 27;
|
||||
{$EXTERNALSYM ENOSPC}
|
||||
ENOSPC = 28;
|
||||
{$EXTERNALSYM ESPIPE}
|
||||
ESPIPE = 29;
|
||||
{$EXTERNALSYM EROFS}
|
||||
EROFS = 30;
|
||||
{$EXTERNALSYM EMLINK}
|
||||
EMLINK = 31;
|
||||
{$EXTERNALSYM EPIPE}
|
||||
EPIPE = 32;
|
||||
{$EXTERNALSYM EDOM}
|
||||
EDOM = 33;
|
||||
{$EXTERNALSYM ERANGE}
|
||||
ERANGE = 34;
|
||||
{$EXTERNALSYM EDEADLK}
|
||||
EDEADLK = 36;
|
||||
{$EXTERNALSYM ENAMETOOLONG}
|
||||
ENAMETOOLONG = 38;
|
||||
{$EXTERNALSYM ENOLCK}
|
||||
ENOLCK = 39;
|
||||
{$EXTERNALSYM ENOSYS}
|
||||
ENOSYS = 40;
|
||||
{$EXTERNALSYM ENOTEMPTY}
|
||||
ENOTEMPTY = 41;
|
||||
{$EXTERNALSYM EILSEQ}
|
||||
EILSEQ = 42;
|
||||
|
||||
type
|
||||
EIdMSVCRTStubError = class(EIdException)
|
||||
protected
|
||||
FError : TIdC_INT;
|
||||
FErrorMessage : String;
|
||||
FTitle : String;
|
||||
public
|
||||
constructor Build(const ATitle : String; AError : TIdC_INT);
|
||||
property Error : TIdC_INT read FError;
|
||||
property ErrorMessage : String read FErrorMessage;
|
||||
property Title : String read FTitle;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
FN_ICONV_OPEN = 'iconv_open'; {Do not localize}
|
||||
FN_ICONV = 'iconv'; {Do not localize}
|
||||
FN_ICONV_CLOSE = 'iconv_close'; {Do not localize}
|
||||
{$IFDEF UNIX}
|
||||
LIBC = 'libc.so.6'; {Do not localize}
|
||||
LICONV = 'libiconv.so'; {Do not localize}
|
||||
{$ELSE}
|
||||
// TODO: support static linking, such as via the "win_iconv" library
|
||||
{$IFDEF WINDOWS}
|
||||
//http://yukihiro.nakadaira.googlepages.com/ seems to use the iconv.dll name.
|
||||
LICONV = 'iconv.dll'; {Do not localize}
|
||||
LICONV_ALT = 'libiconv.dll'; {Do not localize}
|
||||
LIBMSVCRTL = 'msvcrt.dll'; {Do not localize}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
function Load : Boolean;
|
||||
procedure Unload;
|
||||
function Loaded : Boolean;
|
||||
|
||||
{$IFDEF STATICLOAD_ICONV}
|
||||
function iconv_open(__tocode : PAnsiChar; __fromcode : PAnsiChar) : iconv_t; cdecl;
|
||||
external LICONV name FN_ICONV_OPEN;
|
||||
|
||||
function iconv(__cd : iconv_t; __inbuf : PPAnsiChar;
|
||||
__inbytesleft : Psize_t;
|
||||
__outbuf : PPAnsiChar;
|
||||
__outbytesleft : Psize_t ) : size_t; cdecl;
|
||||
external LICONV name FN_ICONV;
|
||||
|
||||
function iconv_close(__cd : iconv_t) : TIdC_INT; cdecl;
|
||||
external LICONV name FN_ICONV_CLOSE;
|
||||
{$ENDIF}
|
||||
|
||||
{
|
||||
From http://gettext.sourceforge.net/
|
||||
|
||||
Dynamic linking to iconv
|
||||
Note that the iconv function call in libiconv stores its error, if it fails,
|
||||
in the stdc library's errno. iconv.dll links to msvcrt.dll, and stores the error
|
||||
in its exported errno symbol (this is actually a memory location with an
|
||||
exported accessor function). If your code does not link against msvcrt.dll, you
|
||||
may wish to import this accessor function specifically to get iconv failure
|
||||
codes. This is particularly important for Visual C++ projects, which are likely
|
||||
to link to msvcrtd.dll in Debug configuration, rather than msvcrt.dll. I have
|
||||
written a C++ wrapper for iconv use, which does this, and I will be adding it to
|
||||
WinMerge (on sourceforge) shortly.
|
||||
}
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
var
|
||||
errno : function : PIdC_INT; cdecl;
|
||||
|
||||
function errnoStr(const AErrNo : TIdC_INT) : String;
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
{$IFNDEF STATICLOAD_ICONV}
|
||||
uses
|
||||
IdResourceStrings, SysUtils;
|
||||
|
||||
var
|
||||
{$IFDEF UNIX}
|
||||
hIconv: HModule = nilhandle;
|
||||
{$ELSE}
|
||||
hIconv: THandle = 0;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
var
|
||||
hmsvcrt : THandle = 0;
|
||||
|
||||
function Stub_errno : PIdC_INT; cdecl; forward;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF STATICLOAD_ICONV}
|
||||
constructor EIdIconvStubError.Build(const ATitle : String; AError : LongWord);
|
||||
begin
|
||||
FTitle := ATitle;
|
||||
FError := AError;
|
||||
if AError = 0 then begin
|
||||
inherited Create(ATitle);
|
||||
end else
|
||||
begin
|
||||
FErrorMessage := SysUtils.SysErrorMessage(AError);
|
||||
inherited Create(ATitle + ': ' + FErrorMessage); {Do not Localize}
|
||||
end;
|
||||
|
||||
end;
|
||||
|
||||
function Fixup(const AName: string): Pointer;
|
||||
begin
|
||||
if hIconv = 0 then begin
|
||||
if not Load then begin
|
||||
raise EIdIconvStubError.Build(Format(RSIconvCallError, [AName]), 0);
|
||||
end;
|
||||
end;
|
||||
Result := GetProcAddress(hIconv, PChar(AName));
|
||||
{
|
||||
IMPORTANT!!!
|
||||
|
||||
GNU libiconv for Win32 might be compiled with the LIBICONV_PLUG define.
|
||||
If that's the case, we will have to load the functions with a "lib" prefix.
|
||||
|
||||
IOW, CYA!!!
|
||||
}
|
||||
if Result = nil then begin
|
||||
Result := GetProcAddress(hIconv, PChar('lib'+AName));
|
||||
if Result = nil then begin
|
||||
raise EIdIconvStubError.Build(Format(RSIconvCallError, [AName]), 10022);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{stubs that automatically load the iconv library and then fixup the functions.}
|
||||
|
||||
function Stub_iconv_open(__tocode : PAnsiChar; __fromcode : PAnsiChar) : iconv_t; cdecl;
|
||||
begin
|
||||
iconv_open := Fixup(FN_ICONV_OPEN);
|
||||
Result := iconv_open(__tocode, __fromcode);
|
||||
end;
|
||||
|
||||
function stub_iconv(__cd : iconv_t; __inbuf : PPAnsiChar;
|
||||
__inbytesleft : Psize_t;
|
||||
__outbuf : PPAnsiChar;
|
||||
__outbytesleft : Psize_t ) : size_t; cdecl;
|
||||
begin
|
||||
iconv := Fixup(FN_ICONV);
|
||||
Result := iconv(__cd,__inbuf,__inbytesleft,__outbuf,__outbytesleft);
|
||||
end;
|
||||
|
||||
function stub_iconv_close(__cd : iconv_t) : TIdC_INT; cdecl;
|
||||
begin
|
||||
iconv_close := Fixup(FN_ICONV_CLOSE);
|
||||
Result := iconv_close(__cd);
|
||||
end;
|
||||
|
||||
{end stub sections}
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
procedure InitializeStubs;
|
||||
begin
|
||||
{$IFNDEF STATICLOAD_ICONV}
|
||||
iconv_open := Stub_iconv_open;
|
||||
iconv := Stub_iconv;
|
||||
iconv_close := Stub_iconv_close;
|
||||
{$ENDIF}
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
errno := Stub_errno;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function Load : Boolean;
|
||||
{$IFDEF STATICLOAD_ICONV}
|
||||
{$IFDEF USE_INLINE} inline; {$ENDIF}
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF STATICLOAD_ICONV}
|
||||
Result := True;
|
||||
{$ELSE}
|
||||
if not Loaded then begin
|
||||
//In Windows, you should use SafeLoadLibrary instead of the LoadLibrary API
|
||||
//call because LoadLibrary messes with the FPU control word.
|
||||
{$IFDEF WINDOWS}
|
||||
hIconv := SafeLoadLibrary(LICONV);
|
||||
if hIconv = 0 then begin
|
||||
hIconv := SafeLoadLibrary(LICONV_ALT);
|
||||
end;
|
||||
{$ELSE}
|
||||
{$IFDEF UNIX}
|
||||
hIconv := LoadLibrary(LICONV);
|
||||
if hIconv = NilHandle then begin
|
||||
hIconv := LoadLibrary(LIBC);
|
||||
end;
|
||||
{$ELSE}
|
||||
hIconv := LoadLibrary(LICONV);
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
Result := Loaded;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
procedure Unload;
|
||||
{$IFDEF USE_INLINE} inline; {$ENDIF}
|
||||
begin
|
||||
{$IFNDEF STATICLOAD_ICONV}
|
||||
if Loaded then begin
|
||||
FreeLibrary(hIconv);
|
||||
hIconv := 0;
|
||||
end;
|
||||
{$ENDIF}
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
if hmsvcrt <> 0 then begin
|
||||
FreeLibrary(hmsvcrt);
|
||||
hmsvcrt := 0;
|
||||
end;
|
||||
{$ENDIF}
|
||||
InitializeStubs;
|
||||
end;
|
||||
|
||||
function Loaded : Boolean;
|
||||
{$IFDEF USE_INLINE} inline; {$ENDIF}
|
||||
begin
|
||||
{$IFDEF STATICLOAD_ICONV}
|
||||
Result := True;
|
||||
{$ELSE}
|
||||
Result := (hIconv <> 0);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
const
|
||||
FN_errno = '_errno';
|
||||
|
||||
constructor EIdMSVCRTStubError.Build(const ATitle : String; AError : TIdC_INT);
|
||||
begin
|
||||
FTitle := ATitle;
|
||||
FError := AError;
|
||||
if AError = 0 then begin
|
||||
inherited Create(ATitle);
|
||||
end else
|
||||
begin
|
||||
FErrorMessage := errnoStr(AError);
|
||||
inherited Create(ATitle + ': ' + FErrorMessage); {Do not Localize}
|
||||
end;
|
||||
end;
|
||||
|
||||
function errnoStr(const AErrNo : TIdC_INT) : String;
|
||||
{$IFDEF USE_INLINE} inline; {$ENDIF}
|
||||
begin
|
||||
case AErrNo of
|
||||
EPERM : Result := 'EPERM';
|
||||
ENOENT : Result := 'ENOENT';
|
||||
ESRCH : Result := 'ESRCH';
|
||||
EINTR : Result := 'EINTR';
|
||||
EIO : Result := 'EIO';
|
||||
ENXIO : Result := 'ENXIO';
|
||||
E2BIG : Result := 'E2BIG';
|
||||
ENOEXEC : Result := 'ENOEXEC';
|
||||
EBADF : Result := 'EBADF';
|
||||
ECHILD : Result := 'ECHILD';
|
||||
EAGAIN : Result := 'EAGAIN';
|
||||
ENOMEM : Result := 'ENOMEM';
|
||||
EACCES : Result := 'EACCES';
|
||||
EFAULT : Result := 'EFAULT';
|
||||
EBUSY : Result := 'EBUSY';
|
||||
EEXIST : Result := 'EEXIST';
|
||||
EXDEV : Result := 'EXDEV';
|
||||
ENODEV : Result := 'ENODEV';
|
||||
ENOTDIR : Result := 'ENOTDIR';
|
||||
EISDIR : Result := 'EISDIR';
|
||||
EINVAL : Result := 'EINVAL';
|
||||
ENFILE : Result := 'ENFILE';
|
||||
EMFILE : Result := 'EMFILE';
|
||||
ENOTTY : Result := 'ENOTTY';
|
||||
EFBIG : Result := 'EFBIG';
|
||||
ENOSPC : Result := 'ENOSPC';
|
||||
ESPIPE : Result := 'ESPIPE';
|
||||
EROFS : Result := 'EROFS';
|
||||
EMLINK : Result := 'EMLINK';
|
||||
EPIPE : Result := 'EPIPE';
|
||||
EDOM : Result := 'EDOM';
|
||||
ERANGE : Result := 'ERANGE';
|
||||
EDEADLK : Result := 'EDEADLK';
|
||||
ENAMETOOLONG : Result := 'ENAMETOOLONG';
|
||||
ENOLCK : Result := 'ENOLCK';
|
||||
ENOSYS : Result := 'ENOSYS';
|
||||
ENOTEMPTY : Result := 'ENOTEMPTY';
|
||||
EILSEQ : Result := 'EILSEQ';
|
||||
else
|
||||
Result := '';
|
||||
end;
|
||||
end;
|
||||
|
||||
function Stub_errno : PIdC_INT; cdecl;
|
||||
begin
|
||||
if hmsvcrt = 0 then begin
|
||||
hmsvcrt := SafeLoadLibrary(LIBMSVCRTL);
|
||||
if hmsvcrt = 0 then begin
|
||||
raise EIdMSVCRTStubError.Build('Failed to load ' + LIBMSVCRTL, 0);
|
||||
end;
|
||||
errno := GetProcAddress(hmsvcrt, PChar(FN_errno));
|
||||
if not Assigned(errno) then begin
|
||||
errno := Stub_errno;
|
||||
raise EIdMSVCRTStubError.Build('Failed to load ' + FN_errno + ' in ' + LIBMSVCRTL, 0);
|
||||
end;
|
||||
end;
|
||||
Result := errno();
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
initialization
|
||||
InitializeStubs;
|
||||
|
||||
finalization
|
||||
Unload;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,130 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
Rev 1.2 2004.05.20 11:38:10 AM czhower
|
||||
IdStreamVCL
|
||||
}
|
||||
{
|
||||
Rev 1.1 2004.02.03 3:15:54 PM czhower
|
||||
Updates to move to System.
|
||||
}
|
||||
{
|
||||
Rev 1.0 2004.02.03 2:36:04 PM czhower
|
||||
Move
|
||||
}
|
||||
unit IdResourceStrings;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
//IIdTextEncoding
|
||||
RSInvalidSourceArray = 'Invalid source array';
|
||||
RSInvalidDestinationArray = 'Invalid destination array';
|
||||
RSCharIndexOutOfBounds = 'Character index out of bounds (%d)';
|
||||
RSInvalidCharCount = 'Invalid count (%d)';
|
||||
RSInvalidDestinationIndex = 'Invalid destination index (%d)';
|
||||
|
||||
RSInvalidCodePage = 'Invalid codepage (%d)';
|
||||
RSInvalidCharSet = 'Invalid character set (%s)';
|
||||
RSInvalidCharSetConv = 'Invalid character set conversion (%s <-> %s)';
|
||||
RSInvalidCharSetConvWithFlags = 'Invalid character set conversion (%s <-> %s, %s)';
|
||||
|
||||
RSUnsupportedCodePage = 'Unsupported codepage (%d)';
|
||||
RSUnsupportedCharSet = 'Unsupported character set (%s)';
|
||||
|
||||
//IdSys
|
||||
RSFailedTimeZoneInfo = 'Failed attempting to retrieve time zone information.';
|
||||
// Winsock
|
||||
RSWinsockCallError = 'Error on call to Winsock2 library function %s';
|
||||
RSWinsockLoadError = 'Error on loading Winsock2 library (%s)';
|
||||
{CH RSWinsockInitializationError = 'Winsock Initialization Error.'; }
|
||||
// Status
|
||||
RSStatusResolving = 'Resolving hostname %s.';
|
||||
RSStatusConnecting = 'Connecting to %s.';
|
||||
RSStatusConnected = 'Connected.';
|
||||
RSStatusDisconnecting = 'Disconnecting.';
|
||||
RSStatusDisconnected = 'Disconnected.';
|
||||
RSStatusText = '%s';
|
||||
// Stack
|
||||
RSStackError = 'Socket Error # %d' + #13#10 + '%s';
|
||||
RSStackEINTR = 'Interrupted system call.';
|
||||
RSStackEBADF = 'Bad file number.';
|
||||
RSStackEACCES = 'Access denied.';
|
||||
RSStackEFAULT = 'Buffer fault.';
|
||||
RSStackEINVAL = 'Invalid argument.';
|
||||
RSStackEMFILE = 'Too many open files.';
|
||||
RSStackEWOULDBLOCK = 'Operation would block.';
|
||||
RSStackEINPROGRESS = 'Operation now in progress.';
|
||||
RSStackEALREADY = 'Operation already in progress.';
|
||||
RSStackENOTSOCK = 'Socket operation on non-socket.';
|
||||
RSStackEDESTADDRREQ = 'Destination address required.';
|
||||
RSStackEMSGSIZE = 'Message too long.';
|
||||
RSStackEPROTOTYPE = 'Protocol wrong type for socket.';
|
||||
RSStackENOPROTOOPT = 'Bad protocol option.';
|
||||
RSStackEPROTONOSUPPORT = 'Protocol not supported.';
|
||||
RSStackESOCKTNOSUPPORT = 'Socket type not supported.';
|
||||
RSStackEOPNOTSUPP = 'Operation not supported on socket.';
|
||||
RSStackEPFNOSUPPORT = 'Protocol family not supported.';
|
||||
RSStackEAFNOSUPPORT = 'Address family not supported by protocol family.';
|
||||
RSStackEADDRINUSE = 'Address already in use.';
|
||||
RSStackEADDRNOTAVAIL = 'Cannot assign requested address.';
|
||||
RSStackENETDOWN = 'Network is down.';
|
||||
RSStackENETUNREACH = 'Network is unreachable.';
|
||||
RSStackENETRESET = 'Net dropped connection or reset.';
|
||||
RSStackECONNABORTED = 'Software caused connection abort.';
|
||||
RSStackECONNRESET = 'Connection reset by peer.';
|
||||
RSStackENOBUFS = 'No buffer space available.';
|
||||
RSStackEISCONN = 'Socket is already connected.';
|
||||
RSStackENOTCONN = 'Socket is not connected.';
|
||||
RSStackESHUTDOWN = 'Cannot send or receive after socket is closed.';
|
||||
RSStackETOOMANYREFS = 'Too many references, cannot splice.';
|
||||
RSStackETIMEDOUT = 'Connection timed out.';
|
||||
RSStackECONNREFUSED = 'Connection refused.';
|
||||
RSStackELOOP = 'Too many levels of symbolic links.';
|
||||
RSStackENAMETOOLONG = 'File name too long.';
|
||||
RSStackEHOSTDOWN = 'Host is down.';
|
||||
RSStackEHOSTUNREACH = 'No route to host.';
|
||||
RSStackENOTEMPTY = 'Directory not empty';
|
||||
RSStackHOST_NOT_FOUND = 'Host not found.';
|
||||
RSStackClassUndefined = 'Stack Class is undefined.';
|
||||
RSStackAlreadyCreated = 'Stack already created.';
|
||||
// Other
|
||||
RSAntiFreezeOnlyOne = 'Only one TIdAntiFreeze can exist per application.';
|
||||
RSCannotSetIPVersionWhenConnected = 'Cannot change IPVersion when connected';
|
||||
RSCannotBindRange = 'Can not bind in port range (%d - %d)';
|
||||
RSConnectionClosedGracefully = 'Connection Closed Gracefully.';
|
||||
RSCorruptServicesFile = '%s is corrupt.';
|
||||
RSCouldNotBindSocket = 'Could not bind socket. Address and port are already in use.';
|
||||
RSInvalidPortRange = 'Invalid Port Range (%d - %d)';
|
||||
RSInvalidServiceName = '%s is not a valid service.';
|
||||
RSIPv6Unavailable = 'IPv6 unavailable';
|
||||
RSInvalidIPv6Address = '%s is not a valid IPv6 address';
|
||||
RSIPVersionUnsupported = 'The requested IPVersion / Address family is not supported.';
|
||||
RSNotAllBytesSent = 'Not all bytes sent.';
|
||||
RSPackageSizeTooBig = 'Package Size Too Big.';
|
||||
RSSetSizeExceeded = 'Set Size Exceeded.';
|
||||
RSNoEncodingSpecified = 'No encoding specified.';
|
||||
{CH RSStreamNotEnoughBytes = 'Not enough bytes read from stream.'; }
|
||||
RSEndOfStream = 'End of stream: Class %s at %d';
|
||||
|
||||
//DNS Resolution error messages
|
||||
RSMaliciousPtrRecord = 'Malicious PTR Record';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,10 @@
|
||||
unit IdResourceStringsDotNet11;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
RSNotSupportedInMicrosoftNET11 = 'Not Supported in Microsoft.NET 1.1';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,11 @@
|
||||
unit IdResourceStringsIconv;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
//IdIconv
|
||||
RSIconvCallError = 'Error on call to Iconv library function %s';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,14 @@
|
||||
unit IdResourceStringsKylixCompat;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
RSReverseResolveError = 'Error resolving Address %s: %s (%d)'; { address, errorstring, errornumber }
|
||||
|
||||
RSStackTRY_AGAIN = 'Non-authoritative response (try again or check DNS setup).';
|
||||
RSStackNO_RECOVERY = 'Non-recoverable errors: FORMERR, REFUSED, NOTIMP.';
|
||||
RSStackNO_DATA = 'Valid name, no data record (check DNS setup).';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,16 @@
|
||||
unit IdResourceStringsTextEncoding;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
//TIdTextEncoding
|
||||
RSInvalidSourceArray = 'Invalid source array';
|
||||
RSInvalidDestinationArray = 'Invalid destination array';
|
||||
RSCharIndexOutOfBounds = 'Character index out of bounds (%d)';
|
||||
RSByteIndexOutOfBounds = 'Start index out of bounds (%d)';
|
||||
RSInvalidCharCount = 'Invalid count (%d)';
|
||||
RSInvalidDestinationIndex = 'Invalid destination index (%d)';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,11 @@
|
||||
unit IdResourceStringsUnix;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
RSResolveError = 'Error resolving host %s: %s (%d)'; { hostname, errorstring, errornumber }
|
||||
RSStackNonBlockingNotSupported = 'Non-blocking not supported.';
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,10 @@
|
||||
unit IdResourceStringsVCLPosix;
|
||||
|
||||
interface
|
||||
|
||||
resourcestring
|
||||
RSReverseResolveError = 'Error resolving Address %s: %s (%d)'; { address, errorstring, errornumber }
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,636 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
Rev 1.8 10/26/2004 8:12:30 PM JPMugaas
|
||||
Now uses TIdStrings and TIdStringList for portability.
|
||||
|
||||
Rev 1.7 12/06/2004 15:16:44 CCostelloe
|
||||
Restructured to remove inconsistencies with derived classes
|
||||
|
||||
Rev 1.6 07/06/2004 21:30:48 CCostelloe
|
||||
Kylix 3 changes
|
||||
|
||||
Rev 1.5 5/15/2004 3:32:30 AM DSiders
|
||||
Corrected case in name of TIdIPAddressRec.
|
||||
|
||||
Rev 1.4 4/18/04 10:29:24 PM RLebeau
|
||||
Added TIdInt64Parts structure
|
||||
|
||||
Rev 1.3 2004.04.18 4:41:40 PM czhower
|
||||
RaiseSocketError
|
||||
|
||||
Rev 1.2 2004.03.07 11:45:24 AM czhower
|
||||
Flushbuffer fix + other minor ones found
|
||||
|
||||
Rev 1.1 3/6/2004 5:16:24 PM JPMugaas
|
||||
Bug 67 fixes. Do not write to const values.
|
||||
|
||||
Rev 1.0 2004.02.03 3:14:44 PM czhower
|
||||
Move and updates
|
||||
|
||||
Rev 1.22 2/1/2004 3:28:26 AM JPMugaas
|
||||
Changed WSGetLocalAddress to GetLocalAddress and moved into IdStack since
|
||||
that will work the same in the DotNET as elsewhere. This is required to
|
||||
reenable IPWatch.
|
||||
|
||||
Rev 1.21 1/31/2004 1:13:00 PM JPMugaas
|
||||
Minor stack changes required as DotNET does support getting all IP addresses
|
||||
just like the other stacks.
|
||||
|
||||
Rev 1.20 12/4/2003 3:14:56 PM BGooijen
|
||||
Added HostByAddress
|
||||
|
||||
Rev 1.19 12/31/2003 9:52:00 PM BGooijen
|
||||
Added IPv6 support
|
||||
|
||||
Rev 1.18 10/26/2003 5:04:24 PM BGooijen
|
||||
UDP Server and Client
|
||||
|
||||
Rev 1.17 10/26/2003 09:10:24 AM JPMugaas
|
||||
Calls necessary for IPMulticasting.
|
||||
|
||||
Rev 1.16 10/22/2003 04:41:04 PM JPMugaas
|
||||
Should compile with some restored functionality. Still not finished.
|
||||
|
||||
Rev 1.15 10/21/2003 06:24:24 AM JPMugaas
|
||||
BSD Stack now have a global variable for refercing by platform specific
|
||||
things. Removed corresponding var from Windows stack.
|
||||
|
||||
Rev 1.14 10/19/2003 5:21:28 PM BGooijen
|
||||
SetSocketOption
|
||||
|
||||
Rev 1.13 2003.10.11 5:51:08 PM czhower
|
||||
-VCL fixes for servers
|
||||
-Chain suport for servers (Super core)
|
||||
-Scheduler upgrades
|
||||
-Full yarn support
|
||||
|
||||
Rev 1.12 10/5/2003 9:55:28 PM BGooijen
|
||||
TIdTCPServer works on D7 and DotNet now
|
||||
|
||||
Rev 1.11 04/10/2003 22:32:02 HHariri
|
||||
moving of WSNXXX method to IdStack and renaming of the DotNet ones
|
||||
|
||||
Rev 1.10 10/2/2003 7:36:28 PM BGooijen
|
||||
.net
|
||||
|
||||
Rev 1.9 2003.10.02 10:16:30 AM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.8 2003.10.01 9:11:22 PM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.7 2003.10.01 5:05:16 PM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.6 2003.10.01 2:30:42 PM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.3 10/1/2003 12:14:16 AM BGooijen
|
||||
DotNet: removing CheckForSocketError
|
||||
|
||||
Rev 1.2 2003.10.01 1:12:38 AM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.1 2003.09.30 1:25:02 PM czhower
|
||||
Added .inc file.
|
||||
|
||||
Rev 1.0 2003.09.30 1:24:20 PM czhower
|
||||
Initial Checkin
|
||||
|
||||
Rev 1.10 2003.09.30 10:36:02 AM czhower
|
||||
Moved stack creation to IdStack
|
||||
Added DotNet stack.
|
||||
|
||||
Rev 1.9 9/8/2003 02:13:14 PM JPMugaas
|
||||
SupportsIP6 function added for determining if IPv6 is installed on a system.
|
||||
|
||||
Rev 1.8 2003.07.17 4:57:04 PM czhower
|
||||
Added new exception type so it can be added to debugger list of ignored
|
||||
exceptions.
|
||||
|
||||
Rev 1.7 2003.07.14 11:46:46 PM czhower
|
||||
IOCP now passes all bubbles.
|
||||
|
||||
Rev 1.6 2003.07.14 1:57:24 PM czhower
|
||||
-First set of IOCP fixes.
|
||||
-Fixed a threadsafe problem with the stack class.
|
||||
|
||||
Rev 1.5 7/1/2003 05:20:38 PM JPMugaas
|
||||
Minor optimizations. Illiminated some unnecessary string operations.
|
||||
|
||||
Rev 1.4 7/1/2003 03:39:54 PM JPMugaas
|
||||
Started numeric IP function API calls for more efficiency.
|
||||
|
||||
Rev 1.3 7/1/2003 12:46:08 AM JPMugaas
|
||||
Preliminary stack functions taking an IP address numerical structure instead
|
||||
of a string.
|
||||
|
||||
Rev 1.2 5/10/2003 4:02:22 PM BGooijen
|
||||
|
||||
Rev 1.1 2003.05.09 10:59:26 PM czhower
|
||||
|
||||
Rev 1.0 11/13/2002 08:59:02 AM JPMugaas
|
||||
}
|
||||
|
||||
unit IdStackBSDBase;
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
{$IFDEF DOTNET}
|
||||
Improper compile.
|
||||
This unit must NOT be linked into DotNet applications.
|
||||
{$ENDIF}
|
||||
|
||||
uses
|
||||
Classes,
|
||||
IdException, IdStack, IdStackConsts, IdGlobal;
|
||||
|
||||
type
|
||||
// RLebeau - for use with the HostToNetwork() and NetworkToHost()
|
||||
// methods under Windows and Linux since the Socket API doesn't
|
||||
// have native conversion functions for int64 values...
|
||||
TIdInt64Parts = packed record
|
||||
case Integer of
|
||||
0: (
|
||||
{$IFDEF ENDIAN_BIG}
|
||||
HighPart: UInt32;
|
||||
LowPart: UInt32);
|
||||
{$ELSE}
|
||||
LowPart: UInt32;
|
||||
HighPart: UInt32);
|
||||
{$ENDIF}
|
||||
1: (
|
||||
QuadPart: Int64);
|
||||
end;
|
||||
TIdUInt64Parts = packed record
|
||||
case Integer of
|
||||
0: (
|
||||
{$IFDEF ENDIAN_BIG}
|
||||
HighPart: UInt32;
|
||||
LowPart: UInt32);
|
||||
{$ELSE}
|
||||
LowPart: UInt32;
|
||||
HighPart: UInt32);
|
||||
{$ENDIF}
|
||||
1: (
|
||||
QuadPart: UInt64);
|
||||
end;
|
||||
|
||||
TIdIPv6AddressRec = packed array[0..7] of UInt16;
|
||||
|
||||
TIdIPAddressRec = packed record
|
||||
IPVer: TIdIPVersion;
|
||||
case Integer of
|
||||
0: (IPv4, Junk1, Junk2, Junk3: UInt32);
|
||||
2: (IPv6 : TIdIPv6AddressRec);
|
||||
end;
|
||||
|
||||
//procedure EmptyIPRec(var VIP : TIdIPAddress);
|
||||
|
||||
TIdSunB = packed record
|
||||
s_b1, s_b2, s_b3, s_b4: UInt8;
|
||||
end;
|
||||
|
||||
TIdSunW = packed record
|
||||
s_w1, s_w2: UInt16;
|
||||
end;
|
||||
|
||||
PIdIn4Addr = ^TIdIn4Addr;
|
||||
TIdIn4Addr = packed record
|
||||
case integer of
|
||||
0: (S_un_b: TIdSunB);
|
||||
1: (S_un_w: TIdSunW);
|
||||
2: (S_addr: UInt32);
|
||||
end;
|
||||
|
||||
PIdIn6Addr = ^TIdIn6Addr;
|
||||
TIdIn6Addr = packed record
|
||||
case Integer of
|
||||
0: (s6_addr: packed array [0..16-1] of UInt8);
|
||||
1: (s6_addr16: packed array [0..8-1] of UInt16);
|
||||
end;
|
||||
(*$HPPEMIT '#ifdef s6_addr'*)
|
||||
(*$HPPEMIT ' #undef s6_addr'*)
|
||||
(*$HPPEMIT '#endif'*)
|
||||
(*$HPPEMIT '#ifdef s6_addr16'*)
|
||||
(*$HPPEMIT ' #undef s6_addr16'*)
|
||||
(*$HPPEMIT '#endif'*)
|
||||
|
||||
PIdInAddr = ^TIdInAddr;
|
||||
TIdInAddr = {$IFDEF IPv6} TIdIn6Addr; {$ELSE} TIdIn4Addr; {$ENDIF}
|
||||
|
||||
//Do not change these structures or insist on objects
|
||||
//because these are parameters to IP_ADD_MEMBERSHIP and IP_DROP_MEMBERSHIP
|
||||
TIdIPMreq = packed record
|
||||
IMRMultiAddr : TIdIn4Addr; // IP multicast address of group */
|
||||
IMRInterface : TIdIn4Addr; // local IP address of interface */
|
||||
end;
|
||||
TIdIPv6Mreq = packed record
|
||||
ipv6mr_multiaddr : TIdIn6Addr; //IPv6 multicast addr
|
||||
ipv6mr_interface : UInt32; //interface index
|
||||
end;
|
||||
|
||||
TIdStackBSDBase = class(TIdStack)
|
||||
protected
|
||||
function WSCloseSocket(ASocket: TIdStackSocketHandle): Integer; virtual; abstract;
|
||||
function WSRecv(ASocket: TIdStackSocketHandle; var ABuffer;
|
||||
const ABufferLength, AFlags: Integer): Integer; virtual; abstract;
|
||||
function WSSend(ASocket: TIdStackSocketHandle; const ABuffer;
|
||||
const ABufferLength, AFlags: Integer): Integer; virtual; abstract;
|
||||
function WSShutdown(ASocket: TIdStackSocketHandle; AHow: Integer): Integer;
|
||||
virtual; abstract;
|
||||
{$IFNDEF VCL_XE3_OR_ABOVE}
|
||||
procedure WSGetSocketOption(ASocket: TIdStackSocketHandle; ALevel: TIdSocketOptionLevel;
|
||||
AOptName: TIdSocketOption; var AOptVal; var AOptLen: Integer); virtual; abstract;
|
||||
procedure WSSetSocketOption(ASocket: TIdStackSocketHandle; ALevel: TIdSocketOptionLevel;
|
||||
AOptName: TIdSocketOption; const AOptVal; const AOptLen: Integer); virtual; abstract;
|
||||
{$ENDIF}
|
||||
//internal for multicast membership stuff
|
||||
procedure MembershipSockOpt(AHandle: TIdStackSocketHandle;
|
||||
const AGroupIP, ALocalIP : String; const ASockOpt : Integer;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION);
|
||||
public
|
||||
constructor Create; override;
|
||||
function CheckIPVersionSupport(const AIPVersion: TIdIPVersion): boolean; virtual; abstract;
|
||||
function Receive(ASocket: TIdStackSocketHandle; var VBuffer: TIdBytes): Integer; override;
|
||||
function Send(ASocket: TIdStackSocketHandle; const ABuffer: TIdBytes;
|
||||
const AOffset: Integer = 0; const ASize: Integer = -1): Integer; override;
|
||||
function ReceiveFrom(ASocket: TIdStackSocketHandle; var VBuffer: TIdBytes;
|
||||
var VIP: string; var VPort: TIdPort; var VIPVersion: TIdIPVersion): Integer; override;
|
||||
function SendTo(ASocket: TIdStackSocketHandle; const ABuffer: TIdBytes;
|
||||
const AOffset: Integer; const ASize: Integer; const AIP: string;
|
||||
const APort: TIdPort; const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION): Integer; override;
|
||||
procedure GetSocketOption(ASocket: TIdStackSocketHandle; ALevel: TIdSocketOptionLevel;
|
||||
AOptName: TIdSocketOption; out AOptVal: Integer); overload; override;
|
||||
procedure GetSocketOption(ASocket: TIdStackSocketHandle; ALevel: TIdSocketOptionLevel;
|
||||
AOptName: TIdSocketOption; var AOptVal; var AOptLen: Integer); {$IFDEF VCL_XE3_OR_ABOVE}overload; virtual; abstract;{$ELSE}reintroduce; overload;{$ENDIF}
|
||||
procedure SetSocketOption(ASocket: TIdStackSocketHandle; ALevel: TIdSocketOptionLevel;
|
||||
AOptName: TIdSocketOption; AOptVal: Integer); overload; override;
|
||||
procedure SetSocketOption(ASocket: TIdStackSocketHandle; ALevel: TIdSocketOptionLevel;
|
||||
AOptName: TIdSocketOption; const AOptVal; const AOptLen: Integer); {$IFDEF VCL_XE3_OR_ABOVE}overload; virtual; abstract;{$ELSE}reintroduce; overload;{$ENDIF}
|
||||
function TranslateTInAddrToString(var AInAddr; const AIPVersion: TIdIPVersion): string;
|
||||
procedure TranslateStringToTInAddr(const AIP: string; var AInAddr; const AIPVersion: TIdIPVersion);
|
||||
function WSGetServByName(const AServiceName: string): TIdPort; virtual; abstract;
|
||||
function WSGetServByPort(const APortNumber: TIdPort): TStrings; virtual; {$IFDEF HAS_DEPRECATED}deprecated{$IFDEF HAS_DEPRECATED_MSG} 'Use AddServByPortToList()'{$ENDIF};{$ENDIF}
|
||||
procedure AddServByPortToList(const APortNumber: TIdPort; AAddresses: TStrings); virtual; abstract;
|
||||
function RecvFrom(const ASocket: TIdStackSocketHandle; var ABuffer;
|
||||
const ALength, AFlags: Integer; var VIP: string; var VPort: TIdPort;
|
||||
var VIPVersion: TIdIPVersion): Integer; virtual; abstract;
|
||||
procedure WSSendTo(ASocket: TIdStackSocketHandle; const ABuffer;
|
||||
const ABufferLength, AFlags: Integer; const AIP: string; const APort: TIdPort;
|
||||
AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION); virtual; abstract;
|
||||
function WSSocket(AFamily : Integer; AStruct : TIdSocketType; AProtocol: Integer;
|
||||
const AOverlapped: Boolean = False): TIdStackSocketHandle; virtual; abstract;
|
||||
procedure SetBlocking(ASocket: TIdStackSocketHandle;
|
||||
const ABlocking: Boolean); virtual; abstract;
|
||||
function WouldBlock(const AResult: Integer): Boolean; virtual; abstract;
|
||||
function NewSocketHandle(const ASocketType: TIdSocketType;
|
||||
const AProtocol: TIdSocketProtocol;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION;
|
||||
const AOverlapped: Boolean = False)
|
||||
: TIdStackSocketHandle; override;
|
||||
//multicast stuff Kudzu permitted me to add here.
|
||||
procedure SetMulticastTTL(AHandle: TIdStackSocketHandle;
|
||||
const AValue : Byte; const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION); override;
|
||||
procedure SetLoopBack(AHandle: TIdStackSocketHandle; const AValue: Boolean;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION); override;
|
||||
procedure DropMulticastMembership(AHandle: TIdStackSocketHandle;
|
||||
const AGroupIP, ALocalIP : String;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION); override;
|
||||
procedure AddMulticastMembership(AHandle: TIdStackSocketHandle;
|
||||
const AGroupIP, ALocalIP : String;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION); override;
|
||||
end;
|
||||
|
||||
EIdInvalidServiceName = class(EIdException);
|
||||
EIdStackInitializationFailed = class (EIdStackError);
|
||||
EIdStackSetSizeExceeded = class (EIdStackError);
|
||||
|
||||
|
||||
//for some reason, if GDBSDStack is in the same block as GServeFileProc then
|
||||
//FPC gives a type declaration error.
|
||||
var
|
||||
GBSDStack: TIdStackBSDBase = nil;
|
||||
|
||||
const
|
||||
IdIPFamily : array[TIdIPVersion] of Integer = (Id_PF_INET4, Id_PF_INET6);
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
//done this way so we can have a separate stack for the Unix systems in FPC
|
||||
{$IFDEF UNIX}
|
||||
{$IFDEF KYLIXCOMPAT}
|
||||
IdStackLibc,
|
||||
{$ENDIF}
|
||||
{$IFDEF USE_BASEUNIX}
|
||||
IdStackUnix,
|
||||
{$ENDIF}
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
IdStackVCLPosix,
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$IFDEF WINDOWS}
|
||||
IdStackWindows,
|
||||
{$ENDIF}
|
||||
{$IFDEF DOTNET}
|
||||
IdStackDotNet,
|
||||
{$ENDIF}
|
||||
IdResourceStrings,
|
||||
SysUtils;
|
||||
|
||||
{ TIdStackBSDBase }
|
||||
|
||||
function TIdStackBSDBase.TranslateTInAddrToString(var AInAddr;
|
||||
const AIPVersion: TIdIPVersion): string;
|
||||
var
|
||||
i: Integer;
|
||||
begin
|
||||
case AIPVersion of
|
||||
Id_IPv4: begin
|
||||
// TODO: use RtlIpv4AddressToString() on Windows when available...
|
||||
Result := IntToStr(TIdIn4Addr(AInAddr).S_un_b.s_b1) + '.' {Do not Localize}
|
||||
+ IntToStr(TIdIn4Addr(AInAddr).S_un_b.s_b2) + '.' {Do not Localize}
|
||||
+ IntToStr(TIdIn4Addr(AInAddr).S_un_b.s_b3) + '.' {Do not Localize}
|
||||
+ IntToStr(TIdIn4Addr(AInAddr).S_un_b.s_b4);
|
||||
end;
|
||||
Id_IPv6: begin
|
||||
// TODO: use RtlIpv6AddressToString() on Windows when available...
|
||||
Result := '';
|
||||
for i := 0 to 7 do begin
|
||||
Result := Result + IntToHex(NetworkToHost(TIdIn6Addr(AInAddr).s6_addr16[i]), 1) + ':';
|
||||
end;
|
||||
SetLength(Result, Length(Result)-1);
|
||||
end;
|
||||
else begin
|
||||
IPVersionUnsupported;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdStackBSDBase.TranslateStringToTInAddr(const AIP: string;
|
||||
var AInAddr; const AIPVersion: TIdIPVersion);
|
||||
var
|
||||
LIP: String;
|
||||
LAddress: TIdIPv6Address;
|
||||
begin
|
||||
case AIPVersion of
|
||||
Id_IPv4: begin
|
||||
// TODO: use RtlIpv4StringToAddress() on Windows when available...
|
||||
LIP := AIP;
|
||||
TIdIn4Addr(AInAddr).S_un_b.s_b1 := IndyStrToInt(Fetch(LIP, '.')); {Do not Localize}
|
||||
TIdIn4Addr(AInAddr).S_un_b.s_b2 := IndyStrToInt(Fetch(LIP, '.')); {Do not Localize}
|
||||
TIdIn4Addr(AInAddr).S_un_b.s_b3 := IndyStrToInt(Fetch(LIP, '.')); {Do not Localize}
|
||||
TIdIn4Addr(AInAddr).S_un_b.s_b4 := IndyStrToInt(Fetch(LIP, '.')); {Do not Localize}
|
||||
end;
|
||||
Id_IPv6: begin
|
||||
// TODO: use RtlIpv6StringToAddress() on Windows when available...
|
||||
IPv6ToIdIPv6Address(AIP, LAddress);
|
||||
TIdIPv6Address(TIdIn6Addr(AInAddr).s6_addr16) := HostToNetwork(LAddress);
|
||||
end;
|
||||
else begin
|
||||
IPVersionUnsupported;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
function TIdStackBSDBase.NewSocketHandle(const ASocketType:TIdSocketType;
|
||||
const AProtocol: TIdSocketProtocol;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION;
|
||||
const AOverlapped: Boolean = False): TIdStackSocketHandle;
|
||||
begin
|
||||
// RLebeau 04/17/2008: Don't use CheckForSocketError() here. It expects
|
||||
// an Integer error code, not a TSocket handle. When WSSocket() fails,
|
||||
// it returns Id_INVALID_SOCKET. Although that is technically the same
|
||||
// value as Id_SOCKET_ERROR, passing Id_INVALID_SOCKET to CheckForSocketError()
|
||||
// causes a range check error to be raised.
|
||||
Result := WSSocket(IdIPFamily[AIPVersion], ASocketType, AProtocol, AOverlapped);
|
||||
if Result = Id_INVALID_SOCKET then begin
|
||||
RaiseLastSocketError;
|
||||
end;
|
||||
end;
|
||||
|
||||
constructor TIdStackBSDBase.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
GBSDStack := Self;
|
||||
end;
|
||||
|
||||
function TIdStackBSDBase.Receive(ASocket: TIdStackSocketHandle;
|
||||
var VBuffer: TIdBytes): Integer;
|
||||
begin
|
||||
Result := CheckForSocketError(WSRecv(ASocket, VBuffer[0], Length(VBuffer) , 0));
|
||||
end;
|
||||
|
||||
function TIdStackBSDBase.Send(ASocket: TIdStackSocketHandle; const ABuffer: TIdBytes;
|
||||
const AOffset: Integer = 0; const ASize: Integer = -1): Integer;
|
||||
var
|
||||
Tmp: Byte;
|
||||
begin
|
||||
Result := IndyLength(ABuffer, ASize, AOffset);
|
||||
if Result > 0 then begin
|
||||
Result := WSSend(ASocket, ABuffer[AOffset], Result, 0);
|
||||
end else begin
|
||||
// RLebeau: this is to allow UDP sockets to send 0-length packets.
|
||||
// Have to use a variable because the Buffer parameter is declared
|
||||
// as an untyped 'const'...
|
||||
//
|
||||
// TODO: check the socket type and only allow this for UDP sockets...
|
||||
//
|
||||
Result := WSSend(ASocket, Tmp, 0, 0);
|
||||
end;
|
||||
end;
|
||||
|
||||
function TIdStackBSDBase.ReceiveFrom(ASocket: TIdStackSocketHandle;
|
||||
var VBuffer: TIdBytes; var VIP: string; var VPort: TIdPort;
|
||||
var VIPVersion: TIdIPVersion): Integer;
|
||||
begin
|
||||
Result := CheckForSocketError(RecvFrom(ASocket, VBuffer[0], Length(VBuffer),
|
||||
0, VIP, VPort, VIPVersion));
|
||||
end;
|
||||
|
||||
function TIdStackBSDBase.SendTo(ASocket: TIdStackSocketHandle;
|
||||
const ABuffer: TIdBytes; const AOffset: Integer; const ASize: Integer;
|
||||
const AIP: string; const APort: TIdPort;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION): Integer;
|
||||
var
|
||||
Tmp: Byte;
|
||||
begin
|
||||
Result := IndyLength(ABuffer, ASize, AOffset);
|
||||
if Result > 0 then begin
|
||||
WSSendTo(ASocket, ABuffer[AOffset], Result, 0, AIP, APort, AIPVersion);
|
||||
end else begin
|
||||
// RLebeau: this is to allow UDP sockets to send 0-length packets.
|
||||
// Have to use a variable because the Buffer parameter is declared
|
||||
// as an untyped 'const'...
|
||||
//
|
||||
// TODO: check the socket type and only allow this for UDP sockets...
|
||||
//
|
||||
WSSendTo(ASocket, Tmp, 0, 0, AIP, APort, AIPVersion);
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure TIdStackBSDBase.GetSocketOption(ASocket: TIdStackSocketHandle;
|
||||
ALevel: TIdSocketOptionLevel; AOptName: TIdSocketOption; out AOptVal: Integer);
|
||||
var
|
||||
LBuf, LLen: Integer;
|
||||
begin
|
||||
LLen := SizeOf(LBuf);
|
||||
{$IFDEF VCL_XE3_OR_ABOVE}GetSocketOption{$ELSE}WSGetSocketOption{$ENDIF}(ASocket, ALevel, AOptName, LBuf, LLen);
|
||||
AOptVal := LBuf;
|
||||
end;
|
||||
|
||||
{$IFNDEF VCL_XE3_OR_ABOVE}
|
||||
procedure TIdStackBSDBase.GetSocketOption(ASocket: TIdStackSocketHandle;
|
||||
ALevel: TIdSocketOptionLevel; AOptName: TIdSocketOption; var AOptVal;
|
||||
var AOptLen: Integer);
|
||||
begin
|
||||
WSGetSocketOption(ASocket, ALevel, AOptName, AOptVal, AOptLen);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TIdStackBSDBase.SetSocketOption(ASocket: TIdStackSocketHandle;
|
||||
ALevel: TIdSocketOptionLevel; AOptName: TIdSocketOption; AOptVal: Integer);
|
||||
begin
|
||||
{$IFDEF VCL_XE3_OR_ABOVE}SetSocketOption{$ELSE}WSSetSocketOption{$ENDIF}(ASocket, ALevel, AOptName, AOptVal, SizeOf(AOptVal));
|
||||
end;
|
||||
|
||||
{$IFNDEF VCL_XE3_OR_ABOVE}
|
||||
procedure TIdStackBSDBase.SetSocketOption(ASocket: TIdStackSocketHandle;
|
||||
ALevel: TIdSocketOptionLevel; AOptName: TIdSocketOption; const AOptVal;
|
||||
const AOptLen: Integer);
|
||||
begin
|
||||
WSSetSocketOption(ASocket, ALevel, AOptName, AOptVal, AOptLen);
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
procedure TIdStackBSDBase.DropMulticastMembership(AHandle: TIdStackSocketHandle;
|
||||
const AGroupIP, ALocalIP : String; const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION);
|
||||
begin
|
||||
MembershipSockOpt(AHandle, AGroupIP, ALocalIP,
|
||||
iif(AIPVersion = Id_IPv4, Id_IP_DROP_MEMBERSHIP, Id_IPV6_DROP_MEMBERSHIP),
|
||||
AIPVersion);
|
||||
end;
|
||||
|
||||
procedure TIdStackBSDBase.AddMulticastMembership(AHandle: TIdStackSocketHandle;
|
||||
const AGroupIP, ALocalIP : String; const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION);
|
||||
begin
|
||||
MembershipSockOpt(AHandle, AGroupIP, ALocalIP,
|
||||
iif(AIPVersion = Id_IPv4, Id_IP_ADD_MEMBERSHIP, Id_IPV6_ADD_MEMBERSHIP),
|
||||
AIPVersion);
|
||||
end;
|
||||
|
||||
procedure TIdStackBSDBase.SetMulticastTTL(AHandle: TIdStackSocketHandle;
|
||||
const AValue: Byte; const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION);
|
||||
var
|
||||
LLevel, LOpt: Integer;
|
||||
begin
|
||||
case AIPVersion of
|
||||
Id_IPv4: begin
|
||||
LLevel := Id_IPPROTO_IP;
|
||||
LOpt := Id_IP_MULTICAST_TTL;
|
||||
end;
|
||||
id_IPv6: begin
|
||||
LLevel := Id_IPPROTO_IPv6;
|
||||
LOpt := Id_IPV6_MULTICAST_HOPS;
|
||||
end;
|
||||
else begin
|
||||
// keep the compiler happy
|
||||
LLevel := 0;
|
||||
LOpt := 0;
|
||||
IPVersionUnsupported;
|
||||
end;
|
||||
end;
|
||||
SetSocketOption(AHandle, LLevel, LOpt, AValue);
|
||||
end;
|
||||
|
||||
procedure TIdStackBSDBase.SetLoopBack(AHandle: TIdStackSocketHandle;
|
||||
const AValue: Boolean; const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION);
|
||||
var
|
||||
LLevel, LOpt: Integer;
|
||||
begin
|
||||
case AIPVersion of
|
||||
Id_IPv4: begin
|
||||
LLevel := Id_IPPROTO_IP;
|
||||
LOpt := Id_IP_MULTICAST_LOOP;
|
||||
end;
|
||||
Id_IPv6: begin
|
||||
LLevel := Id_IPPROTO_IPv6;
|
||||
LOpt := Id_IPV6_MULTICAST_LOOP;
|
||||
end;
|
||||
else begin
|
||||
// keep the compiler happy
|
||||
LLevel := 0;
|
||||
LOpt := 0;
|
||||
IPVersionUnsupported;
|
||||
end;
|
||||
end;
|
||||
SetSocketOption(AHandle, LLevel, LOpt, Ord(AValue));
|
||||
end;
|
||||
|
||||
procedure TIdStackBSDBase.MembershipSockOpt(AHandle: TIdStackSocketHandle;
|
||||
const AGroupIP, ALocalIP: String; const ASockOpt: Integer;
|
||||
const AIPVersion: TIdIPVersion = ID_DEFAULT_IP_VERSION);
|
||||
var
|
||||
LIP4: TIdIPMreq;
|
||||
LIP6: TIdIPv6Mreq;
|
||||
begin
|
||||
case AIPVersion of
|
||||
Id_IPv4: begin
|
||||
if IsValidIPv4MulticastGroup(AGroupIP) then
|
||||
begin
|
||||
TranslateStringToTInAddr(AGroupIP, LIP4.IMRMultiAddr, Id_IPv4);
|
||||
TranslateStringToTInAddr(ALocalIP, LIP4.IMRInterface, Id_IPv4);
|
||||
SetSocketOption(AHandle, Id_IPPROTO_IP, ASockOpt, LIP4, SizeOf(LIP4));
|
||||
end;
|
||||
end;
|
||||
Id_IPv6: begin
|
||||
if IsValidIPv6MulticastGroup(AGroupIP) then
|
||||
begin
|
||||
TranslateStringToTInAddr(AGroupIP, LIP6.ipv6mr_multiaddr, Id_IPv6);
|
||||
//this should be safe meaning any adaptor
|
||||
//we can't support a localhost address in IPv6 because we can't get that
|
||||
//and even if you could, you would have to convert it into a network adaptor
|
||||
//index - Yuk
|
||||
LIP6.ipv6mr_interface := 0;
|
||||
SetSocketOption(AHandle, Id_IPPROTO_IPv6, ASockOpt, LIP6, SizeOf(LIP6));
|
||||
end;
|
||||
end;
|
||||
else begin
|
||||
IPVersionUnsupported;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
{$I IdDeprecatedImplBugOff.inc}
|
||||
function TIdStackBSDBase.WSGetServByPort(const APortNumber: TIdPort): TStrings;
|
||||
{$I IdDeprecatedImplBugOn.inc}
|
||||
begin
|
||||
Result := TStringList.Create;
|
||||
try
|
||||
AddServByPortToList(APortNumber, Result);
|
||||
except
|
||||
FreeAndNil(Result);
|
||||
raise;
|
||||
end;
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,944 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
{
|
||||
Rev 1.0 2004.02.07 12:25:16 PM czhower
|
||||
Recheckin to fix case of filename
|
||||
|
||||
Rev 1.1 2/7/2004 5:20:06 AM JPMugaas
|
||||
Added some constants that were pasted from other places. DotNET uses the
|
||||
standard Winsock 2 error consstants. We don't want to link to IdWInsock or
|
||||
Windows though because that causes other problems.
|
||||
|
||||
Rev 1.0 2004.02.03 3:14:44 PM czhower
|
||||
Move and updates
|
||||
|
||||
Rev 1.12 2003.12.28 6:53:46 PM czhower
|
||||
Added some consts.
|
||||
|
||||
Rev 1.11 10/28/2003 9:14:54 PM BGooijen
|
||||
.net
|
||||
|
||||
Rev 1.10 10/19/2003 10:46:18 PM BGooijen
|
||||
Added more consts
|
||||
|
||||
Rev 1.9 10/19/2003 9:15:28 PM BGooijen
|
||||
added some SocketOptionName consts for dotnet
|
||||
|
||||
Rev 1.8 10/19/2003 5:21:30 PM BGooijen
|
||||
SetSocketOption
|
||||
|
||||
Rev 1.7 10/2/2003 7:31:18 PM BGooijen
|
||||
.net
|
||||
|
||||
Rev 1.6 2003.10.02 10:16:32 AM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.5 2003.10.01 5:05:18 PM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.4 2003.10.01 1:12:40 AM czhower
|
||||
.Net
|
||||
|
||||
Rev 1.3 2003.09.30 12:09:38 PM czhower
|
||||
DotNet changes.
|
||||
|
||||
Rev 1.2 9/29/2003 10:28:30 PM BGooijen
|
||||
Added constants for DotNet
|
||||
|
||||
Rev 1.1 12-14-2002 14:58:34 BGooijen
|
||||
Added definition for Id_SOCK_RDM and Id_SOCK_SEQPACKET
|
||||
|
||||
Rev 1.0 11/13/2002 08:59:14 AM JPMugaas
|
||||
}
|
||||
|
||||
unit IdStackConsts;
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
{ This should be the only unit except OS Stack units that reference
|
||||
Winsock or lnxsock }
|
||||
|
||||
uses
|
||||
{$IFDEF DOTNET}
|
||||
System.Net.Sockets;
|
||||
{$ENDIF}
|
||||
//TODO: I'm not really sure how other platforms are supported with asockets header
|
||||
//Do I use the sockets unit or do something totally different for each platform
|
||||
{$IFDEF WINDOWS}
|
||||
IdWship6, //for some constants that supplement IdWinsock
|
||||
IdWinsock2;
|
||||
{$ENDIF}
|
||||
{$IFDEF OS2}
|
||||
pmwsock;
|
||||
{$ENDIF}
|
||||
{$IFDEF SOCKETTYPE_IS_CINT}
|
||||
IdCTypes,
|
||||
{$ENDIF}
|
||||
{$IFDEF NETWARE_CLIB}
|
||||
winsock; //not sure if this is correct
|
||||
{$ENDIF}
|
||||
{$IFDEF NETWARE_LIBC}
|
||||
winsock; //not sure if this is correct
|
||||
{$ENDIF}
|
||||
{$IFDEF MACOS_CLASSIC}
|
||||
{$ENDIF}
|
||||
{$IFDEF UNIX}
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
{
|
||||
IMPORTANT!!!
|
||||
|
||||
The new Posix units have platform specific stuff. Since this code and
|
||||
the definitions are not intented to be compiled in non-Unix-like operating
|
||||
systems, platform warnings are not going to be too helpful.
|
||||
}
|
||||
{$I IdSymbolPlatformOff.inc}
|
||||
IdVCLPosixSupplemental,
|
||||
Posix.Errno,Posix.NetDB, Posix.NetinetIn, Posix.SysSocket;
|
||||
{$ENDIF}
|
||||
{$IFDEF KYLIXCOMPAT}
|
||||
libc;
|
||||
{$ENDIF}
|
||||
{$IFDEF USE_BASEUNIX}
|
||||
Sockets, BaseUnix, Unix; // FPC "native" Unix units.
|
||||
//Marco may want to change the socket interface unit
|
||||
//so we don't use the libc header.
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
type
|
||||
{$IFDEF USE_BASEUNIX}
|
||||
TSocket = cint; // TSocket is afaik not POSIX, so we have to add it
|
||||
// (Socket() returns a C int according to opengroup)
|
||||
{$ENDIF}
|
||||
|
||||
TIdStackSocketHandle =
|
||||
{$IFDEF DOTNET}
|
||||
Socket
|
||||
{$ELSE}
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
Integer
|
||||
{$ELSE}
|
||||
TSocket
|
||||
{$ENDIF}
|
||||
{$ENDIF};
|
||||
|
||||
var
|
||||
Id_SO_True: Integer = 1;
|
||||
Id_SO_False: Integer = 0;
|
||||
|
||||
const
|
||||
{$IFDEF DOTNET}
|
||||
Id_IPV6_UNICAST_HOPS = SocketOptionName.IpTimeToLive;
|
||||
Id_IPV6_MULTICAST_IF = SocketOptionName.MulticastInterface;
|
||||
Id_IPV6_MULTICAST_HOPS = SocketOptionName.MulticastTimeToLive;
|
||||
Id_IPV6_MULTICAST_LOOP = SocketOptionName.MulticastLoopback;
|
||||
Id_IPV6_ADD_MEMBERSHIP = SocketOptionName.AddMembership;
|
||||
Id_IPV6_DROP_MEMBERSHIP = SocketOptionName.DropMembership;
|
||||
Id_IPV6_PKTINFO = SocketOptionName.PacketInformation;
|
||||
Id_IP_MULTICAST_TTL = SocketOptionName.MulticastTimeToLive;
|
||||
Id_IP_MULTICAST_LOOP = SocketOptionName.MulticastLoopback;
|
||||
Id_IP_ADD_MEMBERSHIP = SocketOptionName.AddMembership;
|
||||
Id_IP_DROP_MEMBERSHIP = SocketOptionName.DropMembership;
|
||||
Id_IP_HDR_INCLUDED = SocketOptionName.HeaderIncluded;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF UNIX}
|
||||
Id_IPV6_UNICAST_HOPS = IPV6_UNICAST_HOPS;
|
||||
Id_IPV6_MULTICAST_IF = IPV6_MULTICAST_IF;
|
||||
Id_IPV6_MULTICAST_HOPS = IPV6_MULTICAST_HOPS;
|
||||
Id_IPV6_MULTICAST_LOOP = IPV6_MULTICAST_LOOP;
|
||||
{$IFDEF LINUX}
|
||||
// These are probably leftovers from the non-final IPV6 KAME standard
|
||||
// in Linux. They only seem to exist in Linux, others use
|
||||
// the standarised versions.
|
||||
// Probably the JOIN_GROUP ones replaced these,
|
||||
// but they have different numbers in Linux, and possibly
|
||||
// also different behaviour?
|
||||
{$IFNDEF KYLIX}
|
||||
{$IFDEF USE_BASEUNIX}
|
||||
//In Linux, the libc.pp header maps the old values to new ones,
|
||||
//probably for consistancy. I'm doing this because we can't link
|
||||
//to Libc for Basic Unix stuff and some people may want to use this API
|
||||
//in Linux instead of the libc API.
|
||||
IPV6_ADD_MEMBERSHIP = IPV6_JOIN_GROUP;
|
||||
IPV6_DROP_MEMBERSHIP = IPV6_LEAVE_GROUP;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
// FIXME: Android compiler is using these definitions, but maybe some
|
||||
// EXTERNALSYM-work is needed above.
|
||||
IPV6_ADD_MEMBERSHIP = IPV6_JOIN_GROUP;
|
||||
{$EXTERNALSYM IPV6_ADD_MEMBERSHIP}
|
||||
IPV6_DROP_MEMBERSHIP = IPV6_LEAVE_GROUP;
|
||||
{$EXTERNALSYM IPV6_DROP_MEMBERSHIP}
|
||||
{$IFNDEF USE_VCL_POSIX}
|
||||
IPV6_CHECKSUM = 26;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
Id_IPV6_ADD_MEMBERSHIP = IPV6_ADD_MEMBERSHIP;
|
||||
Id_IPV6_DROP_MEMBERSHIP = IPV6_DROP_MEMBERSHIP;
|
||||
Id_IPV6_PKTINFO = IPV6_PKTINFO;
|
||||
Id_IPV6_HOPLIMIT = IPV6_HOPLIMIT;
|
||||
Id_IP_MULTICAST_TTL = IP_MULTICAST_TTL; // TODO integrate into IdStackConsts
|
||||
Id_IP_MULTICAST_LOOP = IP_MULTICAST_LOOP; // TODO integrate into IdStackConsts
|
||||
Id_IP_ADD_MEMBERSHIP = IP_ADD_MEMBERSHIP; // TODO integrate into IdStackConsts
|
||||
Id_IP_DROP_MEMBERSHIP = IP_DROP_MEMBERSHIP; // TODO integrate into IdStackConsts
|
||||
|
||||
//In Windows CE 4.2, IP_HDRINCL may not be supported.
|
||||
Id_IP_HDR_INCLUDED = IP_HDRINCL; // TODO integrate into IdStackConsts
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
Id_IPV6_HDRINCL = IPV6_HDRINCL;
|
||||
Id_IPV6_UNICAST_HOPS = IPV6_UNICAST_HOPS;
|
||||
Id_IPV6_MULTICAST_IF = IPV6_MULTICAST_IF;
|
||||
Id_IPV6_MULTICAST_HOPS = IPV6_MULTICAST_HOPS;
|
||||
Id_IPV6_MULTICAST_LOOP = IPV6_MULTICAST_LOOP;
|
||||
Id_IPV6_ADD_MEMBERSHIP = IPV6_ADD_MEMBERSHIP;
|
||||
Id_IPV6_DROP_MEMBERSHIP = IPV6_DROP_MEMBERSHIP;
|
||||
Id_IPV6_PKTINFO = IPV6_PKTINFO;
|
||||
Id_IPV6_HOPLIMIT = IPV6_HOPLIMIT;
|
||||
Id_IP_MULTICAST_TTL = 10; // TODO integrate into IdStackConsts FIX ERROR in IdWinsock
|
||||
Id_IP_MULTICAST_LOOP = 11; // TODO integrate into IdStackConsts FIX ERROR in IdWinsock
|
||||
Id_IP_ADD_MEMBERSHIP = 12; // TODO integrate into IdStackConsts FIX ERROR in IdWinsock
|
||||
Id_IP_DROP_MEMBERSHIP = 13; // TODO integrate into IdStackConsts FIX ERROR in IdWinsock
|
||||
Id_IP_HDR_INCLUDED = 2; // TODO integrate into IdStackConsts FIX ERROR in IdWinsock
|
||||
{$ENDIF}
|
||||
|
||||
(*
|
||||
There seems to be an error in the correct values of multicast values in IdWinsock
|
||||
The values should be:
|
||||
|
||||
ip_options = 1; //* set/get IP options */
|
||||
ip_hdrincl = 2; //* header is included with data */
|
||||
ip_tos = 3; //* IP type of service and preced*/
|
||||
ip_ttl = 4; //* IP time to live */
|
||||
ip_multicast_if = 9; //* set/get IP multicast i/f */
|
||||
ip_multicast_ttl = 10; //* set/get IP multicast ttl */
|
||||
ip_multicast_loop = 11; //*set/get IP multicast loopback */
|
||||
ip_add_membership = 12; //* add an IP group membership */
|
||||
ip_drop_membership = 13; //* drop an IP group membership */
|
||||
ip_dontfragment = 14; //* don't fragment IP datagrams */ {Do not Localize}
|
||||
*)
|
||||
{$IFDEF UNIX}
|
||||
TCP_NODELAY = 1;
|
||||
{$ENDIF}
|
||||
|
||||
// Protocol Family
|
||||
|
||||
{$IFNDEF DOTNET}
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
Id_PF_INET4 = AF_INET;
|
||||
Id_PF_INET6 = AF_INET6;
|
||||
{$ELSE}
|
||||
Id_PF_INET4 = PF_INET;
|
||||
Id_PF_INET6 = PF_INET6;
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
Id_PF_INET4 = ProtocolFamily.InterNetwork;
|
||||
Id_PF_INET6 = ProtocolFamily.InterNetworkV6;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF USE_BASEUNIX}
|
||||
// These constants are actually WinSock specific, not std TCP/IP
|
||||
// FPC doesn't emulate WinSock.
|
||||
INVALID_SOCKET = -1;
|
||||
SOCKET_ERROR = -1;
|
||||
{$ENDIF}
|
||||
|
||||
type
|
||||
// Socket Type
|
||||
{$IFDEF SOCKETTYPE_IS_CINT}
|
||||
TIdSocketType = TIdC_INT;
|
||||
{$ENDIF}
|
||||
{$IFDEF SOCKETTYPE_IS___SOCKETTYPE}
|
||||
TIdSocketType = __socket_type;
|
||||
{$ENDIF}
|
||||
{$IFDEF SOCKETTYPE_IS_LONGINT}
|
||||
TIdSocketType = Integer;
|
||||
{$ENDIF}
|
||||
{$IFDEF SOCKETTYPE_IS_SOCKETTYPE}
|
||||
TIdSocketType = SocketType;
|
||||
{$ENDIF}
|
||||
|
||||
const
|
||||
// {$IFNDEF DOTNET}
|
||||
// {$IFDEF KYLIXCOMPAT}
|
||||
// Id_SOCK_STREAM = TIdSocketType(SOCK_STREAM); //1 /* stream socket */
|
||||
// Id_SOCK_DGRAM = TIdSocketType(SOCK_DGRAM); //2 /* datagram socket */
|
||||
// Id_SOCK_RAW = TIdSocketType(SOCK_RAW); //3 /* raw-protocol interface */
|
||||
// Id_SOCK_RDM = TIdSocketType(SOCK_RDM); //4 /* reliably-delivered message */
|
||||
// Id_SOCK_SEQPACKET = SOCK_SEQPACKET; //5 /* sequenced packet stream */
|
||||
// {$ELSE}
|
||||
// Id_SOCK_STREAM = SOCK_STREAM; //1 /* stream socket */
|
||||
// Id_SOCK_DGRAM = SOCK_DGRAM; //2 /* datagram socket */
|
||||
// Id_SOCK_RAW = SOCK_RAW; //3 /* raw-protocol interface */
|
||||
// Id_SOCK_RDM = SOCK_RDM; //4 /* reliably-delivered message */
|
||||
// Id_SOCK_SEQPACKET = SOCK_SEQPACKET; //5 /* sequenced packet stream */
|
||||
// {$ENDIF}
|
||||
{$IFDEF SOCKETTYPE_IS_SOCKETTYPE}
|
||||
Id_SOCK_STREAM = SocketType.Stream; // /* stream socket */
|
||||
Id_SOCK_DGRAM = SocketType.Dgram; // /* datagram socket */
|
||||
Id_SOCK_RAW = SocketType.Raw; // /* raw-protocol interface */
|
||||
Id_SOCK_RDM = SocketType.Rdm; // /* reliably-delivered message */
|
||||
Id_SOCK_SEQPACKET = SocketType.Seqpacket; // /* sequenced packet stream */
|
||||
Id_SOCK_UNKNOWN = SocketType.Unknown; // /* unknown */
|
||||
{$ELSE}
|
||||
Id_SOCK_UNKNOWN = TIdSocketType(0);
|
||||
Id_SOCK_STREAM = TIdSocketType(SOCK_STREAM); //1 /* stream socket */
|
||||
Id_SOCK_DGRAM = TIdSocketType(SOCK_DGRAM); //2 /* datagram socket */
|
||||
Id_SOCK_RAW = TIdSocketType(SOCK_RAW); //3 /* raw-protocol interface */
|
||||
{$IFNDEF USE_VCL_POSIX}
|
||||
Id_SOCK_RDM = TIdSocketType(SOCK_RDM); //4 /* reliably-delivered message */
|
||||
{$ENDIF}
|
||||
Id_SOCK_SEQPACKET = SOCK_SEQPACKET; //5 /* sequenced packet stream */
|
||||
{$ENDIF}
|
||||
|
||||
type
|
||||
// IP Protocol type
|
||||
TIdSocketProtocol = {$IFDEF DOTNET}ProtocolType{$ELSE}Integer{$ENDIF};
|
||||
TIdSocketOption = {$IFDEF DOTNET}SocketOptionName{$ELSE}Integer{$ENDIF};
|
||||
TIdSocketOptionLevel = {$IFDEF DOTNET}SocketOptionLevel{$ELSE}Integer{$ENDIF};
|
||||
|
||||
|
||||
|
||||
const
|
||||
{$IFNDEF DOTNET}
|
||||
{$IFDEF OS2}
|
||||
Id_IPPROTO_GGP = IPPROTO_GGP; //OS/2 does something strange and we might wind up
|
||||
//supporting it later for all we know.
|
||||
{$ELSE}
|
||||
Id_IPPROTO_GGP = 3;// IPPROTO_GGP; may not be defined in some headers in FPC
|
||||
{$ENDIF}
|
||||
Id_IPPROTO_ICMP = IPPROTO_ICMP;
|
||||
Id_IPPROTO_ICMPV6 = IPPROTO_ICMPV6;
|
||||
{$IFNDEF USE_VCL_POSIX}
|
||||
Id_IPPROTO_IDP = IPPROTO_IDP;
|
||||
|
||||
Id_IPPROTO_IGMP = IPPROTO_IGMP;
|
||||
{$ENDIF}
|
||||
Id_IPPROTO_IP = IPPROTO_IP;
|
||||
Id_IPPROTO_IPv6 = IPPROTO_IPV6;
|
||||
Id_IPPROTO_ND = 77; //IPPROTO_ND; is not defined in some headers in FPC
|
||||
Id_IPPROTO_PUP = IPPROTO_PUP;
|
||||
Id_IPPROTO_RAW = IPPROTO_RAW;
|
||||
Id_IPPROTO_TCP = IPPROTO_TCP;
|
||||
Id_IPPROTO_UDP = IPPROTO_UDP;
|
||||
Id_IPPROTO_MAX = IPPROTO_MAX;
|
||||
{$ELSE}
|
||||
Id_IPPROTO_GGP = ProtocolType.Ggp; //Gateway To Gateway Protocol.
|
||||
Id_IPPROTO_ICMP = ProtocolType.Icmp; //Internet Control Message Protocol.
|
||||
Id_IPPROTO_ICMPv6 = ProtocolType.IcmpV6; //ICMP for IPv6
|
||||
Id_IPPROTO_IDP = ProtocolType.Idp; //IDP Protocol.
|
||||
Id_IPPROTO_IGMP = ProtocolType.Igmp; //Internet Group Management Protocol.
|
||||
Id_IPPROTO_IP = ProtocolType.IP; //Internet Protocol.
|
||||
Id_IPPROTO_IPv6 = ProtocolType.IPv6;
|
||||
Id_IPPROTO_IPX = ProtocolType.Ipx; //IPX Protocol.
|
||||
Id_IPPROTO_ND = ProtocolType.ND; //Net Disk Protocol (unofficial).
|
||||
Id_IPPROTO_PUP = ProtocolType.Pup; //PUP Protocol.
|
||||
Id_IPPROTO_RAW = ProtocolType.Raw; //Raw UP packet protocol.
|
||||
Id_IPPROTO_SPX = ProtocolType.Spx; //SPX Protocol.
|
||||
Id_IPPROTO_SPXII = ProtocolType.SpxII; //SPX Version 2 Protocol.
|
||||
Id_IPPROTO_TCP = ProtocolType.Tcp; //Transmission Control Protocol.
|
||||
Id_IPPROTO_UDP = ProtocolType.Udp; //User Datagram Protocol.
|
||||
Id_IPPROTO_UNKNOWN = ProtocolType.Unknown; //Unknown protocol.
|
||||
Id_IPPROTO_UNSPECIFIED = ProtocolType.Unspecified; //unspecified protocol.
|
||||
// Id_IPPROTO_MAX = ProtocolType.; ?????????????????????
|
||||
{$ENDIF}
|
||||
|
||||
|
||||
|
||||
// Socket Option level
|
||||
{$IFNDEF DOTNET}
|
||||
Id_SOL_SOCKET = SOL_SOCKET;
|
||||
Id_SOL_IP = IPPROTO_IP;
|
||||
Id_SOL_IPv6 = IPPROTO_IPV6;
|
||||
Id_SOL_TCP = IPPROTO_TCP;
|
||||
Id_SOL_UDP = IPPROTO_UDP;
|
||||
{$ELSE}
|
||||
Id_SOL_SOCKET = SocketOptionLevel.Socket;
|
||||
Id_SOL_IP = SocketOptionLevel.Ip;
|
||||
Id_SOL_IPv6 = SocketOptionLevel.IPv6;
|
||||
Id_SOL_TCP = SocketOptionLevel.Tcp;
|
||||
Id_SOL_UDP = SocketOptionLevel.Udp;
|
||||
{$ENDIF}
|
||||
|
||||
// Socket options
|
||||
{$IFNDEF DOTNET}
|
||||
{$IFNDEF WINDOWS}
|
||||
SO_DONTLINGER = not SO_LINGER;
|
||||
{$EXTERNALSYM SO_DONTLINGER}
|
||||
{$ENDIF}
|
||||
Id_SO_BROADCAST = SO_BROADCAST;
|
||||
Id_SO_DEBUG = SO_DEBUG;
|
||||
Id_SO_DONTLINGER = SO_DONTLINGER;
|
||||
Id_SO_DONTROUTE = SO_DONTROUTE;
|
||||
Id_SO_KEEPALIVE = SO_KEEPALIVE;
|
||||
Id_SO_LINGER = SO_LINGER;
|
||||
Id_SO_OOBINLINE = SO_OOBINLINE;
|
||||
Id_SO_RCVBUF = SO_RCVBUF;
|
||||
Id_SO_REUSEADDR = SO_REUSEADDR;
|
||||
Id_SO_SNDBUF = SO_SNDBUF;
|
||||
Id_SO_TYPE = SO_TYPE;
|
||||
{$IFDEF WINDOWS}
|
||||
Id_SO_UPDATE_ACCEPT_CONTEXT = SO_UPDATE_ACCEPT_CONTEXT;
|
||||
Id_SO_UPDATE_CONNECT_CONTEXT = SO_UPDATE_CONNECT_CONTEXT;
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
{
|
||||
SocketOptionName.AcceptConnection;// Socket is listening.
|
||||
SocketOptionName.AddMembership;// Add an IP group membership.
|
||||
SocketOptionName.AddSourceMembership;// Join a source group.
|
||||
SocketOptionName.BlockSource;// Block data from a source.
|
||||
}
|
||||
Id_SO_BROADCAST = SocketOptionName.Broadcast;// Permit sending broadcast messages on the socket.
|
||||
{
|
||||
SocketOptionName.BsdUrgent;// Use urgent data as defined in RFC-1222. This option can be set only once, and once set, cannot be turned off.
|
||||
SocketOptionName.ChecksumCoverage;// Set or get UDP checksum coverage.
|
||||
}
|
||||
Id_SO_DEBUG = SocketOptionName.Debug;// Record debugging information.
|
||||
{
|
||||
SocketOptionName.DontFragment;// Do not fragment IP datagrams.
|
||||
}
|
||||
Id_SO_DONTLINGER = SocketOptionName.DontLinger;// Close socket gracefully without lingering.
|
||||
Id_SO_DONTROUTE = SocketOptionName.DontRoute;// Do not route; send directly to interface addresses.
|
||||
{
|
||||
SocketOptionName.DropMembership;// Drop an IP group membership.
|
||||
SocketOptionName.DropSourceMembership;// Drop a source group.
|
||||
SocketOptionName.Error;// Get error status and clear.
|
||||
SocketOptionName.ExclusiveAddressUse;// Enables a socket to be bound for exclusive access.
|
||||
SocketOptionName.Expedited;// Use expedited data as defined in RFC-1222. This option can be set only once, and once set, cannot be turned off.
|
||||
SocketOptionName.HeaderIncluded;// Indicates application is providing the IP header for outgoing datagrams.
|
||||
SocketOptionName.IPOptions;// Specifies IP options to be inserted into outgoing datagrams.
|
||||
}
|
||||
Id_SO_KEEPALIVE = SocketOptionName.KeepAlive;// Send keep-alives.
|
||||
Id_SO_LINGER = SocketOptionName.Linger;// Linger on close if unsent data is present.
|
||||
{
|
||||
SocketOptionName.MaxConnections;// Maximum queue length that can be specified by Listen.
|
||||
SocketOptionName.MulticastInterface;// Set the interface for outgoing multicast packets.
|
||||
SocketOptionName.MulticastLoopback;// IP multicast loopback.
|
||||
SocketOptionName.MulticastTimeToLive;// IP multicast time to live.
|
||||
SocketOptionName.NoChecksum;// Send UDP datagrams with checksum set to zero.
|
||||
SocketOptionName.NoDelay;// Disables the Nagle algorithm for send coalescing.
|
||||
}
|
||||
Id_SO_OOBINLINE = SocketOptionName.OutOfBandInline;// Receives out-of-band data in the normal data stream.
|
||||
{
|
||||
SocketOptionName.PacketInformation;// Return information about received packets.
|
||||
}
|
||||
Id_SO_RCVBUF = SocketOptionName.ReceiveBuffer;// Specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum message size or the size of a TCP window.
|
||||
{
|
||||
SocketOptionName.ReceiveLowWater;// Receive low water mark.
|
||||
SocketOptionName.ReceiveTimeout;// Receive time out. This option applies only to synchronous methods; it has no effect on asynchronous methods such as BeginSend.
|
||||
}
|
||||
Id_SO_REUSEADDR = SocketOptionName.ReuseAddress;// Allows the socket to be bound to an address that is already in use.
|
||||
Id_SO_SNDBUF = SocketOptionName.SendBuffer;// Specifies the total per-socket buffer space reserved for sends. This is unrelated to the maximum message size or the size of a TCP window.
|
||||
{
|
||||
SocketOptionName.SendLowWater;// Specifies the total per-socket buffer space reserved for receives. This is unrelated to the maximum message size or the size of a TCP window.
|
||||
SocketOptionName.SendTimeout;// Send timeout. This option applies only to synchronous methods; it has no effect on asynchronous methods such as BeginSend.
|
||||
}
|
||||
Id_SO_TYPE = SocketOptionName.Type;// Get socket type.
|
||||
{
|
||||
SocketOptionName.TypeOfService;// Change the IP header type of service field.
|
||||
SocketOptionName.UnblockSource;// Unblock a previously blocked source.
|
||||
}
|
||||
Id_SO_UPDATE_ACCEPT_CONTEXT = SocketOptionName.UpdateAcceptContext;// Updates an accepted socket's properties by using those of an existing socket.
|
||||
Id_SO_UPDATE_CONNECT_CONTEXT = SocketOptionName.UpdateConnectContext;// Updates a connected socket's properties by using those of an existing socket.
|
||||
{
|
||||
SocketOptionName.UseLoopback;// Bypass hardware when possible.
|
||||
}
|
||||
{$ENDIF}
|
||||
|
||||
// Additional socket options
|
||||
{$IFNDEF DOTNET}
|
||||
Id_SO_RCVTIMEO = SO_RCVTIMEO;
|
||||
Id_SO_SNDTIMEO = SO_SNDTIMEO;
|
||||
{$ELSE}
|
||||
Id_SO_RCVTIMEO = SocketOptionName.ReceiveTimeout;
|
||||
Id_SO_SNDTIMEO = SocketOptionName.SendTimeout;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF DOTNET}
|
||||
Id_SO_IP_TTL = IP_TTL;
|
||||
{$ELSE}
|
||||
Id_SO_IP_TTL = SocketOptionName.IpTimeToLive; // Set the IP header time-to-live field.
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF DOTNET}
|
||||
{for some reason, the compiler doesn't accept INADDR_ANY below saying a constant is expected. }
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
Id_INADDR_ANY = 0;// INADDR_ANY;
|
||||
Id_INADDR_NONE = $ffffffff;// INADDR_NONE;
|
||||
{$ELSE}
|
||||
Id_INADDR_ANY = INADDR_ANY;
|
||||
Id_INADDR_NONE = INADDR_NONE;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
// TCP Options
|
||||
{$IFNDEF DOTNET}
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
INVALID_SOCKET = -1;
|
||||
SOCKET_ERROR = -1;
|
||||
{$ENDIF}
|
||||
Id_TCP_NODELAY = TCP_NODELAY;
|
||||
Id_INVALID_SOCKET = INVALID_SOCKET;
|
||||
Id_SOCKET_ERROR = SOCKET_ERROR;
|
||||
Id_SOCKETOPTIONLEVEL_TCP = Id_IPPROTO_TCP; // BGO: rename to Id_SOL_TCP
|
||||
{$IFDEF HAS_TCP_CORK}
|
||||
Id_TCP_CORK = TCP_CORK;
|
||||
{$ENDIF}
|
||||
{$IFDEF HAS_TCP_NOPUSH}
|
||||
Id_TCP_NOPUSH = TCP_NOPUSH;
|
||||
{$ENDIF}
|
||||
{$IFDEF HAS_TCP_KEEPIDLE}
|
||||
Id_TCP_KEEPIDLE = TCP_KEEPIDLE;
|
||||
{$ENDIF}
|
||||
{$IFDEF HAS_TCP_KEEPINTVL}
|
||||
Id_TCP_KEEPINTVL = TCP_KEEPINTVL;
|
||||
{$ENDIF}
|
||||
{$ELSE}
|
||||
Id_TCP_NODELAY = SocketOptionName.NoDelay;
|
||||
Id_INVALID_SOCKET = nil;
|
||||
Id_SOCKET_ERROR = -1;
|
||||
Id_SOCKETOPTIONLEVEL_TCP = SocketOptionLevel.TCP; // BGO: rename to Id_SOL_TCP
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
// Shutdown Options
|
||||
Id_SD_Recv = SHUT_RD;
|
||||
Id_SD_Send = SHUT_WR;
|
||||
Id_SD_Both = SHUT_RDWR;
|
||||
//
|
||||
//Temp defines. They should be in Delphi's Posix.Errno.pas
|
||||
ESOCKTNOSUPPORT = 44; //* Socket type not supported */
|
||||
{$EXTERNALSYM ESOCKTNOSUPPORT}
|
||||
EPFNOSUPPORT = 46; //* Protocol family not supported */
|
||||
{$EXTERNALSYM EPFNOSUPPORT}
|
||||
ESHUTDOWN = 58; //* Can't send after socket shutdown */
|
||||
{$EXTERNALSYM ESHUTDOWN}
|
||||
ETOOMANYREFS = 59; //* Too many references: can't splice */
|
||||
{$EXTERNALSYM ETOOMANYREFS}
|
||||
EHOSTDOWN = 64; //* Host is down */
|
||||
{$EXTERNALSYM EHOSTDOWN}
|
||||
//
|
||||
Id_WSAEINTR = EINTR;
|
||||
Id_WSAEBADF = EBADF;
|
||||
Id_WSAEACCES = EACCES;
|
||||
Id_WSAEFAULT = EFAULT;
|
||||
Id_WSAEINVAL = EINVAL;
|
||||
Id_WSAEMFILE = EMFILE;
|
||||
Id_WSAEWOULDBLOCK = EWOULDBLOCK;
|
||||
Id_WSAEINPROGRESS = EINPROGRESS;
|
||||
Id_WSAEALREADY = EALREADY;
|
||||
Id_WSAENOTSOCK = ENOTSOCK;
|
||||
Id_WSAEDESTADDRREQ = EDESTADDRREQ;
|
||||
Id_WSAEMSGSIZE = EMSGSIZE;
|
||||
Id_WSAEPROTOTYPE = EPROTOTYPE;
|
||||
Id_WSAENOPROTOOPT = ENOPROTOOPT;
|
||||
Id_WSAEPROTONOSUPPORT = EPROTONOSUPPORT;
|
||||
Id_WSAESOCKTNOSUPPORT = ESOCKTNOSUPPORT;
|
||||
Id_WSAEOPNOTSUPP = EOPNOTSUPP;
|
||||
Id_WSAEPFNOSUPPORT = EPFNOSUPPORT;
|
||||
Id_WSAEAFNOSUPPORT = EAFNOSUPPORT;
|
||||
Id_WSAEADDRINUSE = EADDRINUSE;
|
||||
Id_WSAEADDRNOTAVAIL = EADDRNOTAVAIL;
|
||||
Id_WSAENETDOWN = ENETDOWN;
|
||||
Id_WSAENETUNREACH = ENETUNREACH;
|
||||
Id_WSAENETRESET = ENETRESET;
|
||||
Id_WSAECONNABORTED = ECONNABORTED;
|
||||
Id_WSAECONNRESET = ECONNRESET;
|
||||
Id_WSAENOBUFS = ENOBUFS;
|
||||
Id_WSAEISCONN = EISCONN;
|
||||
Id_WSAENOTCONN = ENOTCONN;
|
||||
Id_WSAESHUTDOWN = ESHUTDOWN;
|
||||
Id_WSAETOOMANYREFS = ETOOMANYREFS;
|
||||
Id_WSAETIMEDOUT = ETIMEDOUT;
|
||||
Id_WSAECONNREFUSED = ECONNREFUSED;
|
||||
Id_WSAELOOP = ELOOP;
|
||||
Id_WSAENAMETOOLONG = ENAMETOOLONG;
|
||||
Id_WSAEHOSTDOWN = EHOSTDOWN;
|
||||
Id_WSAEHOSTUNREACH = EHOSTUNREACH;
|
||||
Id_WSAENOTEMPTY = ENOTEMPTY;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF KYLIXCOMPAT}
|
||||
// Shutdown Options
|
||||
Id_SD_Recv = SHUT_RD;
|
||||
Id_SD_Send = SHUT_WR;
|
||||
Id_SD_Both = SHUT_RDWR;
|
||||
//
|
||||
Id_WSAEINTR = EINTR;
|
||||
Id_WSAEBADF = EBADF;
|
||||
Id_WSAEACCES = EACCES;
|
||||
Id_WSAEFAULT = EFAULT;
|
||||
Id_WSAEINVAL = EINVAL;
|
||||
Id_WSAEMFILE = EMFILE;
|
||||
Id_WSAEWOULDBLOCK = EWOULDBLOCK;
|
||||
Id_WSAEINPROGRESS = EINPROGRESS;
|
||||
Id_WSAEALREADY = EALREADY;
|
||||
Id_WSAENOTSOCK = ENOTSOCK;
|
||||
Id_WSAEDESTADDRREQ = EDESTADDRREQ;
|
||||
Id_WSAEMSGSIZE = EMSGSIZE;
|
||||
Id_WSAEPROTOTYPE = EPROTOTYPE;
|
||||
Id_WSAENOPROTOOPT = ENOPROTOOPT;
|
||||
Id_WSAEPROTONOSUPPORT = EPROTONOSUPPORT;
|
||||
Id_WSAESOCKTNOSUPPORT = ESOCKTNOSUPPORT;
|
||||
Id_WSAEOPNOTSUPP = EOPNOTSUPP;
|
||||
Id_WSAEPFNOSUPPORT = EPFNOSUPPORT;
|
||||
Id_WSAEAFNOSUPPORT = EAFNOSUPPORT;
|
||||
Id_WSAEADDRINUSE = EADDRINUSE;
|
||||
Id_WSAEADDRNOTAVAIL = EADDRNOTAVAIL;
|
||||
Id_WSAENETDOWN = ENETDOWN;
|
||||
Id_WSAENETUNREACH = ENETUNREACH;
|
||||
Id_WSAENETRESET = ENETRESET;
|
||||
Id_WSAECONNABORTED = ECONNABORTED;
|
||||
Id_WSAECONNRESET = ECONNRESET;
|
||||
Id_WSAENOBUFS = ENOBUFS;
|
||||
Id_WSAEISCONN = EISCONN;
|
||||
Id_WSAENOTCONN = ENOTCONN;
|
||||
Id_WSAESHUTDOWN = ESHUTDOWN;
|
||||
Id_WSAETOOMANYREFS = ETOOMANYREFS;
|
||||
Id_WSAETIMEDOUT = ETIMEDOUT;
|
||||
Id_WSAECONNREFUSED = ECONNREFUSED;
|
||||
Id_WSAELOOP = ELOOP;
|
||||
Id_WSAENAMETOOLONG = ENAMETOOLONG;
|
||||
Id_WSAEHOSTDOWN = EHOSTDOWN;
|
||||
Id_WSAEHOSTUNREACH = EHOSTUNREACH;
|
||||
Id_WSAENOTEMPTY = ENOTEMPTY;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF USE_BASEUNIX}
|
||||
// Shutdown Options
|
||||
Id_SD_Recv = SHUT_RD;
|
||||
Id_SD_Send = SHUT_WR;
|
||||
Id_SD_Both = SHUT_RDWR;
|
||||
{$IFDEF BEOS}
|
||||
{work around incomplete definitions in BeOS FPC compiler.}
|
||||
EDESTADDRREQ = (B_POSIX_ERROR_BASE + 48);
|
||||
{$EXTERNALSYM EDESTADDRREQ}
|
||||
EHOSTDOWN = (B_POSIX_ERROR_BASE + 45);
|
||||
{$EXTERNALSYM EHOSTDOWN}
|
||||
ESysENOTSOCK = ENOTSOCK;
|
||||
ESysEDESTADDRREQ = EDESTADDRREQ;
|
||||
ESysEMSGSIZE = EMSGSIZE;
|
||||
ESysEOPNOTSUPP = EOPNOTSUPP;
|
||||
ESysEHOSTDOWN = EHOSTDOWN;
|
||||
{$ENDIF}
|
||||
//
|
||||
Id_WSAEINTR = ESysEINTR;
|
||||
Id_WSAEBADF = ESysEBADF;
|
||||
Id_WSAEACCES = ESysEACCES;
|
||||
Id_WSAEFAULT = ESysEFAULT;
|
||||
Id_WSAEINVAL = ESysEINVAL;
|
||||
Id_WSAEMFILE = ESysEMFILE;
|
||||
Id_WSAEWOULDBLOCK = ESysEWOULDBLOCK;
|
||||
Id_WSAEINPROGRESS = ESysEINPROGRESS;
|
||||
Id_WSAEALREADY = ESysEALREADY;
|
||||
Id_WSAENOTSOCK = ESysENOTSOCK;
|
||||
Id_WSAEDESTADDRREQ = ESysEDESTADDRREQ;
|
||||
Id_WSAEMSGSIZE = ESysEMSGSIZE;
|
||||
Id_WSAEPROTOTYPE = ESysEPROTOTYPE;
|
||||
Id_WSAENOPROTOOPT = ESysENOPROTOOPT;
|
||||
Id_WSAEPROTONOSUPPORT = ESysEPROTONOSUPPORT;
|
||||
{$IFNDEF BEOS}
|
||||
Id_WSAESOCKTNOSUPPORT = ESysESOCKTNOSUPPORT;
|
||||
{$ENDIF}
|
||||
Id_WSAEOPNOTSUPP = ESysEOPNOTSUPP;
|
||||
Id_WSAEPFNOSUPPORT = ESysEPFNOSUPPORT;
|
||||
Id_WSAEAFNOSUPPORT = ESysEAFNOSUPPORT;
|
||||
Id_WSAEADDRINUSE = ESysEADDRINUSE;
|
||||
Id_WSAEADDRNOTAVAIL = ESysEADDRNOTAVAIL;
|
||||
Id_WSAENETDOWN = ESysENETDOWN;
|
||||
Id_WSAENETUNREACH = ESysENETUNREACH;
|
||||
Id_WSAENETRESET = ESysENETRESET;
|
||||
Id_WSAECONNABORTED = ESysECONNABORTED;
|
||||
Id_WSAECONNRESET = ESysECONNRESET;
|
||||
Id_WSAENOBUFS = ESysENOBUFS;
|
||||
Id_WSAEISCONN = ESysEISCONN;
|
||||
Id_WSAENOTCONN = ESysENOTCONN;
|
||||
Id_WSAESHUTDOWN = ESysESHUTDOWN;
|
||||
{$IFNDEF BEOS}
|
||||
Id_WSAETOOMANYREFS = ESysETOOMANYREFS;
|
||||
{$ENDIF}
|
||||
Id_WSAETIMEDOUT = ESysETIMEDOUT;
|
||||
Id_WSAECONNREFUSED = ESysECONNREFUSED;
|
||||
Id_WSAELOOP = ESysELOOP;
|
||||
Id_WSAENAMETOOLONG = ESysENAMETOOLONG;
|
||||
Id_WSAEHOSTDOWN = ESysEHOSTDOWN;
|
||||
Id_WSAEHOSTUNREACH = ESysEHOSTUNREACH;
|
||||
Id_WSAENOTEMPTY = ESysENOTEMPTY;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
// Shutdown Options
|
||||
Id_SD_Recv = 0;
|
||||
Id_SD_Send = 1;
|
||||
Id_SD_Both = 2;
|
||||
//
|
||||
Id_WSAEINTR = WSAEINTR;
|
||||
Id_WSAEBADF = WSAEBADF;
|
||||
Id_WSAEACCES = WSAEACCES;
|
||||
Id_WSAEFAULT = WSAEFAULT;
|
||||
Id_WSAEINVAL = WSAEINVAL;
|
||||
Id_WSAEMFILE = WSAEMFILE;
|
||||
Id_WSAEWOULDBLOCK = WSAEWOULDBLOCK;
|
||||
Id_WSAEINPROGRESS = WSAEINPROGRESS;
|
||||
Id_WSAEALREADY = WSAEALREADY;
|
||||
Id_WSAENOTSOCK = WSAENOTSOCK;
|
||||
Id_WSAEDESTADDRREQ = WSAEDESTADDRREQ;
|
||||
Id_WSAEMSGSIZE = WSAEMSGSIZE;
|
||||
Id_WSAEPROTOTYPE = WSAEPROTOTYPE;
|
||||
Id_WSAENOPROTOOPT = WSAENOPROTOOPT;
|
||||
Id_WSAEPROTONOSUPPORT = WSAEPROTONOSUPPORT;
|
||||
Id_WSAESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT;
|
||||
Id_WSAEOPNOTSUPP = WSAEOPNOTSUPP;
|
||||
Id_WSAEPFNOSUPPORT = WSAEPFNOSUPPORT;
|
||||
Id_WSAEAFNOSUPPORT = WSAEAFNOSUPPORT;
|
||||
Id_WSAEADDRINUSE = WSAEADDRINUSE;
|
||||
Id_WSAEADDRNOTAVAIL = WSAEADDRNOTAVAIL;
|
||||
Id_WSAENETDOWN = WSAENETDOWN;
|
||||
Id_WSAENETUNREACH = WSAENETUNREACH;
|
||||
Id_WSAENETRESET = WSAENETRESET;
|
||||
Id_WSAECONNABORTED = WSAECONNABORTED;
|
||||
Id_WSAECONNRESET = WSAECONNRESET;
|
||||
Id_WSAENOBUFS = WSAENOBUFS;
|
||||
Id_WSAEISCONN = WSAEISCONN;
|
||||
Id_WSAENOTCONN = WSAENOTCONN;
|
||||
Id_WSAESHUTDOWN = WSAESHUTDOWN;
|
||||
Id_WSAETOOMANYREFS = WSAETOOMANYREFS;
|
||||
Id_WSAETIMEDOUT = WSAETIMEDOUT;
|
||||
Id_WSAECONNREFUSED = WSAECONNREFUSED;
|
||||
Id_WSAELOOP = WSAELOOP;
|
||||
Id_WSAENAMETOOLONG = WSAENAMETOOLONG;
|
||||
Id_WSAEHOSTDOWN = WSAEHOSTDOWN;
|
||||
Id_WSAEHOSTUNREACH = WSAEHOSTUNREACH;
|
||||
Id_WSAENOTEMPTY = WSAENOTEMPTY;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF DOTNET}
|
||||
//In DotNET, the constants are the same as in Winsock2.
|
||||
|
||||
//Ripped from IdWinsock2 - don't use that in DotNET.
|
||||
|
||||
WSABASEERR = 10000;
|
||||
|
||||
// Windows Sockets definitions of regular Microsoft C error constants
|
||||
WSAEINTR = WSABASEERR + 4;
|
||||
WSAEBADF = WSABASEERR + 9;
|
||||
WSAEACCES = WSABASEERR + 13;
|
||||
WSAEFAULT = WSABASEERR + 14;
|
||||
WSAEINVAL = WSABASEERR + 22;
|
||||
WSAEMFILE = WSABASEERR + 24;
|
||||
|
||||
// Windows Sockets definitions of regular Berkeley error constants
|
||||
WSAEWOULDBLOCK = WSABASEERR + 35;
|
||||
WSAEINPROGRESS = WSABASEERR + 36;
|
||||
WSAEALREADY = WSABASEERR + 37;
|
||||
WSAENOTSOCK = WSABASEERR + 38;
|
||||
WSAEDESTADDRREQ = WSABASEERR + 39;
|
||||
WSAEMSGSIZE = WSABASEERR + 40;
|
||||
WSAEPROTOTYPE = WSABASEERR + 41;
|
||||
WSAENOPROTOOPT = WSABASEERR + 42;
|
||||
WSAEPROTONOSUPPORT = WSABASEERR + 43;
|
||||
WSAESOCKTNOSUPPORT = WSABASEERR + 44;
|
||||
WSAEOPNOTSUPP = WSABASEERR + 45;
|
||||
WSAEPFNOSUPPORT = WSABASEERR + 46;
|
||||
WSAEAFNOSUPPORT = WSABASEERR + 47;
|
||||
WSAEADDRINUSE = WSABASEERR + 48;
|
||||
WSAEADDRNOTAVAIL = WSABASEERR + 49;
|
||||
WSAENETDOWN = WSABASEERR + 50;
|
||||
WSAENETUNREACH = WSABASEERR + 51;
|
||||
WSAENETRESET = WSABASEERR + 52;
|
||||
WSAECONNABORTED = WSABASEERR + 53;
|
||||
WSAECONNRESET = WSABASEERR + 54;
|
||||
WSAENOBUFS = WSABASEERR + 55;
|
||||
WSAEISCONN = WSABASEERR + 56;
|
||||
WSAENOTCONN = WSABASEERR + 57;
|
||||
WSAESHUTDOWN = WSABASEERR + 58;
|
||||
WSAETOOMANYREFS = WSABASEERR + 59;
|
||||
WSAETIMEDOUT = WSABASEERR + 60;
|
||||
WSAECONNREFUSED = WSABASEERR + 61;
|
||||
WSAELOOP = WSABASEERR + 62;
|
||||
WSAENAMETOOLONG = WSABASEERR + 63;
|
||||
WSAEHOSTDOWN = WSABASEERR + 64;
|
||||
WSAEHOSTUNREACH = WSABASEERR + 65;
|
||||
WSAENOTEMPTY = WSABASEERR + 66;
|
||||
WSAEPROCLIM = WSABASEERR + 67;
|
||||
WSAEUSERS = WSABASEERR + 68;
|
||||
WSAEDQUOT = WSABASEERR + 69;
|
||||
WSAESTALE = WSABASEERR + 70;
|
||||
WSAEREMOTE = WSABASEERR + 71;
|
||||
|
||||
// Extended Windows Sockets error constant definitions
|
||||
WSASYSNOTREADY = WSABASEERR + 91;
|
||||
WSAVERNOTSUPPORTED = WSABASEERR + 92;
|
||||
WSANOTINITIALIZED = WSABASEERR + 93;
|
||||
WSAEDISCON = WSABASEERR + 101;
|
||||
WSAENOMORE = WSABASEERR + 102;
|
||||
WSAECANCELLED = WSABASEERR + 103;
|
||||
WSAEINVALIDPROCTABLE = WSABASEERR + 104;
|
||||
WSAEINVALIDPROVIDER = WSABASEERR + 105;
|
||||
WSAEPROVIDERFAILEDINIT = WSABASEERR + 106;
|
||||
WSASYSCALLFAILURE = WSABASEERR + 107;
|
||||
WSASERVICE_NOT_FOUND = WSABASEERR + 108;
|
||||
WSATYPE_NOT_FOUND = WSABASEERR + 109;
|
||||
WSA_E_NO_MORE = WSABASEERR + 110;
|
||||
WSA_E_CANCELLED = WSABASEERR + 111;
|
||||
WSAEREFUSED = WSABASEERR + 112;
|
||||
|
||||
{ Error return codes from gethostbyname() and gethostbyaddr()
|
||||
when using the resolver. Note that these errors are retrieved
|
||||
via WSAGetLastError() and must therefore follow the rules for
|
||||
avoiding clashes with error numbers from specific implementations
|
||||
or language run-time systems. For this reason the codes are based
|
||||
at WSABASEERR+1001. Note also that [WSA]NO_ADDRESS is defined
|
||||
only for compatibility purposes. }
|
||||
|
||||
// Authoritative Answer: Host not found
|
||||
WSAHOST_NOT_FOUND = WSABASEERR + 1001;
|
||||
HOST_NOT_FOUND = WSAHOST_NOT_FOUND;
|
||||
|
||||
// Non-Authoritative: Host not found, or SERVERFAIL
|
||||
WSATRY_AGAIN = WSABASEERR + 1002;
|
||||
TRY_AGAIN = WSATRY_AGAIN;
|
||||
|
||||
// Non recoverable errors, FORMERR, REFUSED, NOTIMP
|
||||
WSANO_RECOVERY = WSABASEERR + 1003;
|
||||
NO_RECOVERY = WSANO_RECOVERY;
|
||||
|
||||
// Valid name, no data record of requested type
|
||||
WSANO_DATA = WSABASEERR + 1004;
|
||||
NO_DATA = WSANO_DATA;
|
||||
|
||||
// no address, look for MX record
|
||||
WSANO_ADDRESS = WSANO_DATA;
|
||||
NO_ADDRESS = WSANO_ADDRESS;
|
||||
|
||||
// Define QOS related error return codes
|
||||
WSA_QOS_RECEIVERS = WSABASEERR + 1005; // at least one reserve has arrived
|
||||
WSA_QOS_SENDERS = WSABASEERR + 1006; // at least one path has arrived
|
||||
WSA_QOS_NO_SENDERS = WSABASEERR + 1007; // there are no senders
|
||||
WSA_QOS_NO_RECEIVERS = WSABASEERR + 1008; // there are no receivers
|
||||
WSA_QOS_REQUEST_CONFIRMED = WSABASEERR + 1009; // reserve has been confirmed
|
||||
WSA_QOS_ADMISSION_FAILURE = WSABASEERR + 1010; // error due to lack of resources
|
||||
WSA_QOS_POLICY_FAILURE = WSABASEERR + 1011; // rejected for administrative reasons - bad credentials
|
||||
WSA_QOS_BAD_STYLE = WSABASEERR + 1012; // unknown or conflicting style
|
||||
WSA_QOS_BAD_OBJECT = WSABASEERR + 1013; // problem with some part of the filterspec or providerspecific buffer in general
|
||||
WSA_QOS_TRAFFIC_CTRL_ERROR = WSABASEERR + 1014; // problem with some part of the flowspec
|
||||
WSA_QOS_GENERIC_ERROR = WSABASEERR + 1015; // general error
|
||||
WSA_QOS_ESERVICETYPE = WSABASEERR + 1016; // invalid service type in flowspec
|
||||
WSA_QOS_EFLOWSPEC = WSABASEERR + 1017; // invalid flowspec
|
||||
WSA_QOS_EPROVSPECBUF = WSABASEERR + 1018; // invalid provider specific buffer
|
||||
WSA_QOS_EFILTERSTYLE = WSABASEERR + 1019; // invalid filter style
|
||||
WSA_QOS_EFILTERTYPE = WSABASEERR + 1020; // invalid filter type
|
||||
WSA_QOS_EFILTERCOUNT = WSABASEERR + 1021; // incorrect number of filters
|
||||
WSA_QOS_EOBJLENGTH = WSABASEERR + 1022; // invalid object length
|
||||
WSA_QOS_EFLOWCOUNT = WSABASEERR + 1023; // incorrect number of flows
|
||||
WSA_QOS_EUNKNOWNSOBJ = WSABASEERR + 1024; // unknown object in provider specific buffer
|
||||
WSA_QOS_EPOLICYOBJ = WSABASEERR + 1025; // invalid policy object in provider specific buffer
|
||||
WSA_QOS_EFLOWDESC = WSABASEERR + 1026; // invalid flow descriptor in the list
|
||||
WSA_QOS_EPSFLOWSPEC = WSABASEERR + 1027; // inconsistent flow spec in provider specific buffer
|
||||
WSA_QOS_EPSFILTERSPEC = WSABASEERR + 1028; // invalid filter spec in provider specific buffer
|
||||
WSA_QOS_ESDMODEOBJ = WSABASEERR + 1029; // invalid shape discard mode object in provider specific buffer
|
||||
WSA_QOS_ESHAPERATEOBJ = WSABASEERR + 1030; // invalid shaping rate object in provider specific buffer
|
||||
WSA_QOS_RESERVED_PETYPE = WSABASEERR + 1031; // reserved policy element in provider specific buffer
|
||||
|
||||
{This section defines error constants used in Winsock 2 indirectly. These
|
||||
are from Borland's header.}
|
||||
{ The handle is invalid. }
|
||||
ERROR_INVALID_HANDLE = 6;
|
||||
|
||||
{ Not enough storage is available to process this command. }
|
||||
ERROR_NOT_ENOUGH_MEMORY = 8; { dderror }
|
||||
|
||||
{ The parameter is incorrect. }
|
||||
ERROR_INVALID_PARAMETER = 87; { dderror }
|
||||
|
||||
{ The I/O operation has been aborted because of either a thread exit }
|
||||
{ or an application request. }
|
||||
ERROR_OPERATION_ABORTED = 995;
|
||||
|
||||
{ Overlapped I/O event is not in a signalled state. }
|
||||
ERROR_IO_INCOMPLETE = 996;
|
||||
|
||||
{ Overlapped I/O operation is in progress. }
|
||||
ERROR_IO_PENDING = 997; { dderror }
|
||||
|
||||
{ WinSock 2 extension -- new error codes and type definition }
|
||||
WSA_IO_PENDING = ERROR_IO_PENDING;
|
||||
WSA_IO_INCOMPLETE = ERROR_IO_INCOMPLETE;
|
||||
WSA_INVALID_HANDLE = ERROR_INVALID_HANDLE;
|
||||
WSA_INVALID_PARAMETER = ERROR_INVALID_PARAMETER;
|
||||
WSA_NOT_ENOUGH_MEMORY = ERROR_NOT_ENOUGH_MEMORY;
|
||||
WSA_OPERATION_ABORTED = ERROR_OPERATION_ABORTED;
|
||||
|
||||
//TODO: Map these to .net constants. Unfortunately .net does not seem to
|
||||
//define these anywhere.
|
||||
|
||||
Id_WSAEINTR = WSAEINTR;
|
||||
Id_WSAEBADF = WSAEBADF;
|
||||
Id_WSAEACCES = WSAEACCES;
|
||||
Id_WSAEFAULT = WSAEFAULT;
|
||||
Id_WSAEINVAL = WSAEINVAL;
|
||||
Id_WSAEMFILE = WSAEMFILE;
|
||||
Id_WSAEWOULDBLOCK = WSAEWOULDBLOCK;
|
||||
Id_WSAEINPROGRESS = WSAEINPROGRESS;
|
||||
Id_WSAEALREADY = WSAEALREADY;
|
||||
Id_WSAENOTSOCK = WSAENOTSOCK;
|
||||
Id_WSAEDESTADDRREQ = WSAEDESTADDRREQ;
|
||||
Id_WSAEMSGSIZE = WSAEMSGSIZE;
|
||||
Id_WSAEPROTOTYPE = WSAEPROTOTYPE;
|
||||
Id_WSAENOPROTOOPT = WSAENOPROTOOPT;
|
||||
Id_WSAEPROTONOSUPPORT = WSAEPROTONOSUPPORT;
|
||||
Id_WSAESOCKTNOSUPPORT = WSAESOCKTNOSUPPORT;
|
||||
Id_WSAEOPNOTSUPP = WSAEOPNOTSUPP;
|
||||
Id_WSAEPFNOSUPPORT = WSAEPFNOSUPPORT;
|
||||
Id_WSAEAFNOSUPPORT = WSAEAFNOSUPPORT;
|
||||
Id_WSAEADDRINUSE = WSAEADDRINUSE;
|
||||
Id_WSAEADDRNOTAVAIL = WSAEADDRNOTAVAIL;
|
||||
Id_WSAENETDOWN = WSAENETDOWN;
|
||||
Id_WSAENETUNREACH = WSAENETUNREACH;
|
||||
Id_WSAENETRESET = WSAENETRESET;
|
||||
Id_WSAECONNABORTED = WSAECONNABORTED;
|
||||
Id_WSAECONNRESET = WSAECONNRESET;
|
||||
Id_WSAENOBUFS = WSAENOBUFS;
|
||||
Id_WSAEISCONN = WSAEISCONN;
|
||||
Id_WSAENOTCONN = WSAENOTCONN;
|
||||
Id_WSAESHUTDOWN = WSAESHUTDOWN;
|
||||
Id_WSAETOOMANYREFS = WSAETOOMANYREFS;
|
||||
Id_WSAETIMEDOUT = WSAETIMEDOUT;
|
||||
Id_WSAECONNREFUSED = WSAECONNREFUSED;
|
||||
Id_WSAELOOP = WSAELOOP;
|
||||
Id_WSAENAMETOOLONG = WSAENAMETOOLONG;
|
||||
Id_WSAEHOSTDOWN = WSAEHOSTDOWN;
|
||||
Id_WSAEHOSTUNREACH = WSAEHOSTUNREACH;
|
||||
Id_WSAENOTEMPTY = WSAENOTEMPTY;
|
||||
|
||||
Id_SD_Recv = SocketShutdown.Receive;
|
||||
Id_SD_Send = SocketShutdown.Send;
|
||||
Id_SD_Both = SocketShutdown.Both;
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
{$IFDEF USE_VCL_POSIX}
|
||||
{$I IdSymbolPlatformOn.inc}
|
||||
{$ENDIF}
|
||||
end.
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,42 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
|
||||
unit IdStream;
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
{$IFDEF DOTNET}
|
||||
IdStreamNET
|
||||
{$ELSE}
|
||||
IdStreamVCL
|
||||
{$ENDIF};
|
||||
|
||||
type
|
||||
{$IFDEF DOTNET}
|
||||
TIdStreamHelper = TIdStreamHelperNET;
|
||||
{$ELSE}
|
||||
TIdStreamHelper = TIdStreamHelperVCL;
|
||||
{$ENDIF}
|
||||
|
||||
implementation
|
||||
|
||||
end.
|
||||
|
||||
@@ -0,0 +1,110 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
|
||||
unit IdStreamNET;
|
||||
|
||||
interface
|
||||
|
||||
uses
|
||||
Classes,
|
||||
IdGlobal;
|
||||
|
||||
type
|
||||
TIdStreamHelperNET = class
|
||||
public
|
||||
class function ReadBytes(
|
||||
AStream: TStream;
|
||||
var VBytes: TIdBytes;
|
||||
ACount: Integer = -1;
|
||||
AOffset: Integer = 0): Integer; static;
|
||||
class function Write(
|
||||
const AStream: TStream;
|
||||
const ABytes: TIdBytes;
|
||||
const ACount: Integer = -1;
|
||||
const AOffset: Integer = 0): Integer; static;
|
||||
class function Seek(
|
||||
const AStream: TStream;
|
||||
const AOffset: TIdStreamSize;
|
||||
const AOrigin: TSeekOrigin) : TIdStreamSize; static;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
// RLebeau: must use a 'var' and not an 'out' for the VBytes parameter,
|
||||
// or else any preallocated buffer the caller passes in will get wiped out!
|
||||
|
||||
class function TIdStreamHelperNET.ReadBytes(AStream: TStream; var VBytes: TIdBytes;
|
||||
ACount, AOffset: Integer): Integer;
|
||||
var
|
||||
LActual: Integer;
|
||||
begin
|
||||
Assert(AStream<>nil);
|
||||
Result := 0;
|
||||
|
||||
if VBytes = nil then begin
|
||||
SetLength(VBytes, 0);
|
||||
end;
|
||||
//check that offset<length(buffer)? offset+count?
|
||||
//is there a need for this to be called with an offset into a nil buffer?
|
||||
|
||||
LActual := ACount;
|
||||
if LActual < 0 then begin
|
||||
LActual := AStream.Size - AStream.Position;
|
||||
end;
|
||||
|
||||
//this prevents eg reading 0 bytes at Offset=10 from allocating memory
|
||||
if LActual = 0 then begin
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Length(VBytes) < (AOffset+LActual) then begin
|
||||
SetLength(VBytes, AOffset+LActual);
|
||||
end;
|
||||
|
||||
Assert(VBytes<>nil);
|
||||
Result := AStream.Read(VBytes, AOffset, LActual);
|
||||
end;
|
||||
|
||||
class function TIdStreamHelperNET.Write(const AStream: TStream;
|
||||
const ABytes: TIdBytes; const ACount: Integer; const AOffset: Integer): Integer;
|
||||
var
|
||||
LActual: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
Assert(AStream<>nil);
|
||||
//should we raise assert instead of this nil check?
|
||||
if ABytes <> nil then
|
||||
begin
|
||||
LActual := IndyLength(ABytes, ACount, AOffset);
|
||||
if LActual > 0 then
|
||||
begin
|
||||
// RLebeau: Write raises an exception if the buffer can't be written in full
|
||||
AStream.Write(ABytes, AOffset, LActual);
|
||||
Result := LActual;
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TIdStreamHelperNET.Seek(const AStream: TStream; const AOffset: TIdStreamSize;
|
||||
const AOrigin: TSeekOrigin): TIdStreamSize;
|
||||
begin
|
||||
Result := AStream.Seek(AOffset, AOrigin);
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
|
||||
unit IdStreamVCL;
|
||||
|
||||
interface
|
||||
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
Classes,
|
||||
IdGlobal;
|
||||
|
||||
type
|
||||
TIdStreamHelperVCL = class
|
||||
public
|
||||
class function ReadBytes(
|
||||
const AStream: TStream;
|
||||
var VBytes: TIdBytes;
|
||||
const ACount: Integer = -1;
|
||||
const AOffset: Integer = 0) : Integer; {$IFDEF DOTNET} static; {$ENDIF}
|
||||
class function Write(
|
||||
const AStream: TStream;
|
||||
const ABytes: TIdBytes;
|
||||
const ACount: Integer = -1;
|
||||
const AOffset: Integer = 0) : Integer; {$IFDEF DOTNET} static; {$ENDIF}
|
||||
class function Seek(
|
||||
const AStream: TStream;
|
||||
const AOffset: TIdStreamSize;
|
||||
const AOrigin: TSeekOrigin) : TIdStreamSize; {$IFDEF DOTNET} static; {$ENDIF}
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
// RLebeau: must use a 'var' and not an 'out' for the VBytes parameter,
|
||||
// or else any preallocated buffer the caller passes in will get wiped out!
|
||||
|
||||
class function TIdStreamHelperVCL.ReadBytes(const AStream: TStream; var VBytes: TIdBytes;
|
||||
const ACount, AOffset: Integer): Integer;
|
||||
var
|
||||
LActual: Integer;
|
||||
begin
|
||||
Assert(AStream<>nil);
|
||||
Result := 0;
|
||||
|
||||
if VBytes = nil then begin
|
||||
SetLength(VBytes, 0);
|
||||
end;
|
||||
//check that offset<length(buffer)? offset+count?
|
||||
//is there a need for this to be called with an offset into a nil buffer?
|
||||
|
||||
LActual := ACount;
|
||||
if LActual < 0 then begin
|
||||
LActual := AStream.Size - AStream.Position;
|
||||
end;
|
||||
|
||||
//this prevents eg reading 0 bytes at Offset=10 from allocating memory
|
||||
if LActual = 0 then begin
|
||||
Exit;
|
||||
end;
|
||||
|
||||
if Length(VBytes) < (AOffset+LActual) then begin
|
||||
SetLength(VBytes, AOffset+LActual);
|
||||
end;
|
||||
|
||||
Assert(VBytes<>nil);
|
||||
Result := AStream.Read(VBytes[AOffset], LActual);
|
||||
end;
|
||||
|
||||
class function TIdStreamHelperVCL.Write(const AStream: TStream; const ABytes: TIdBytes;
|
||||
const ACount: Integer; const AOffset: Integer): Integer;
|
||||
var
|
||||
LActual: Integer;
|
||||
begin
|
||||
Result := 0;
|
||||
Assert(AStream<>nil);
|
||||
//should we raise assert instead of this nil check?
|
||||
if ABytes <> nil then begin
|
||||
LActual := IndyLength(ABytes, ACount, AOffset);
|
||||
// TODO: loop the writing, or use WriteBuffer(), to mimic .NET where
|
||||
// System.IO.Stream.Write() writes all provided bytes in a single operation
|
||||
if LActual > 0 then begin
|
||||
Result := AStream.Write(ABytes[AOffset], LActual);
|
||||
end;
|
||||
end;
|
||||
end;
|
||||
|
||||
class function TIdStreamHelperVCL.Seek(const AStream: TStream; const AOffset: TIdStreamSize;
|
||||
const AOrigin: TSeekOrigin): TIdStreamSize;
|
||||
{$IFNDEF STREAM_SIZE_64}
|
||||
const
|
||||
cOrigins: array[TSeekOrigin] of Word = (soFromBeginning, soFromCurrent, soFromEnd);
|
||||
{$ENDIF}
|
||||
begin
|
||||
{$IFDEF STREAM_SIZE_64}
|
||||
Result := AStream.Seek(AOffset, AOrigin);
|
||||
{$ELSE}
|
||||
Result := AStream.Seek(AOffset, cOrigins[AOrigin]);
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
end.
|
||||
|
||||
@@ -0,0 +1,221 @@
|
||||
{
|
||||
$Project$
|
||||
$Workfile$
|
||||
$Revision$
|
||||
$DateUTC$
|
||||
$Id$
|
||||
|
||||
This file is part of the Indy (Internet Direct) project, and is offered
|
||||
under the dual-licensing agreement described on the Indy website.
|
||||
(http://www.indyproject.org/)
|
||||
|
||||
Copyright:
|
||||
(c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
|
||||
}
|
||||
{
|
||||
$Log$
|
||||
}
|
||||
|
||||
unit IdStruct;
|
||||
|
||||
interface
|
||||
|
||||
{$i IdCompilerDefines.inc}
|
||||
|
||||
uses
|
||||
IdGlobal;
|
||||
|
||||
type
|
||||
TIdStruct = class(TObject)
|
||||
protected
|
||||
function GetBytesLen: UInt32; virtual;
|
||||
public
|
||||
constructor Create; virtual;
|
||||
//done this way in case we also need to advance an index pointer
|
||||
//after a read or write
|
||||
procedure ReadStruct(const ABytes : TIdBytes; var VIndex : UInt32); virtual;
|
||||
procedure WriteStruct(var VBytes : TIdBytes; var VIndex : UInt32); virtual;
|
||||
property BytesLen: UInt32 read GetBytesLen;
|
||||
end;
|
||||
|
||||
TIdUnion = class(TIdStruct)
|
||||
protected
|
||||
FBuffer: TIdBytes;
|
||||
function GetBytesLen: UInt32; override;
|
||||
procedure SetBytesLen(const ABytesLen: UInt32);
|
||||
public
|
||||
procedure ReadStruct(const ABytes : TIdBytes; var VIndex : UInt32); override;
|
||||
procedure WriteStruct(var VBytes : TIdBytes; var VIndex : UInt32); override;
|
||||
end;
|
||||
|
||||
// TODO: rename to TIdUInt32
|
||||
TIdLongWord = class(TIdUnion)
|
||||
protected
|
||||
function Get_l: UInt32;
|
||||
function Gets_b1: UInt8;
|
||||
function Gets_b2: UInt8;
|
||||
function Gets_b3: UInt8;
|
||||
function Gets_b4: UInt8;
|
||||
function Gets_w1: UInt16;
|
||||
function Gets_w2: UInt16;
|
||||
procedure Set_l(const Value: UInt32);
|
||||
procedure Sets_b1(const Value: UInt8);
|
||||
procedure Sets_b2(const Value: UInt8);
|
||||
procedure Sets_b3(const Value: UInt8);
|
||||
procedure Sets_b4(const Value: UInt8);
|
||||
procedure SetS_w1(const Value: UInt16);
|
||||
procedure SetS_w2(const Value: UInt16);
|
||||
public
|
||||
constructor Create; override;
|
||||
property s_b1 : UInt8 read Gets_b1 write Sets_b1;
|
||||
property s_b2 : UInt8 read Gets_b2 write Sets_b2;
|
||||
property s_b3 : UInt8 read Gets_b3 write Sets_b3;
|
||||
property s_b4 : UInt8 read Gets_b4 write Sets_b4;
|
||||
property s_w1 : UInt16 read Gets_w1 write SetS_w1;
|
||||
property s_w2 : UInt16 read Gets_w2 write SetS_w2;
|
||||
property s_l : UInt32 read Get_l write Set_l;
|
||||
end;
|
||||
|
||||
implementation
|
||||
|
||||
// This is here to facilitate inlining
|
||||
|
||||
{$IFDEF WINDOWS}
|
||||
{$IFDEF USE_INLINE}
|
||||
uses
|
||||
Windows;
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{ TIdStruct }
|
||||
|
||||
constructor TIdStruct.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
end;
|
||||
|
||||
function TIdStruct.GetBytesLen: UInt32;
|
||||
begin
|
||||
Result := 0;
|
||||
end;
|
||||
|
||||
procedure TIdStruct.ReadStruct(const ABytes: TIdBytes; var VIndex: UInt32);
|
||||
begin
|
||||
Assert(UInt32(Length(ABytes)) >= VIndex + BytesLen, 'not enough bytes'); {do not localize}
|
||||
end;
|
||||
|
||||
procedure TIdStruct.WriteStruct(var VBytes: TIdBytes; var VIndex: UInt32);
|
||||
var
|
||||
Len: UInt32;
|
||||
begin
|
||||
Len := VIndex + BytesLen;
|
||||
if UInt32(Length(VBytes)) < Len then begin
|
||||
SetLength(VBytes, Len);
|
||||
end;
|
||||
end;
|
||||
|
||||
{ TIdUnion }
|
||||
|
||||
function TIdUnion.GetBytesLen : UInt32;
|
||||
begin
|
||||
Result := UInt32(Length(FBuffer));
|
||||
end;
|
||||
|
||||
procedure TIdUnion.SetBytesLen(const ABytesLen: UInt32);
|
||||
begin
|
||||
SetLength(FBuffer, ABytesLen);
|
||||
end;
|
||||
|
||||
procedure TIdUnion.ReadStruct(const ABytes: TIdBytes; var VIndex: UInt32);
|
||||
begin
|
||||
inherited ReadStruct(ABytes, VIndex);
|
||||
CopyTIdBytes(ABytes, VIndex, FBuffer, 0, Length(FBuffer));
|
||||
Inc(VIndex, Length(FBuffer));
|
||||
end;
|
||||
|
||||
procedure TIdUnion.WriteStruct(var VBytes: TIdBytes; var VIndex: UInt32);
|
||||
begin
|
||||
inherited WriteStruct(VBytes, VIndex);
|
||||
CopyTIdBytes(FBuffer, 0, VBytes, VIndex, Length(FBuffer));
|
||||
Inc(VIndex, Length(FBuffer));
|
||||
end;
|
||||
|
||||
{ TIdLongWord }
|
||||
|
||||
constructor TIdLongWord.Create;
|
||||
begin
|
||||
inherited Create;
|
||||
SetBytesLen(4);
|
||||
end;
|
||||
|
||||
function TIdLongWord.Gets_w1: UInt16;
|
||||
begin
|
||||
Result := BytesToUInt16(FBuffer, 0);
|
||||
end;
|
||||
|
||||
procedure TIdLongWord.SetS_w1(const Value: UInt16);
|
||||
begin
|
||||
CopyTIdUInt16(Value, FBuffer, 0);
|
||||
end;
|
||||
|
||||
function TIdLongWord.Gets_b1: UInt8;
|
||||
begin
|
||||
Result := FBuffer[0];
|
||||
end;
|
||||
|
||||
procedure TIdLongWord.Sets_b1(const Value: UInt8);
|
||||
begin
|
||||
FBuffer[0] := Value;
|
||||
end;
|
||||
|
||||
function TIdLongWord.Gets_b2: UInt8;
|
||||
begin
|
||||
Result := FBuffer[1];
|
||||
end;
|
||||
|
||||
procedure TIdLongWord.Sets_b2(const Value: UInt8);
|
||||
begin
|
||||
FBuffer[1] := Value;
|
||||
end;
|
||||
|
||||
function TIdLongWord.Gets_b3: UInt8;
|
||||
begin
|
||||
Result := FBuffer[2];
|
||||
end;
|
||||
|
||||
procedure TIdLongWord.Sets_b3(const Value: UInt8);
|
||||
begin
|
||||
FBuffer[2] := Value;
|
||||
end;
|
||||
|
||||
function TIdLongWord.Gets_b4: UInt8;
|
||||
begin
|
||||
Result := FBuffer[3];
|
||||
end;
|
||||
|
||||
procedure TIdLongWord.Sets_b4(const Value: UInt8);
|
||||
begin
|
||||
FBuffer[3] := Value;
|
||||
end;
|
||||
|
||||
function TIdLongWord.Get_l: UInt32;
|
||||
begin
|
||||
Result := BytesToUInt32(FBuffer, 0);
|
||||
end;
|
||||
|
||||
procedure TIdLongWord.Set_l(const Value: UInt32);
|
||||
begin
|
||||
CopyTIdUInt32(Value, FBuffer, 0);
|
||||
end;
|
||||
|
||||
function TIdLongWord.Gets_w2: UInt16;
|
||||
begin
|
||||
Result := BytesToUInt16(FBuffer, 2);
|
||||
end;
|
||||
|
||||
procedure TIdLongWord.SetS_w2(const Value: UInt16);
|
||||
begin
|
||||
CopyTIdUInt16(Value, FBuffer, 2);
|
||||
end;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,3 @@
|
||||
{$IFDEF HAS_DEPRECATED}
|
||||
{$WARN SYMBOL_DEPRECATED OFF}
|
||||
{$ENDIF}
|
||||
@@ -0,0 +1,8 @@
|
||||
{$IFDEF HAS_DEPRECATED}
|
||||
{$IFDEF HAS_DIRECTIVE_WARN_DEFAULT}
|
||||
{$WARN SYMBOL_DEPRECATED DEFAULT}
|
||||
{$ELSE}
|
||||
{$WARN SYMBOL_DEPRECATED ON}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
{$IFDEF HAS_SYMBOL_PLATFORM}
|
||||
{$WARN SYMBOL_PLATFORM OFF}
|
||||
{$ENDIF}
|
||||
@@ -0,0 +1,8 @@
|
||||
{$IFDEF HAS_SYMBOL_PLATFORM}
|
||||
{$IFDEF HAS_DIRECTIVE_WARN_DEFAULT}
|
||||
{$WARN SYMBOL_PLATFORM DEFAULT}
|
||||
{$ELSE}
|
||||
{$WARN SYMBOL_PLATFORM ON}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
[assembly: AssemblyDescription('Internet Direct (Indy) 10.6.2 System Run-Time Package for Borland Developer Studio')]
|
||||
[assembly: AssemblyConfiguration('')]
|
||||
[assembly: AssemblyCompany('Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew')]
|
||||
[assembly: AssemblyProduct('Indy for Microsoft .NET Framework')]
|
||||
[assembly: AssemblyCopyright('Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew')]
|
||||
[assembly: AssemblyTrademark('')]
|
||||
[assembly: AssemblyCulture('')]
|
||||
[assembly: AssemblyTitle('Indy .NET System Run-Time Package')]
|
||||
[assembly: AssemblyVersion('10.6.2.*')]
|
||||
[assembly: AssemblyDelaySign(false)]
|
||||
[assembly: AssemblyKeyFile('')]
|
||||
[assembly: AssemblyKeyName('')]
|
||||
@@ -0,0 +1,360 @@
|
||||
unit IdTransactedFileStream;
|
||||
interface
|
||||
{$I IdCompilerDefines.inc}
|
||||
|
||||
{
|
||||
Original author: Grahame Grieve
|
||||
|
||||
His notes are:
|
||||
|
||||
If you want transactional file handling, with commit and rollback,
|
||||
then this is the unit for you. It provides transactional safety on
|
||||
Vista, win7, and windows server 2008, and just falls through to
|
||||
normal file handling on earlier versions of windows.
|
||||
|
||||
There's a couple of issues with the wrapper classes TKernelTransaction
|
||||
and TIdTransactedFileStream:
|
||||
- you can specify how you want file reading to work with a transactional
|
||||
isolation. I don't surface this.
|
||||
|
||||
- you can elevate the transactions to coordinate with DTC. They don't
|
||||
do this (for instance, you could put your file handling in the same
|
||||
transaction as an SQLServer transaction). I haven't done this - but if
|
||||
you do this, I'd love a copy ;-)
|
||||
|
||||
you use it like this:
|
||||
|
||||
procedure StringToFile(const AStr, AFilename: String);
|
||||
var
|
||||
oFileStream: TIdTransactedFileStream;
|
||||
oTransaction : TKernelTransaction;
|
||||
begin
|
||||
oTransaction := TIdKernelTransaction.Create('Save Content to file '+aFilename, false);
|
||||
Try
|
||||
Try
|
||||
oFileStream := TIdTransactedFileStream.Create(AFilename, fmCreate);
|
||||
try
|
||||
if Length(AStr) > 0 then
|
||||
WriteStringToStream(LFileStream, AStr, IndyTextEncoding_8Bit);
|
||||
finally
|
||||
LFileStream.Free;
|
||||
end;
|
||||
oTransaction.Commit;
|
||||
Except
|
||||
oTransaction.Rollback;
|
||||
raise;
|
||||
End;
|
||||
Finally
|
||||
oTransaction.Free;
|
||||
End;
|
||||
end;
|
||||
|
||||
anyway - maybe useful in temporary file handling with file and email? I've
|
||||
been burnt with temporary files and server crashes before.
|
||||
|
||||
}
|
||||
uses
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
Windows,
|
||||
Consts,
|
||||
{$ENDIF}
|
||||
Classes, SysUtils, IdGlobal;
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
const
|
||||
TRANSACTION_DO_NOT_PROMOTE = 1;
|
||||
|
||||
TXFS_MINIVERSION_COMMITTED_VIEW : Word = $0000; // The view of the file as of its last commit.
|
||||
TXFS_MINIVERSION_DIRTY_VIEW : Word = $FFFE; // The view of the file as it is being modified by the transaction.
|
||||
TXFS_MINIVERSION_DEFAULT_VIEW : Word = $FFFF; // Either the committed or dirty view of the file, depending on the context.
|
||||
// A transaction that is modifying the file gets the dirty view, while a transaction
|
||||
// that is not modifying the file gets the committed view.
|
||||
|
||||
// remember to close the transaction handle. Use the CloseTransaction function here to avoid problems if the transactions are not available
|
||||
type
|
||||
TktmCreateTransaction = function (lpSecurityAttributes: PSecurityAttributes;
|
||||
pUow : Pointer;
|
||||
CreateOptions, IsolationLevel, IsolationFlags, Timeout : DWORD;
|
||||
Description : PWideChar) : THandle; stdcall;
|
||||
TktmCreateFileTransacted = function (lpFileName: PChar;
|
||||
dwDesiredAccess, dwShareMode: DWORD;
|
||||
lpSecurityAttributes: PSecurityAttributes;
|
||||
dwCreationDisposition, dwFlagsAndAttributes: DWORD;
|
||||
hTemplateFile: THandle;
|
||||
hTransaction : THandle;
|
||||
MiniVersion : Word;
|
||||
pExtendedParameter : Pointer): THandle; stdcall;
|
||||
TktmCommitTransaction = function (hTransaction : THandle) : Boolean; stdcall;
|
||||
TktmRollbackTransaction = function (hTransaction : THandle) :
|
||||
Boolean; stdcall;
|
||||
TktmCloseTransaction = function (hTransaction : THandle) : Boolean; stdcall;
|
||||
|
||||
var
|
||||
CreateTransaction : TktmCreateTransaction;
|
||||
CreateFileTransacted : TktmCreateFileTransacted;
|
||||
CommitTransaction : TktmCommitTransaction;
|
||||
RollbackTransaction : TktmRollbackTransaction;
|
||||
CloseTransaction : TktmCloseTransaction;
|
||||
|
||||
{$ENDIF}
|
||||
|
||||
Function IsTransactionsWorking : Boolean;
|
||||
|
||||
type
|
||||
TIdKernelTransaction = class (TObject)
|
||||
protected
|
||||
FHandle : THandle;
|
||||
public
|
||||
constructor Create(Const sDescription : String; bCanPromote : Boolean = false);
|
||||
destructor Destroy; override;
|
||||
|
||||
function IsTransactional : Boolean;
|
||||
procedure Commit;
|
||||
procedure RollBack;
|
||||
end;
|
||||
|
||||
TIdTransactedFileStream = class(THandleStream)
|
||||
{$IFNDEF WIN32_OR_WIN64}
|
||||
protected
|
||||
FFileStream : TFileStream;
|
||||
{$ENDIF}
|
||||
public
|
||||
constructor Create(const FileName: string; Mode: Word; oTransaction : TIdKernelTransaction);
|
||||
destructor Destroy; override;
|
||||
end;
|
||||
|
||||
implementation
|
||||
uses RTLConsts;
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
|
||||
var
|
||||
GHandleKtm : HModule;
|
||||
GHandleKernel : HModule;
|
||||
|
||||
function DummyCreateTransaction(lpSecurityAttributes: PSecurityAttributes;
|
||||
pUow : Pointer; CreateOptions, IsolationLevel,
|
||||
IsolationFlags, Timeout : DWORD;
|
||||
Description : PWideChar) : THandle; stdcall;
|
||||
begin
|
||||
result := 1;
|
||||
end;
|
||||
|
||||
function DummyCreateFileTransacted(lpFileName: PChar;
|
||||
dwDesiredAccess, dwShareMode: DWORD;
|
||||
lpSecurityAttributes: PSecurityAttributes;
|
||||
dwCreationDisposition, dwFlagsAndAttributes: DWORD;
|
||||
hTemplateFile: THandle;
|
||||
hTransaction : THandle;
|
||||
MiniVersion : Word;
|
||||
pExtendedParameter : Pointer): THandle; stdcall;
|
||||
begin
|
||||
result := CreateFile(lpFilename, dwDesiredAccess, dwShareMode,
|
||||
lpSecurityAttributes, dwCreationDisposition, dwFlagsAndAttributes,
|
||||
hTemplateFile);
|
||||
end;
|
||||
|
||||
function DummyCommitTransaction(hTransaction : THandle) : Boolean; stdcall;
|
||||
begin
|
||||
assert(hTransaction = 1);
|
||||
result := true;
|
||||
end;
|
||||
|
||||
function DummyRollbackTransaction(hTransaction : THandle) : Boolean; stdcall;
|
||||
begin
|
||||
assert(hTransaction = 1);
|
||||
result := true;
|
||||
end;
|
||||
|
||||
function DummyCloseTransaction(hTransaction : THandle) : Boolean; stdcall;
|
||||
begin
|
||||
assert(hTransaction = 1);
|
||||
result := true;
|
||||
end;
|
||||
|
||||
procedure LoadDll;
|
||||
begin
|
||||
GHandleKtm := LoadLibrary('ktmw32.dll');
|
||||
if GHandleKtm <> 0 Then begin
|
||||
GHandleKernel := GetModuleHandle('Kernel32.dll'); //LoadLibrary('kernel32.dll');
|
||||
@CreateTransaction := GetProcAddress(GHandleKtm, 'CreateTransaction');
|
||||
@CommitTransaction := GetProcAddress(GHandleKtm, 'CommitTransaction');
|
||||
@RollbackTransaction := GetProcAddress(GHandleKtm, 'RollbackTransaction');
|
||||
@CloseTransaction := GetProcAddress(GHandleKernel, 'CloseHandle');
|
||||
{$IFDEF UNICODE}
|
||||
@CreateFileTransacted := GetProcAddress(GHandleKernel, 'CreateFileTransactedW');
|
||||
{$ELSE}
|
||||
@CreateFileTransacted := GetProcAddress(GHandleKernel, 'CreateFileTransactedA');
|
||||
{$ENDIF}
|
||||
end else begin
|
||||
@CreateTransaction := @DummyCreateTransaction;
|
||||
@CommitTransaction := @DummyCommitTransaction;
|
||||
@RollbackTransaction := @DummyRollbackTransaction;
|
||||
@CloseTransaction := @DummyCloseTransaction;
|
||||
@CreateFileTransacted := @DummyCreateFileTransacted;
|
||||
end;
|
||||
end;
|
||||
|
||||
procedure UnloadDll;
|
||||
begin
|
||||
if GHandleKtm <> 0 then begin
|
||||
freelibrary(GHandleKtm);
|
||||
// freelibrary(GHandleKernel);
|
||||
end
|
||||
end;
|
||||
|
||||
function IsTransactionsWorking : Boolean;
|
||||
{$IFDEF USE_INLINE} inline; {$ENDIF}
|
||||
begin
|
||||
result := GHandleKtm <> 0;
|
||||
end;
|
||||
|
||||
{$ELSE}
|
||||
|
||||
function IsTransactionsWorking : Boolean;
|
||||
{$IFDEF USE_INLINE} inline; {$ENDIF}
|
||||
begin
|
||||
result := False;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{ TIdKernelTransaction }
|
||||
|
||||
constructor TIdKernelTransaction.Create(const sDescription: String; bCanPromote : Boolean);
|
||||
var
|
||||
pDesc : PWideChar;
|
||||
begin
|
||||
inherited Create;
|
||||
{$IFDEF UNICODE}
|
||||
GetMem(pDesc, length(sDescription) + 2);
|
||||
try
|
||||
StringToWideChar(sDescription, pDesc, length(sDescription) + 2);
|
||||
{$ELSE}
|
||||
GetMem(pDesc, length(sDescription) * 2 + 4);
|
||||
try
|
||||
StringToWideChar(sDescription, pDesc, length(sDescription) * 2 + 4);
|
||||
{$ENDIF}
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
if bCanPromote Then begin
|
||||
FHandle := CreateTransaction(nil, nil, 0, 0, 0, 0, pDesc);
|
||||
end else begin
|
||||
FHandle := CreateTransaction(nil, nil, TRANSACTION_DO_NOT_PROMOTE, 0, 0, 0, pDesc);
|
||||
end;
|
||||
{$ENDIF}
|
||||
finally
|
||||
FreeMem(pDesc);
|
||||
end;
|
||||
end;
|
||||
|
||||
destructor TIdKernelTransaction.Destroy;
|
||||
begin
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
CloseTransaction(FHandle);
|
||||
{$ENDIF}
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
procedure TIdKernelTransaction.Commit;
|
||||
begin
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
if not CommitTransaction(FHandle) then begin
|
||||
IndyRaiseLastError;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
function TIdKernelTransaction.IsTransactional: Boolean;
|
||||
begin
|
||||
result := IsTransactionsWorking;
|
||||
end;
|
||||
|
||||
procedure TIdKernelTransaction.RollBack;
|
||||
begin
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
if not RollbackTransaction(FHandle) then begin
|
||||
IndyRaiseLastError;
|
||||
end;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
function FileCreateTransacted(const FileName: string; hTransaction : THandle): THandle;
|
||||
begin
|
||||
Result := THandle(CreateFileTransacted(PChar(FileName), GENERIC_READ or GENERIC_WRITE,
|
||||
0, nil, CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, 0, hTransaction, 0, nil));
|
||||
if result = INVALID_HANDLE_VALUE Then begin
|
||||
IndyRaiseLastError;
|
||||
end;
|
||||
end;
|
||||
|
||||
function FileOpenTransacted(const FileName: string; Mode: LongWord; hTransaction : THandle): THandle;
|
||||
const
|
||||
AccessMode: array[0..2] of LongWord = (
|
||||
GENERIC_READ,
|
||||
GENERIC_WRITE,
|
||||
GENERIC_READ or GENERIC_WRITE);
|
||||
ShareMode: array[0..4] of LongWord = (
|
||||
0,
|
||||
0,
|
||||
FILE_SHARE_READ,
|
||||
FILE_SHARE_WRITE,
|
||||
FILE_SHARE_READ or FILE_SHARE_WRITE);
|
||||
begin
|
||||
Result := THandle(CreateFileTransacted(PChar(FileName),AccessMode[Mode and 3],
|
||||
ShareMode[(Mode and $F0) shr 4], nil, OPEN_EXISTING,
|
||||
FILE_ATTRIBUTE_NORMAL, 0, hTransaction,TXFS_MINIVERSION_DEFAULT_VIEW, nil));
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
{ TIdTransactedFileStream }
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
constructor TIdTransactedFileStream.Create(const FileName: string; Mode: Word; oTransaction: TIdKernelTransaction);
|
||||
var
|
||||
aHandle : THandle;
|
||||
begin
|
||||
if Mode = fmCreate then begin
|
||||
aHandle := FileCreateTransacted(FileName, oTransaction.FHandle);
|
||||
if aHandle = INVALID_HANDLE_VALUE then begin
|
||||
raise EFCreateError.CreateResFmt(@SFCreateError, [FileName]);
|
||||
end;
|
||||
end else begin
|
||||
aHandle := FileOpenTransacted(FileName, Mode, oTransaction.FHandle);
|
||||
if aHandle = INVALID_HANDLE_VALUE then begin
|
||||
raise EFOpenError.CreateResFmt(@SFOpenError, [FileName]);
|
||||
end;
|
||||
end;
|
||||
inherited Create(ahandle);
|
||||
end;
|
||||
{$ELSE}
|
||||
constructor TIdTransactedFileStream.Create(const FileName: string; Mode: Word; oTransaction: TIdKernelTransaction);
|
||||
var LStream : TFileStream;
|
||||
begin
|
||||
LStream := FFileStream.Create(FileName,Mode);
|
||||
inherited Create ( LStream.Handle);
|
||||
FFileStream := LStream;
|
||||
end;
|
||||
{$ENDIF}
|
||||
|
||||
destructor TIdTransactedFileStream.Destroy ;
|
||||
begin
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
if Handle = INVALID_HANDLE_VALUE then begin
|
||||
FileClose(Handle);
|
||||
end;
|
||||
inherited Destroy;
|
||||
{$ELSE}
|
||||
//we have to deference our copy of the THandle so we don't free it twice.
|
||||
FHandle := INVALID_HANDLE_VALUE;
|
||||
FreeAndNil( FFileStream );
|
||||
inherited Destroy;
|
||||
{$ENDIF}
|
||||
end;
|
||||
|
||||
{$IFDEF WIN32_OR_WIN64}
|
||||
initialization
|
||||
LoadDLL;
|
||||
finalization
|
||||
UnloadDLL;
|
||||
{$ENDIF}
|
||||
End.
|
||||
@@ -0,0 +1,3 @@
|
||||
{$IFDEF HAS_UNIT_PLATFORM}
|
||||
{$WARN UNIT_PLATFORM OFF}
|
||||
{$ENDIF}
|
||||
@@ -0,0 +1,8 @@
|
||||
{$IFDEF HAS_UNIT_PLATFORM}
|
||||
{$IFDEF HAS_DIRECTIVE_WARN_DEFAULT}
|
||||
{$WARN UNIT_PLATFORM DEFAULT}
|
||||
{$ELSE}
|
||||
{$WARN UNIT_PLATFORM ON}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,18 @@
|
||||
gsIdVersionMajor = 10;
|
||||
{$NODEFINE gsIdVersionMajor}
|
||||
gsIdVersionMinor = 6;
|
||||
{$NODEFINE gsIdVersionMinor}
|
||||
gsIdVersionRelease = 2;
|
||||
{$NODEFINE gsIdVersionRelease}
|
||||
gsIdVersionBuild = 0;
|
||||
{$NODEFINE gsIdVersionBuild}
|
||||
|
||||
(*$HPPEMIT '#define gsIdVersionMajor 10'*)
|
||||
(*$HPPEMIT '#define gsIdVersionMinor 6'*)
|
||||
(*$HPPEMIT '#define gsIdVersionRelease 2'*)
|
||||
(*$HPPEMIT '#define gsIdVersionBuild 0'*)
|
||||
(*$HPPEMIT ''*)
|
||||
|
||||
gsIdVersion = '10.6.2.0'; {do not localize}
|
||||
gsIdProductName = 'Indy'; {do not localize}
|
||||
gsIdProductVersion = '10.6.2'; {do not localize}
|
||||
@@ -0,0 +1,18 @@
|
||||
gsIdVersionMajor = 10;
|
||||
{$NODEFINE gsIdVersionMajor}
|
||||
gsIdVersionMinor = 6;
|
||||
{$NODEFINE gsIdVersionMinor}
|
||||
gsIdVersionRelease = 2;
|
||||
{$NODEFINE gsIdVersionRelease}
|
||||
gsIdVersionBuild = $WCREV$;
|
||||
{$NODEFINE gsIdVersionBuild}
|
||||
|
||||
(*$HPPEMIT '#define gsIdVersionMajor 10'*)
|
||||
(*$HPPEMIT '#define gsIdVersionMinor 6'*)
|
||||
(*$HPPEMIT '#define gsIdVersionRelease 2'*)
|
||||
(*$HPPEMIT '#define gsIdVersionBuild $WCREV$'*)
|
||||
(*$HPPEMIT ''*)
|
||||
|
||||
gsIdVersion = '10.6.2.$WCREV$'; {do not localize}
|
||||
gsIdProductName = 'Indy'; {do not localize}
|
||||
gsIdProductVersion = '10.6.2'; {do not localize}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,167 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">Delphi.Personality</Option>
|
||||
<Option Name="ProjectType"></Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{71350245-92DA-4341-AE2D-6D2641058A3B}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">IndySystem100.dpk</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">8</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">1</Compiler>
|
||||
<Compiler Name="R">1</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases">WinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
||||
<Compiler Name="NamespacePrefix"></Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">False</Compiler>
|
||||
<Compiler Name="UnsafeCode">False</Compiler>
|
||||
<Compiler Name="UnsafeCast">False</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
<Compiler Name="UnitInitSeq">True</Compiler>
|
||||
<Compiler Name="LocalPInvoke">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">False</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">16384</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription">Indy 10 System</Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir"></Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath"></Directories>
|
||||
<Directories Name="Packages">vcl;rtl;vclx;dbrtl;vcldb;adortl;dbxcds;dbexpress;xmlrtl;vclie;inet;inetdbbde;inetdbxpress;dclOfficeXP;bdertl;soaprtl;dsnap;websnap;webdsnap;teeui;teedb;tee;vcldbx;dsnapcon;vclactnband</Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">False</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="RemoteHost"></Parameters>
|
||||
<Parameters Name="RemotePath"></Parameters>
|
||||
<Parameters Name="RemoteLauncher"></Parameters>
|
||||
<Parameters Name="RemoteCWD"></Parameters>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
</Parameters>
|
||||
<Language>
|
||||
<Language Name="ActiveLang"></Language>
|
||||
<Language Name="ProjectLang">$00000000</Language>
|
||||
<Language Name="RootDir"></Language>
|
||||
</Language>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
</Delphi.Personality>
|
||||
</BorlandProject>
|
||||
@@ -0,0 +1,45 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00600000
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,46 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-JL
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,45 @@
|
||||
package IndySystem100;
|
||||
|
||||
{$R *.res}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
rtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas';
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem100\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem100.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem100\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem100.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,200 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<BorlandProject>
|
||||
<PersonalityInfo>
|
||||
<Option>
|
||||
<Option Name="Personality">DelphiDotNet.Personality</Option>
|
||||
<Option Name="ProjectType"></Option>
|
||||
<Option Name="Version">1.0</Option>
|
||||
<Option Name="GUID">{B7DBFAD5-E358-4B1C-AD9F-FB12D6FD78A6}</Option>
|
||||
</Option>
|
||||
</PersonalityInfo>
|
||||
<DelphiDotNet.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">IndySystem100Net.dpk</Source>
|
||||
</Source>
|
||||
<FileVersion>
|
||||
<FileVersion Name="Version">7.0</FileVersion>
|
||||
</FileVersion>
|
||||
<Compiler>
|
||||
<Compiler Name="A">0</Compiler>
|
||||
<Compiler Name="B">0</Compiler>
|
||||
<Compiler Name="C">1</Compiler>
|
||||
<Compiler Name="D">1</Compiler>
|
||||
<Compiler Name="E">0</Compiler>
|
||||
<Compiler Name="F">0</Compiler>
|
||||
<Compiler Name="G">1</Compiler>
|
||||
<Compiler Name="H">1</Compiler>
|
||||
<Compiler Name="I">1</Compiler>
|
||||
<Compiler Name="J">0</Compiler>
|
||||
<Compiler Name="K">0</Compiler>
|
||||
<Compiler Name="L">1</Compiler>
|
||||
<Compiler Name="M">0</Compiler>
|
||||
<Compiler Name="N">1</Compiler>
|
||||
<Compiler Name="O">1</Compiler>
|
||||
<Compiler Name="P">1</Compiler>
|
||||
<Compiler Name="Q">1</Compiler>
|
||||
<Compiler Name="R">1</Compiler>
|
||||
<Compiler Name="S">0</Compiler>
|
||||
<Compiler Name="T">0</Compiler>
|
||||
<Compiler Name="U">0</Compiler>
|
||||
<Compiler Name="V">1</Compiler>
|
||||
<Compiler Name="W">0</Compiler>
|
||||
<Compiler Name="X">1</Compiler>
|
||||
<Compiler Name="Y">1</Compiler>
|
||||
<Compiler Name="Z">1</Compiler>
|
||||
<Compiler Name="ShowHints">True</Compiler>
|
||||
<Compiler Name="ShowWarnings">True</Compiler>
|
||||
<Compiler Name="UnitAliases">WinTypes=Borland.Vcl.Windows;WinProcs=Borland.Vcl.Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;</Compiler>
|
||||
<Compiler Name="NamespacePrefix">Borland.Vcl</Compiler>
|
||||
<Compiler Name="GenerateDocumentation">False</Compiler>
|
||||
<Compiler Name="DefaultNamespace"></Compiler>
|
||||
<Compiler Name="SymbolDeprecated">True</Compiler>
|
||||
<Compiler Name="SymbolLibrary">True</Compiler>
|
||||
<Compiler Name="SymbolPlatform">True</Compiler>
|
||||
<Compiler Name="SymbolExperimental">True</Compiler>
|
||||
<Compiler Name="UnitLibrary">True</Compiler>
|
||||
<Compiler Name="UnitPlatform">True</Compiler>
|
||||
<Compiler Name="UnitDeprecated">True</Compiler>
|
||||
<Compiler Name="UnitExperimental">True</Compiler>
|
||||
<Compiler Name="HResultCompat">True</Compiler>
|
||||
<Compiler Name="HidingMember">True</Compiler>
|
||||
<Compiler Name="HiddenVirtual">True</Compiler>
|
||||
<Compiler Name="Garbage">True</Compiler>
|
||||
<Compiler Name="BoundsError">True</Compiler>
|
||||
<Compiler Name="ZeroNilCompat">True</Compiler>
|
||||
<Compiler Name="StringConstTruncated">True</Compiler>
|
||||
<Compiler Name="ForLoopVarVarPar">True</Compiler>
|
||||
<Compiler Name="TypedConstVarPar">True</Compiler>
|
||||
<Compiler Name="AsgToTypedConst">True</Compiler>
|
||||
<Compiler Name="CaseLabelRange">True</Compiler>
|
||||
<Compiler Name="ForVariable">True</Compiler>
|
||||
<Compiler Name="ConstructingAbstract">True</Compiler>
|
||||
<Compiler Name="ComparisonFalse">True</Compiler>
|
||||
<Compiler Name="ComparisonTrue">True</Compiler>
|
||||
<Compiler Name="ComparingSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="CombiningSignedUnsigned">True</Compiler>
|
||||
<Compiler Name="UnsupportedConstruct">True</Compiler>
|
||||
<Compiler Name="FileOpen">True</Compiler>
|
||||
<Compiler Name="FileOpenUnitSrc">True</Compiler>
|
||||
<Compiler Name="BadGlobalSymbol">True</Compiler>
|
||||
<Compiler Name="DuplicateConstructorDestructor">True</Compiler>
|
||||
<Compiler Name="InvalidDirective">True</Compiler>
|
||||
<Compiler Name="PackageNoLink">True</Compiler>
|
||||
<Compiler Name="PackageThreadVar">True</Compiler>
|
||||
<Compiler Name="ImplicitImport">True</Compiler>
|
||||
<Compiler Name="HPPEMITIgnored">True</Compiler>
|
||||
<Compiler Name="NoRetVal">True</Compiler>
|
||||
<Compiler Name="UseBeforeDef">True</Compiler>
|
||||
<Compiler Name="ForLoopVarUndef">True</Compiler>
|
||||
<Compiler Name="UnitNameMismatch">True</Compiler>
|
||||
<Compiler Name="NoCFGFileFound">True</Compiler>
|
||||
<Compiler Name="ImplicitVariants">True</Compiler>
|
||||
<Compiler Name="UnicodeToLocale">True</Compiler>
|
||||
<Compiler Name="LocaleToUnicode">True</Compiler>
|
||||
<Compiler Name="ImagebaseMultiple">True</Compiler>
|
||||
<Compiler Name="SuspiciousTypecast">True</Compiler>
|
||||
<Compiler Name="PrivatePropAccessor">True</Compiler>
|
||||
<Compiler Name="UnsafeType">True</Compiler>
|
||||
<Compiler Name="UnsafeCode">True</Compiler>
|
||||
<Compiler Name="UnsafeCast">True</Compiler>
|
||||
<Compiler Name="OptionTruncated">True</Compiler>
|
||||
<Compiler Name="WideCharReduced">True</Compiler>
|
||||
<Compiler Name="DuplicatesIgnored">True</Compiler>
|
||||
<Compiler Name="UnitInitSeq">True</Compiler>
|
||||
<Compiler Name="LocalPInvoke">True</Compiler>
|
||||
<Compiler Name="MessageDirective">True</Compiler>
|
||||
</Compiler>
|
||||
<Linker>
|
||||
<Linker Name="MapFile">0</Linker>
|
||||
<Linker Name="OutputObjs">0</Linker>
|
||||
<Linker Name="ConsoleApp">1</Linker>
|
||||
<Linker Name="DebugInfo">True</Linker>
|
||||
<Linker Name="RemoteSymbols">False</Linker>
|
||||
<Linker Name="GenerateDRC">False</Linker>
|
||||
<Linker Name="MinStackSize">4096</Linker>
|
||||
<Linker Name="MaxStackSize">1048576</Linker>
|
||||
<Linker Name="ImageBase">4194304</Linker>
|
||||
<Linker Name="ExeDescription">Indy 10 System</Linker>
|
||||
</Linker>
|
||||
<Directories>
|
||||
<Directories Name="OutputDir"></Directories>
|
||||
<Directories Name="UnitOutputDir"></Directories>
|
||||
<Directories Name="PackageDLLOutputDir"></Directories>
|
||||
<Directories Name="PackageDCPOutputDir"></Directories>
|
||||
<Directories Name="SearchPath">c:\program files\common files\borland shared\bds\shared assemblies\4.0;c:\windows\microsoft.net\framework\v1.1.4322</Directories>
|
||||
<Directories Name="Packages">Borland.VclRtl;Borland.Delphi</Directories>
|
||||
<Directories Name="Conditionals"></Directories>
|
||||
<Directories Name="DebugSourceDirs"></Directories>
|
||||
<Directories Name="UsePackages">False</Directories>
|
||||
</Directories>
|
||||
<Parameters>
|
||||
<Parameters Name="RunParams"></Parameters>
|
||||
<Parameters Name="HostApplication"></Parameters>
|
||||
<Parameters Name="Launcher"></Parameters>
|
||||
<Parameters Name="UseLauncher">False</Parameters>
|
||||
<Parameters Name="DebugCWD"></Parameters>
|
||||
<Parameters Name="RemoteHost"></Parameters>
|
||||
<Parameters Name="RemotePath"></Parameters>
|
||||
<Parameters Name="RemoteLauncher"></Parameters>
|
||||
<Parameters Name="RemoteCWD"></Parameters>
|
||||
<Parameters Name="RemoteDebug">False</Parameters>
|
||||
</Parameters>
|
||||
<Language>
|
||||
<Language Name="ActiveLang"></Language>
|
||||
<Language Name="ProjectLang">$00000000</Language>
|
||||
<Language Name="RootDir"></Language>
|
||||
</Language>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">False</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileDescription"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalCopyright"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="LegalTrademarks"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="OriginalFilename"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductName"></VersionInfoKeys>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"></VersionInfoKeys>
|
||||
</VersionInfoKeys>
|
||||
|
||||
|
||||
<FileList>
|
||||
<File FileName="ModelSupport\default.txaPackage" ContainerId="File" ModuleName="default"/>
|
||||
<File FileName="c:\program files\common files\borland shared\bds\shared assemblies\4.0\Borland.Delphi.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.Delphi" AssemblyName="Borland.Delphi" Version="10.0.1979.42035" LinkUnits="False"/>
|
||||
<File FileName="c:\program files\common files\borland shared\bds\shared assemblies\4.0\Borland.VclRtl.dll" ContainerId="DelphiDotNetAssemblyCompiler" ModuleName="Borland.VclRtl" AssemblyName="Borland.VclRtl" Version="10.0.1979.42035" LinkUnits="False"/>
|
||||
<File FileName="IdAntiFreezeBase.pas" ContainerId="PascalCompiler" ModuleName="IdAntiFreezeBase"/>
|
||||
<File FileName="IdBaseComponent.pas" ContainerId="PascalCompiler" ModuleName="IdBaseComponent"/>
|
||||
<File FileName="IdComponent.pas" ContainerId="PascalCompiler" ModuleName="IdComponent"/>
|
||||
<File FileName="IdException.pas" ContainerId="PascalCompiler" ModuleName="IdException"/>
|
||||
<File FileName="IdGlobal.pas" ContainerId="PascalCompiler" ModuleName="IdGlobal"/>
|
||||
<File FileName="IdObjs.pas" ContainerId="PascalCompiler" ModuleName="IdObjs"/>
|
||||
<File FileName="IdObjsBase.pas" ContainerId="PascalCompiler" ModuleName="IdObjsBase"/>
|
||||
<File FileName="IdObjsVCL.pas" ContainerId="PascalCompiler" ModuleName="IdObjsVCL"/>
|
||||
<File FileName="IdResourceStrings.pas" ContainerId="PascalCompiler" ModuleName="IdResourceStrings"/>
|
||||
<File FileName="IdStack.pas" ContainerId="PascalCompiler" ModuleName="IdStack"/>
|
||||
<File FileName="IdStackConsts.pas" ContainerId="PascalCompiler" ModuleName="IdStackConsts"/>
|
||||
<File FileName="IdStackDotNet.pas" ContainerId="PascalCompiler" ModuleName="IdStackDotNet"/>
|
||||
<File FileName="IdStream.pas" ContainerId="PascalCompiler" ModuleName="IdStream"/>
|
||||
<File FileName="IdStreamNET.pas" ContainerId="PascalCompiler" ModuleName="IdStreamNET"/>
|
||||
<File FileName="IdStruct.pas" ContainerId="PascalCompiler" ModuleName="IdStruct"/>
|
||||
<File FileName="IdSys.pas" ContainerId="PascalCompiler" ModuleName="IdSys"/>
|
||||
<File FileName="IdSysBase.pas" ContainerId="PascalCompiler" ModuleName="IdSysBase"/>
|
||||
<File FileName="IdSysVCL.pas" ContainerId="PascalCompiler" ModuleName="IdSysVCL"/>
|
||||
</FileList>
|
||||
</DelphiDotNet.Personality>
|
||||
</BorlandProject>
|
||||
@@ -0,0 +1,42 @@
|
||||
package IndySystem100Net;
|
||||
|
||||
{$ALIGN 0}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
Borland.Delphi,
|
||||
Borland.VclRtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackDotNet in 'IdStackDotNet.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamNET in 'IdStreamNET.pas',
|
||||
IdStruct in 'IdStruct.pas';
|
||||
{$I IdSystem90ASM90.inc}
|
||||
|
||||
end.
|
||||
Binary file not shown.
@@ -0,0 +1,45 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00600000
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,46 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-JL
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,45 @@
|
||||
package IndySystem110;
|
||||
|
||||
{$R *.res}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
rtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas';
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem110\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem110.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem110\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem110.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
package IndySystem110Net;
|
||||
|
||||
{$ALIGN 0}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
Borland.Delphi,
|
||||
Borland.VclRtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackDotNet in 'IdStackDotNet.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamNET in 'IdStreamNET.pas',
|
||||
IdStruct in 'IdStruct.pas';
|
||||
{$I IdSystem90ASM90.inc}
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,47 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00600000
|
||||
--inline:on
|
||||
--string-checks:on
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,48 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-JL
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
--inline:on
|
||||
--string-checks:on
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,45 @@
|
||||
package IndySystem120;
|
||||
|
||||
{$R *.res}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
rtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas';
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,45 @@
|
||||
<Project DefaultTargets="default" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<BuildProject>indy</BuildProject>
|
||||
</PropertyGroup>
|
||||
|
||||
<Import Project="$(TPADDONS)\tpaddons.Targets"/>
|
||||
<PropertyGroup>
|
||||
<DcuOutput>$(DCUOUTDIR)</DcuOutput>
|
||||
<DcpOutput>$(DCPOUTDIR)</DcpOutput>
|
||||
<HppOutput>$(HPPOUTDIR)</HppOutput>
|
||||
<ObjOutput>$(LIBOUTDIR)</ObjOutput>
|
||||
<BpiOutput>$(LIBOUTDIR)</BpiOutput>
|
||||
<BinOutput>$(BINOUTDIR)</BinOutput>
|
||||
<GenerateCppPackages>true</GenerateCppPackages>
|
||||
<GenerateCppFiles>true</GenerateCppFiles>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
|
||||
<BuildTarget Include="IndySystem120.dpk">
|
||||
<BuildAs>package</BuildAs>
|
||||
<Language>delphi</Language>
|
||||
<Platform>win32</Platform>
|
||||
</BuildTarget>
|
||||
|
||||
<Compile Include="IndySystem120.dpk">
|
||||
<CompilerOptions>$(DCCSWTS) $(BCBSWTS)</CompilerOptions>
|
||||
</Compile>
|
||||
|
||||
<ResourceFiles Include="
|
||||
IndySystem120.rc
|
||||
">
|
||||
<TargetExtension>.res</TargetExtension>
|
||||
</ResourceFiles>
|
||||
<RequiredDirs Include="
|
||||
$(DcuOutput);
|
||||
$(HppOutput);
|
||||
$(ObjOutput);
|
||||
$(BpiOutput);
|
||||
$(BinOutput);
|
||||
$(DcpOutput)
|
||||
"/>
|
||||
</ItemGroup>
|
||||
<Target Name="default" DependsOnTargets="mkdir;buildresources;tpbuild"/>
|
||||
<!--<Target Name="clean" DependsOnTargets="integclean;cleanall"/>-->
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem120\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem120.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem120\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem120.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
package IndySystem120Net;
|
||||
|
||||
{$ALIGN 0}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
Borland.Delphi,
|
||||
Borland.VclRtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackDotNet in 'IdStackDotNet.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamNET in 'IdStreamNET.pas',
|
||||
IdStruct in 'IdStruct.pas';
|
||||
{$I IdSystem90ASM90.inc}
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,45 @@
|
||||
package IndySystem130;
|
||||
|
||||
{$R *.res}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
rtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas';
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem130\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem130.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem130\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem130.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,42 @@
|
||||
package IndySystem130Net;
|
||||
|
||||
{$ALIGN 0}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
Borland.Delphi,
|
||||
Borland.VclRtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackDotNet in 'IdStackDotNet.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamNET in 'IdStreamNET.pas',
|
||||
IdStruct in 'IdStruct.pas';
|
||||
{$I IdSystem90ASM90.inc}
|
||||
|
||||
end.
|
||||
Binary file not shown.
@@ -0,0 +1,47 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00600000
|
||||
--inline:on
|
||||
--string-checks:on
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,48 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-JL
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
--inline:on
|
||||
--string-checks:on
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,46 @@
|
||||
package IndySystem140;
|
||||
|
||||
{$R *.res}
|
||||
{$ALIGN 8}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
rtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas';
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem140\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem140.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem140\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem140.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,46 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00600000
|
||||
--inline:on
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,47 @@
|
||||
-$A8
|
||||
-$B-
|
||||
-$C+
|
||||
-$D+
|
||||
-$E-
|
||||
-$F-
|
||||
-$G+
|
||||
-$H+
|
||||
-$I+
|
||||
-$J+
|
||||
-$K-
|
||||
-$L+
|
||||
-$M-
|
||||
-$N+
|
||||
-$O+
|
||||
-$P+
|
||||
-$Q-
|
||||
-$R-
|
||||
-$S-
|
||||
-$T+
|
||||
-$U-
|
||||
-$V+
|
||||
-$W-
|
||||
-$X+
|
||||
-$YD
|
||||
-$Z1
|
||||
-JL
|
||||
-cg
|
||||
-AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE;
|
||||
-H+
|
||||
-W+
|
||||
-M
|
||||
-$M16384,1048576
|
||||
-K$00400000
|
||||
--inline:on
|
||||
-N0".\"
|
||||
-LE".\"
|
||||
-LN".\"
|
||||
-U".\"
|
||||
-O".\"
|
||||
-I".\"
|
||||
-R".\"
|
||||
-DBCB
|
||||
-Z
|
||||
-w-UNSAFE_TYPE
|
||||
-w-UNSAFE_CODE
|
||||
-w-UNSAFE_CAST
|
||||
@@ -0,0 +1,46 @@
|
||||
package IndySystem150;
|
||||
|
||||
{$R *.res}
|
||||
{$ALIGN 8}
|
||||
{$BOOLEVAL OFF}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION ON}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES OFF}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
requires
|
||||
rtl;
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas';
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem150\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem150.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem150\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem150.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,77 @@
|
||||
package IndySystem160;
|
||||
|
||||
{$R *.res}
|
||||
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO ON}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION OFF}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DEFINE DEBUG}
|
||||
{$ENDIF IMPLICITBUILDING}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
// RLebeau: cannot use IdCompilerDefines.inc here!
|
||||
|
||||
{$IFNDEF NEXTGEN}
|
||||
requires
|
||||
rtl;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF WINDOWS}
|
||||
{$IFDEF MSWINDOWS}
|
||||
{$DEFINE WINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
{$IFNDEF WINDOWS}
|
||||
IdResourceStringsUnix in 'IdResourceStringsUnix.pas',
|
||||
IdResourceStringsVCLPosix in 'IdResourceStringsVCLPosix.pas',
|
||||
{$ENDIF}
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
{$IFDEF WINDOWS}
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
{$ELSE}
|
||||
IdStackVCLPosix in 'IdStackVCLPosix.pas',
|
||||
{$ENDIF}
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
{$IFDEF WINDOWS}
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas'
|
||||
{$ELSE}
|
||||
IdVCLPosixSupplemental in 'IdVCLPosixSupplemental.pas'
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,211 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{61B11559-323A-4C77-8EDD-205DA0B58F51}</ProjectGuid>
|
||||
<MainSource>IndySystem160.dpk</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<TargetedPlatforms>7</TargetedPlatforms>
|
||||
<AppType>Package</AppType>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<ProjectVersion>13.4</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Base)'=='true') or '$(Base_Win64)'!=''">
|
||||
<Base_Win64>true</Base_Win64>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='OSX32' and '$(Base)'=='true') or '$(Base_OSX32)'!=''">
|
||||
<Base_OSX32>true</Base_OSX32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_1)'=='true') or '$(Cfg_1_Win32)'!=''">
|
||||
<Cfg_1_Win32>true</Cfg_1_Win32>
|
||||
<CfgParent>Cfg_1</CfgParent>
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win64' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win64)'!=''">
|
||||
<Cfg_2_Win64>true</Cfg_2_Win64>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='OSX32' and '$(Cfg_2)'=='true') or '$(Cfg_2_OSX32)'!=''">
|
||||
<Cfg_2_OSX32>true</Cfg_2_OSX32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<GenPackage>true</GenPackage>
|
||||
<DCC_Description>Indy 10 System</DCC_Description>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Winapi;$(DCC_Namespace)</DCC_Namespace>
|
||||
<RuntimeOnlyPackage>true</RuntimeOnlyPackage>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_S>false</DCC_S>
|
||||
<GenDll>true</GenDll>
|
||||
<DCC_E>false</DCC_E>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win64)'!=''">
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<Icon_MainIcon>IndySystem_Icon.ico</Icon_MainIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_OSX32)'!=''">
|
||||
<DCC_UnitSearchPath>$(BDS)\source\rtl\posix\osx;$(DCC_UnitSearchPath)</DCC_UnitSearchPath>
|
||||
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
<Debugger_Launcher>/usr/X11/bin/xterm -e "%debuggee%"</Debugger_Launcher>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
|
||||
<Icon_MainIcon>IndySystem_Icon.ico</Icon_MainIcon>
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1_Win32)'!=''">
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win64)'!=''">
|
||||
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_OSX32)'!=''">
|
||||
<DCC_RemoteDebug>true</DCC_RemoteDebug>
|
||||
<DCC_Namespace>Posix;$(DCC_Namespace)</DCC_Namespace>
|
||||
<Debugger_Launcher>/usr/X11/bin/xterm -e "%debuggee%"</Debugger_Launcher>
|
||||
<VerInfo_Keys>CFBundleName=$(MSBuildProjectName);CFBundleDisplayName=$(MSBuildProjectName);CFBundleIdentifier=$(MSBuildProjectName);CFBundleVersion=1.0.0.0;CFBundlePackageType=APPL;CFBundleSignature=????;CFBundleAllowMixedLocalizations=YES;CFBundleExecutable=$(MSBuildProjectName)</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="rtl.dcp"/>
|
||||
<DCCReference Include="IdAntiFreezeBase.pas"/>
|
||||
<DCCReference Include="IdBaseComponent.pas"/>
|
||||
<DCCReference Include="IdCTypes.pas"/>
|
||||
<DCCReference Include="IdComponent.pas"/>
|
||||
<DCCReference Include="IdException.pas"/>
|
||||
<DCCReference Include="IdGlobal.pas"/>
|
||||
<DCCReference Include="IdIDN.pas"/>
|
||||
<DCCReference Include="IdResourceStrings.pas"/>
|
||||
<DCCReference Include="IdStack.pas"/>
|
||||
<DCCReference Include="IdStackBSDBase.pas"/>
|
||||
<DCCReference Include="IdStackConsts.pas"/>
|
||||
<DCCReference Include="IdStackWindows.pas"/>
|
||||
<DCCReference Include="IdStream.pas"/>
|
||||
<DCCReference Include="IdStreamVCL.pas"/>
|
||||
<DCCReference Include="IdStruct.pas"/>
|
||||
<DCCReference Include="IdWinsock2.pas"/>
|
||||
<DCCReference Include="IdWship6.pas"/>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">IndySystem160.dpk</Source>
|
||||
</Source>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclmid160.bpl">Embarcadero MyBase DataAccess Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclmcn160.bpl">Embarcadero DataSnap Connection Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="Win64">True</Platform>
|
||||
<Platform value="OSX32">True</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
|
||||
<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem160\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem160.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem160\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem160.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,76 @@
|
||||
package IndySystem170;
|
||||
|
||||
{$R *.res}
|
||||
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO ON}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION OFF}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DEFINE DEBUG}
|
||||
{$ENDIF IMPLICITBUILDING}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD ON}
|
||||
|
||||
// RLebeau: cannot use IdCompilerDefines.inc here!
|
||||
|
||||
{$IFNDEF NEXTGEN}
|
||||
requires
|
||||
rtl;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF WINDOWS}
|
||||
{$IFDEF MSWINDOWS}
|
||||
{$DEFINE WINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
{$IFNDEF WINDOWS}
|
||||
IdResourceStringsUnix in 'IdResourceStringsUnix.pas',
|
||||
IdResourceStringsVCLPosix in 'IdResourceStringsVCLPosix.pas',
|
||||
{$ENDIF}
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
{$IFDEF WINDOWS}
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
{$ELSE}
|
||||
IdStackVCLPosix in 'IdStackVCLPosix.pas',
|
||||
{$ENDIF}
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
{$IFDEF WINDOWS}
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas'
|
||||
{$ELSE}
|
||||
IdVCLPosixSupplemental in 'IdVCLPosixSupplemental.pas'
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
end.
|
||||
@@ -0,0 +1,164 @@
|
||||
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<ProjectGuid>{E88B0F05-818B-4420-9BFA-FD7BA9E261B1}</ProjectGuid>
|
||||
<MainSource>IndySystem170.dpk</MainSource>
|
||||
<Base>True</Base>
|
||||
<Config Condition="'$(Config)'==''">Debug</Config>
|
||||
<TargetedPlatforms>1</TargetedPlatforms>
|
||||
<AppType>Package</AppType>
|
||||
<FrameworkType>None</FrameworkType>
|
||||
<ProjectVersion>14.3</ProjectVersion>
|
||||
<Platform Condition="'$(Platform)'==''">Win32</Platform>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Base)'=='true') or '$(Base_Win32)'!=''">
|
||||
<Base_Win32>true</Base_Win32>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Release' or '$(Cfg_1)'!=''">
|
||||
<Cfg_1>true</Cfg_1>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Config)'=='Debug' or '$(Cfg_2)'!=''">
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<CfgParent>Base</CfgParent>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="('$(Platform)'=='Win32' and '$(Cfg_2)'=='true') or '$(Cfg_2_Win32)'!=''">
|
||||
<Cfg_2_Win32>true</Cfg_2_Win32>
|
||||
<CfgParent>Cfg_2</CfgParent>
|
||||
<Cfg_2>true</Cfg_2>
|
||||
<Base>true</Base>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base)'!=''">
|
||||
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
|
||||
<DCC_DcpOutput>..\DCP</DCC_DcpOutput>
|
||||
<DCC_BplOutput>..\BPI</DCC_BplOutput>
|
||||
<DCC_S>false</DCC_S>
|
||||
<GenDll>true</GenDll>
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<RuntimeOnlyPackage>true</RuntimeOnlyPackage>
|
||||
<DCC_F>false</DCC_F>
|
||||
<DCC_E>false</DCC_E>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
<DCC_N>false</DCC_N>
|
||||
<DCC_ImageBase>00400000</DCC_ImageBase>
|
||||
<DCC_Namespace>System;Xml;Data;Datasnap;Web;Soap;Winapi;Vcl;$(DCC_Namespace)</DCC_Namespace>
|
||||
<GenPackage>true</GenPackage>
|
||||
<DCC_Description>Indy 10 System</DCC_Description>
|
||||
<DCC_K>false</DCC_K>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Base_Win32)'!=''">
|
||||
<VerInfo_Locale>1033</VerInfo_Locale>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
<DCC_Namespace>System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace)</DCC_Namespace>
|
||||
<VerInfo_Keys>CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments=</VerInfo_Keys>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_1)'!=''">
|
||||
<DCC_DebugInformation>false</DCC_DebugInformation>
|
||||
<DCC_LocalDebugSymbols>false</DCC_LocalDebugSymbols>
|
||||
<DCC_SymbolReferenceInfo>0</DCC_SymbolReferenceInfo>
|
||||
<DCC_Define>RELEASE;$(DCC_Define)</DCC_Define>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2)'!=''">
|
||||
<DCC_Define>DEBUG;$(DCC_Define)</DCC_Define>
|
||||
<DCC_GenerateStackFrames>true</DCC_GenerateStackFrames>
|
||||
<DCC_Optimize>false</DCC_Optimize>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Cfg_2_Win32)'!=''">
|
||||
<DCC_CBuilderOutput>All</DCC_CBuilderOutput>
|
||||
<VerInfo_IncludeVerInfo>true</VerInfo_IncludeVerInfo>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<DelphiCompile Include="$(MainSource)">
|
||||
<MainSource>MainSource</MainSource>
|
||||
</DelphiCompile>
|
||||
<DCCReference Include="rtl.dcp"/>
|
||||
<DCCReference Include="IdAntiFreezeBase.pas"/>
|
||||
<DCCReference Include="IdBaseComponent.pas"/>
|
||||
<DCCReference Include="IdCTypes.pas"/>
|
||||
<DCCReference Include="IdComponent.pas"/>
|
||||
<DCCReference Include="IdException.pas"/>
|
||||
<DCCReference Include="IdGlobal.pas"/>
|
||||
<DCCReference Include="IdIDN.pas"/>
|
||||
<DCCReference Include="IdResourceStrings.pas"/>
|
||||
<DCCReference Include="IdStack.pas"/>
|
||||
<DCCReference Include="IdStackBSDBase.pas"/>
|
||||
<DCCReference Include="IdStackConsts.pas"/>
|
||||
<DCCReference Include="IdStackWindows.pas"/>
|
||||
<DCCReference Include="IdStream.pas"/>
|
||||
<DCCReference Include="IdStreamVCL.pas"/>
|
||||
<DCCReference Include="IdStruct.pas"/>
|
||||
<DCCReference Include="IdWinsock2.pas"/>
|
||||
<DCCReference Include="IdWship6.pas">
|
||||
<Form>$ENDIF</Form>
|
||||
</DCCReference>
|
||||
<BuildConfiguration Include="Debug">
|
||||
<Key>Cfg_2</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Base">
|
||||
<Key>Base</Key>
|
||||
</BuildConfiguration>
|
||||
<BuildConfiguration Include="Release">
|
||||
<Key>Cfg_1</Key>
|
||||
<CfgParent>Base</CfgParent>
|
||||
</BuildConfiguration>
|
||||
</ItemGroup>
|
||||
<ProjectExtensions>
|
||||
<Borland.Personality>Delphi.Personality.12</Borland.Personality>
|
||||
<Borland.ProjectType>Package</Borland.ProjectType>
|
||||
<BorlandProject>
|
||||
<Delphi.Personality>
|
||||
<Source>
|
||||
<Source Name="MainSource">IndySystem170.dpk</Source>
|
||||
</Source>
|
||||
<VersionInfo>
|
||||
<VersionInfo Name="IncludeVerInfo">True</VersionInfo>
|
||||
<VersionInfo Name="AutoIncBuild">False</VersionInfo>
|
||||
<VersionInfo Name="MajorVer">1</VersionInfo>
|
||||
<VersionInfo Name="MinorVer">0</VersionInfo>
|
||||
<VersionInfo Name="Release">0</VersionInfo>
|
||||
<VersionInfo Name="Build">0</VersionInfo>
|
||||
<VersionInfo Name="Debug">False</VersionInfo>
|
||||
<VersionInfo Name="PreRelease">False</VersionInfo>
|
||||
<VersionInfo Name="Special">False</VersionInfo>
|
||||
<VersionInfo Name="Private">False</VersionInfo>
|
||||
<VersionInfo Name="DLL">False</VersionInfo>
|
||||
<VersionInfo Name="Locale">1033</VersionInfo>
|
||||
<VersionInfo Name="CodePage">1252</VersionInfo>
|
||||
</VersionInfo>
|
||||
<VersionInfoKeys>
|
||||
<VersionInfoKeys Name="CompanyName"/>
|
||||
<VersionInfoKeys Name="FileDescription"/>
|
||||
<VersionInfoKeys Name="FileVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="InternalName"/>
|
||||
<VersionInfoKeys Name="LegalCopyright"/>
|
||||
<VersionInfoKeys Name="LegalTrademarks"/>
|
||||
<VersionInfoKeys Name="OriginalFilename"/>
|
||||
<VersionInfoKeys Name="ProductName"/>
|
||||
<VersionInfoKeys Name="ProductVersion">1.0.0.0</VersionInfoKeys>
|
||||
<VersionInfoKeys Name="Comments"/>
|
||||
</VersionInfoKeys>
|
||||
<Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\bcboffice2k170.bpl">Embarcadero C++Builder Office 2000 Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\bcbofficexp170.bpl">Embarcadero C++Builder Office XP Servers Package</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dcloffice2k170.bpl">Microsoft Office 2000 Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
<Excluded_Packages Name="$(BDSBIN)\dclofficexp170.bpl">Microsoft Office XP Sample Automation Server Wrapper Components</Excluded_Packages>
|
||||
</Excluded_Packages>
|
||||
</Delphi.Personality>
|
||||
<Platforms>
|
||||
<Platform value="OSX32">False</Platform>
|
||||
<Platform value="Win32">True</Platform>
|
||||
<Platform value="Win64">False</Platform>
|
||||
</Platforms>
|
||||
</BorlandProject>
|
||||
<ProjectFileVersion>12</ProjectFileVersion>
|
||||
</ProjectExtensions>
|
||||
<Import Condition="Exists('$(BDS)\Bin\CodeGear.Delphi.Targets')" Project="$(BDS)\Bin\CodeGear.Delphi.Targets"/>
|
||||
<Import Condition="Exists('$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj')" Project="$(APPDATA)\Embarcadero\$(BDSAPPDATABASEDIR)\$(PRODUCTVERSION)\UserTools.proj"/>
|
||||
</Project>
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,0
|
||||
PRODUCTVERSION 10,6,2,0
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.0\0"
|
||||
VALUE "InternalName", "IndySystem170\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem170.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 10,6,2,$WCREV$
|
||||
PRODUCTVERSION 10,6,2,$WCREV$
|
||||
FILEFLAGSMASK 0x3FL
|
||||
FILEFLAGS 0x00L
|
||||
FILEOS 0x40004L
|
||||
FILETYPE 0x1L
|
||||
FILESUBTYPE 0x0L
|
||||
{
|
||||
BLOCK "StringFileInfo"
|
||||
{
|
||||
BLOCK "000104E4"
|
||||
{
|
||||
VALUE "CompanyName", "Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "FileDescription", "Internet Direct (Indy) 10.6.2 - System Run-Time Package\0"
|
||||
VALUE "FileVersion", "10.6.2.$WCREV$\0"
|
||||
VALUE "InternalName", "IndySystem170\0"
|
||||
VALUE "LegalCopyright", "Copyright © 1993 - 2015 Chad Z. Hower a.k.a Kudzu and the Indy Pit Crew\0"
|
||||
VALUE "OriginalFilename", "IndySystem170.bpl\0"
|
||||
VALUE "ProductName", "Indy\0"
|
||||
VALUE "ProductVersion", "10.6.2\0"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
BLOCK "VarFileInfo"
|
||||
{
|
||||
VALUE "Translation", 0x0001, 1252
|
||||
}
|
||||
|
||||
}
|
||||
Binary file not shown.
@@ -0,0 +1,86 @@
|
||||
package IndySystem180;
|
||||
|
||||
{$R *.res}
|
||||
{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users}
|
||||
{$ALIGN 8}
|
||||
{$ASSERTIONS ON}
|
||||
{$BOOLEVAL OFF}
|
||||
{$DEBUGINFO ON}
|
||||
{$EXTENDEDSYNTAX ON}
|
||||
{$IMPORTEDDATA ON}
|
||||
{$IOCHECKS ON}
|
||||
{$LOCALSYMBOLS ON}
|
||||
{$LONGSTRINGS ON}
|
||||
{$OPENSTRINGS ON}
|
||||
{$OPTIMIZATION OFF}
|
||||
{$OVERFLOWCHECKS OFF}
|
||||
{$RANGECHECKS OFF}
|
||||
{$REFERENCEINFO ON}
|
||||
{$SAFEDIVIDE OFF}
|
||||
{$STACKFRAMES ON}
|
||||
{$TYPEDADDRESS OFF}
|
||||
{$VARSTRINGCHECKS ON}
|
||||
{$WRITEABLECONST OFF}
|
||||
{$MINENUMSIZE 1}
|
||||
{$IMAGEBASE $400000}
|
||||
{$DEFINE DEBUG}
|
||||
{$DEFINE VER250}
|
||||
{$ENDIF IMPLICITBUILDING}
|
||||
{$DESCRIPTION 'Indy 10 System'}
|
||||
{$RUNONLY}
|
||||
{$IMPLICITBUILD OFF}
|
||||
|
||||
// RLebeau: cannot use IdCompilerDefines.inc here!
|
||||
|
||||
{$DEFINE HAS_PKG_RTL}
|
||||
{$IFDEF NEXTGEN}
|
||||
{$IFDEF IOS}
|
||||
// there is no RTL package available for iOS
|
||||
{$UNDEF HAS_PKG_RTL}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
{$IFDEF HAS_PKG_RTL}
|
||||
requires
|
||||
rtl;
|
||||
{$ENDIF}
|
||||
|
||||
{$IFNDEF WINDOWS}
|
||||
{$IFDEF MSWINDOWS}
|
||||
{$DEFINE WINDOWS}
|
||||
{$ENDIF}
|
||||
{$ENDIF}
|
||||
|
||||
contains
|
||||
IdAntiFreezeBase in 'IdAntiFreezeBase.pas',
|
||||
IdBaseComponent in 'IdBaseComponent.pas',
|
||||
IdCTypes in 'IdCTypes.pas',
|
||||
IdComponent in 'IdComponent.pas',
|
||||
IdException in 'IdException.pas',
|
||||
IdGlobal in 'IdGlobal.pas',
|
||||
IdIDN in 'IdIDN.pas',
|
||||
IdResourceStrings in 'IdResourceStrings.pas',
|
||||
{$IFNDEF WINDOWS}
|
||||
IdResourceStringsUnix in 'IdResourceStringsUnix.pas',
|
||||
IdResourceStringsVCLPosix in 'IdResourceStringsVCLPosix.pas',
|
||||
{$ENDIF}
|
||||
IdStack in 'IdStack.pas',
|
||||
IdStackBSDBase in 'IdStackBSDBase.pas',
|
||||
IdStackConsts in 'IdStackConsts.pas',
|
||||
{$IFDEF WINDOWS}
|
||||
IdStackWindows in 'IdStackWindows.pas',
|
||||
{$ELSE}
|
||||
IdStackVCLPosix in 'IdStackVCLPosix.pas',
|
||||
{$ENDIF}
|
||||
IdStream in 'IdStream.pas',
|
||||
IdStreamVCL in 'IdStreamVCL.pas',
|
||||
IdStruct in 'IdStruct.pas',
|
||||
{$IFDEF WINDOWS}
|
||||
IdWinsock2 in 'IdWinsock2.pas',
|
||||
IdWship6 in 'IdWship6.pas'
|
||||
{$ELSE}
|
||||
IdVCLPosixSupplemental in 'IdVCLPosixSupplemental.pas'
|
||||
{$ENDIF}
|
||||
;
|
||||
|
||||
end.
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user