IdDayTime.pas 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {
  2. $Project$
  3. $Workfile$
  4. $Revision$
  5. $DateUTC$
  6. $Id$
  7. This file is part of the Indy (Internet Direct) project, and is offered
  8. under the dual-licensing agreement described on the Indy website.
  9. (http://www.indyproject.org/)
  10. Copyright:
  11. (c) 1993-2005, Chad Z. Hower and the Indy Pit Crew. All rights reserved.
  12. }
  13. {
  14. $Log$
  15. }
  16. {
  17. Rev 1.3 1/21/2004 2:12:40 PM JPMugaas
  18. InitComponent
  19. Rev 1.2 12/8/2002 07:26:30 PM JPMugaas
  20. Added published host and port properties.
  21. Rev 1.1 12/6/2002 05:29:28 PM JPMugaas
  22. Now decend from TIdTCPClientCustom instead of TIdTCPClient.
  23. Rev 1.0 11/14/2002 02:17:02 PM JPMugaas
  24. 2000-April-30 J. Peter Mugaas
  25. changed to drop control charactors and spaces from result to ease
  26. parsing
  27. }
  28. unit IdDayTime;
  29. {*******************************************************}
  30. { }
  31. { Indy QUOTD Client TIdDayTime }
  32. { }
  33. { Copyright (C) 2000 Winshoes WOrking Group }
  34. { Started by J. Peter Mugaas }
  35. { 2000-April-23 }
  36. { }
  37. {*******************************************************}
  38. interface
  39. {$i IdCompilerDefines.inc}
  40. uses
  41. IdAssignedNumbers,
  42. IdTCPClient;
  43. type
  44. TIdDayTime = class(TIdTCPClientCustom)
  45. protected
  46. Function GetDayTimeStr : String;
  47. procedure InitComponent; override;
  48. public
  49. Property DayTimeStr : String read GetDayTimeStr;
  50. published
  51. property Port default IdPORT_DAYTIME;
  52. property Host;
  53. end;
  54. implementation
  55. uses
  56. IdGlobal, SysUtils;
  57. { TIdDayTime }
  58. procedure TIdDayTime.InitComponent;
  59. begin
  60. inherited InitComponent;
  61. Port := IdPORT_DAYTIME;
  62. end;
  63. function TIdDayTime.GetDayTimeStr: String;
  64. begin
  65. Result := Trim ( ConnectAndGetAll );
  66. end;
  67. end.