hello.
To maintainer of Indy please notice that the package do not compile on lazarus 2.0.6 fpc 3.0.4 due to a missing or errors in some units.
unit IdGlobalProtocols missing :
uses
Classes,
{$IFDEF WINDOWS}
Windows,
{$ENDIF}
IdCharsets,
IdBaseComponent,
IdGlobal,
IdException,
SysUtils
{$IFDEF FPC}, dateutils {$ENDIF}; // added by me.
unit IdIMAPServer line 705
function TIdIMAP4Server.MessageSetToMessageNumbers(AUseUID: Boolean; ASender: TIdCommand;
AMessageNumbers: TStrings; AMessageSet: string): Boolean;
{AMessageNumbers may be '7' or maybe '2:4' (2, 3 & 4) or maybe '2,4,6' (2, 4 & 6)
or maybe '1:*'}
var
LPos: integer;
LStart: Int64;
LN: {$IFDEF FPC} LongInt {$ELSE} Int64 {$ENDIF}; // added by ME
LEnd: Int64;
LTemp: string;
LContext: TIdIMAP4PeerContext;
begin
LContext := TIdIMAP4PeerContext(ASender.Context);
AMessageNumbers.BeginUpdate;
try
AMessageNumbers.Clear;
//See is it a sequence like 2:4 ...
LPos := IndyPos(':', AMessageSet); {Do not Localize}
if LPos > 0 then begin
LTemp := Copy(AMessageSet, 1, LPos-1);
LStart := IndyStrToInt64(LTemp);
LTemp := Copy(AMessageSet, LPos+1, MAXINT);
if LTemp = '*' then begin {Do not Localize}
if AUseUID then begin
LEnd := IndyStrToInt64(LContext.MailBox.UIDNext)-1;
end else begin
LEnd := LContext.MailBox.MessageList.Count;
end;
end else begin
LEnd := IndyStrToInt64(LTemp);
end;
for LN := LStart to LEnd do begin
AMessageNumbers.Add(IntToStr(LN));
end;
end else begin
// .....
Thanks you !!