  THeoWestraDataPumpFileThread = class(TThread)
   private
    FMainService: TService;
    FLock: TCriticalSection;
    FTermEvent: TEvent;
    FRunning: boolean;
    FTimer: THandle;
   protected
    procedure Execute; override;
    procedure TerminatedSet; override; // XE2+ only *
   public
    constructor Create (AOnTerminate: TNotifyEvent; AService: TService);
    destructor  Destroy; override;
    procedure ThreadTerminate;
  end;


  TQTXNetworkPath = class(TObject)
   private
    FHostName:    String;
    FRemotePath:  String;
    FUser:        String;
    FPassword:    String;
    FConnected:   Boolean;
    FOwned:       Boolean;
    FLastError:   String;
    FFailed:      Boolean;
    FUNCData:     packed array[0..4096] of char;
    FURI:         String;
   protected
    procedure     ClearLastError;
    procedure     setLastError (aValue:String);
   public
    property      Active:Boolean read FConnected;
    property      HostName:String read FHostName;
    property      NetworkPath:String read FRemotePath;
    property      LastError:String read FLastError;
    property      Failed:Boolean read FFailed;
 
    function      getRelativePath (aFilename:String): string;
 
    function      Connect (aHostName:String;
                           aNetworkPath:String;
                           const aUsername:String='';
                           const aPassword:String=''): boolean;
    procedure     Disconnect (const aForce:Boolean=False);
    destructor    Destroy;override;
  end;
