Changeset 151 for trunk/Packages/CoolWeb


Ignore:
Timestamp:
Feb 4, 2024, 3:53:52 PM (11 months ago)
Author:
chronos
Message:
Location:
trunk/Packages/CoolWeb
Files:
3 edited
22 moved

Legend:

Unmodified
Added
Removed
  • trunk/Packages/CoolWeb/Common/HtmlClasses.pas

    r150 r151  
    1 unit UHtmlClasses;
     1unit HtmlClasses;
    22
    33interface
    44
    55uses
    6   UXmlClasses, Classes, SysUtils, Generics.Collections, Generics, UIpAddress;
     6  XmlClasses, Classes, SysUtils, Generics.Collections, Generics, IpAddress;
    77
    88type
     
    742742procedure TQueryString.SetStringServer;
    743743begin
    744   //$this->SetString($_SERVER['QUERY_STRING']);
     744  // SetString($_SERVER['QUERY_STRING']);
    745745end;
    746746
     
    762762function TQueryString.GetString: string;
    763763begin
    764   (*$Parts = array();
     764  (*
     765  Parts = array();
    765766  foreach($this->Data as $Index => $Item)
    766767  {
  • trunk/Packages/CoolWeb/Common/IpAddress.pas

    r150 r151  
    1 unit UIpAddress;
     1unit IpAddress;
    22
    33interface
  • trunk/Packages/CoolWeb/Common/MIMEType.pas

    r150 r151  
    1 unit UMIMEType;
     1unit MIMEType;
    22
    33interface
  • trunk/Packages/CoolWeb/Common/MemoryStreamEx.pas

    r150 r151  
    1 unit UMemoryStreamEx;
     1unit MemoryStreamEx;
    22
    33interface
     
    2323    procedure WriteString(Data: string);
    2424    procedure WriteShortString(Data: ShortString);
    25     procedure WriteAnsiString(Data: string);
     25    procedure WriteAnsiString(const Data: string); override;
    2626    procedure WriteUnixTime(Data: TDateTime);
    2727    procedure WriteDouble(Value: Double);
     
    234234end;
    235235
    236 procedure TMemoryStreamEx.WriteAnsiString(Data: string);
     236procedure TMemoryStreamEx.WriteAnsiString(const Data: string);
    237237var
    238238  StringLength: Longint;
  • trunk/Packages/CoolWeb/Common/XmlClasses.pas

    r150 r151  
    1 unit UXmlClasses;
     1unit XmlClasses;
    22
    33interface
  • trunk/Packages/CoolWeb/CoolWeb.lpk

    r138 r151  
    4242    <Files Count="19">
    4343      <Item1>
    44         <Filename Value="WebServer/UHTTPServer.pas"/>
    45         <UnitName Value="UHTTPServer"/>
     44        <Filename Value="WebServer/HTTPServer.pas"/>
     45        <UnitName Value="HTTPServer"/>
    4646      </Item1>
    4747      <Item2>
    48         <Filename Value="WebServer/UHTTPServerCGI.pas"/>
     48        <Filename Value="WebServer/HTTPServerCGI.pas"/>
    4949        <HasRegisterProc Value="True"/>
    50         <UnitName Value="UHTTPServerCGI"/>
     50        <UnitName Value="HTTPServerCGI"/>
    5151      </Item2>
    5252      <Item3>
    53         <Filename Value="WebServer/UHTTPServerTCP.pas"/>
     53        <Filename Value="WebServer/HTTPServerTCP.pas"/>
    5454        <HasRegisterProc Value="True"/>
    55         <UnitName Value="UHTTPServerTCP"/>
     55        <UnitName Value="HTTPServerTCP"/>
    5656      </Item3>
    5757      <Item4>
    58         <Filename Value="WebServer/UHTTPServerTurboPower.pas"/>
    59         <UnitName Value="UHTTPServerTurboPower"/>
     58        <Filename Value="WebServer/HTTPServerTurboPower.pas"/>
     59        <UnitName Value="HTTPServerTurboPower"/>
    6060      </Item4>
    6161      <Item5>
    62         <Filename Value="WebServer/UTurboPowerForm.pas"/>
    63         <UnitName Value="UTurboPowerForm"/>
     62        <Filename Value="WebServer/TurboPowerForm.pas"/>
     63        <UnitName Value="TurboPowerForm"/>
    6464      </Item5>
    6565      <Item6>
    66         <Filename Value="WebServer/UHTTPSessionFile.pas"/>
     66        <Filename Value="WebServer/HTTPSessionFile.pas"/>
    6767        <HasRegisterProc Value="True"/>
    68         <UnitName Value="UHTTPSessionFile"/>
     68        <UnitName Value="HTTPSessionFile"/>
    6969      </Item6>
    7070      <Item7>
    71         <Filename Value="WebServer/UHTTPSessionMySQL.pas"/>
     71        <Filename Value="WebServer/HTTPSessionMySQL.pas"/>
    7272        <HasRegisterProc Value="True"/>
    73         <UnitName Value="UHTTPSessionMySQL"/>
     73        <UnitName Value="HTTPSessionMySQL"/>
    7474      </Item7>
    7575      <Item8>
    76         <Filename Value="Persistence/USqlDatabase.pas"/>
     76        <Filename Value="Persistence/SqlDatabase.pas"/>
    7777        <HasRegisterProc Value="True"/>
    78         <UnitName Value="USqlDatabase"/>
     78        <UnitName Value="SqlDatabase"/>
    7979      </Item8>
    8080      <Item9>
    81         <Filename Value="Network/UTCPServer.pas"/>
    82         <UnitName Value="UTCPServer"/>
     81        <Filename Value="Network/TCPServer.pas"/>
     82        <UnitName Value="TCPServer"/>
    8383      </Item9>
    8484      <Item10>
    85         <Filename Value="Modules/UPageList.pas"/>
    86         <UnitName Value="UPageList"/>
     85        <Filename Value="Modules/PageList.pas"/>
     86        <UnitName Value="PageList"/>
    8787      </Item10>
    8888      <Item11>
    89         <Filename Value="Common/UHtmlClasses.pas"/>
    90         <UnitName Value="UHtmlClasses"/>
     89        <Filename Value="Common/HtmlClasses.pas"/>
     90        <UnitName Value="HtmlClasses"/>
    9191      </Item11>
    9292      <Item12>
    93         <Filename Value="Common/UMemoryStreamEx.pas"/>
    94         <UnitName Value="UMemoryStreamEx"/>
     93        <Filename Value="Common/MemoryStreamEx.pas"/>
     94        <UnitName Value="MemoryStreamEx"/>
    9595      </Item12>
    9696      <Item13>
    97         <Filename Value="Common/UMIMEType.pas"/>
    98         <UnitName Value="UMIMEType"/>
     97        <Filename Value="Common/MIMEType.pas"/>
     98        <UnitName Value="MIMEType"/>
    9999      </Item13>
    100100      <Item14>
    101         <Filename Value="Common/UXmlClasses.pas"/>
    102         <UnitName Value="UXmlClasses"/>
     101        <Filename Value="Common/XmlClasses.pas"/>
     102        <UnitName Value="XmlClasses"/>
    103103      </Item14>
    104104      <Item15>
    105         <Filename Value="WebServer/UWebPage.pas"/>
     105        <Filename Value="WebServer/WebPage.pas"/>
    106106        <HasRegisterProc Value="True"/>
    107         <UnitName Value="UWebPage"/>
     107        <UnitName Value="WebPage"/>
    108108      </Item15>
    109109      <Item16>
    110         <Filename Value="WebServer/UWebApp.pas"/>
     110        <Filename Value="WebServer/WebApp.pas"/>
    111111        <HasRegisterProc Value="True"/>
    112         <UnitName Value="UWebApp"/>
     112        <UnitName Value="WebApp"/>
    113113      </Item16>
    114114      <Item17>
     
    118118      </Item17>
    119119      <Item18>
    120         <Filename Value="Modules/UWebUser.pas"/>
    121         <UnitName Value="UWebUser"/>
     120        <Filename Value="Modules/WebUser.pas"/>
     121        <UnitName Value="WebUser"/>
    122122      </Item18>
    123123      <Item19>
    124         <Filename Value="Common/UIpAddress.pas"/>
    125         <UnitName Value="UIpAddress"/>
     124        <Filename Value="Common/IpAddress.pas"/>
     125        <UnitName Value="IpAddress"/>
    126126      </Item19>
    127127    </Files>
  • trunk/Packages/CoolWeb/CoolWeb.pas

    r138 r151  
    99
    1010uses
    11   UHTTPServer, UHTTPServerCGI, UHTTPServerTCP, UHTTPServerTurboPower,
    12   UTurboPowerForm, UHTTPSessionFile, UHTTPSessionMySQL, USqlDatabase,
    13   UTCPServer, UPageList, UHtmlClasses, UMemoryStreamEx, UMIMEType,
    14   UXmlClasses, UWebPage, UWebApp, LazIDEReg, UWebUser, UIpAddress,
    15   LazarusPackageIntf;
     11  HTTPServer, HTTPServerCGI, HTTPServerTCP, HTTPServerTurboPower,
     12  TurboPowerForm, HTTPSessionFile, HTTPSessionMySQL, SqlDatabase, TCPServer,
     13  PageList, HtmlClasses, MemoryStreamEx, MIMEType, XmlClasses, WebPage,
     14  WebApp, LazIDEReg, WebUser, IpAddress, LazarusPackageIntf;
    1615
    1716implementation
     
    1918procedure Register;
    2019begin
    21   RegisterUnit('UHTTPServerCGI', @UHTTPServerCGI.Register);
    22   RegisterUnit('UHTTPServerTCP', @UHTTPServerTCP.Register);
    23   RegisterUnit('UHTTPSessionFile', @UHTTPSessionFile.Register);
    24   RegisterUnit('UHTTPSessionMySQL', @UHTTPSessionMySQL.Register);
    25   RegisterUnit('USqlDatabase', @USqlDatabase.Register);
    26   RegisterUnit('UWebPage', @UWebPage.Register);
    27   RegisterUnit('UWebApp', @UWebApp.Register);
     20  RegisterUnit('HTTPServerCGI', @HTTPServerCGI.Register);
     21  RegisterUnit('HTTPServerTCP', @HTTPServerTCP.Register);
     22  RegisterUnit('HTTPSessionFile', @HTTPSessionFile.Register);
     23  RegisterUnit('HTTPSessionMySQL', @HTTPSessionMySQL.Register);
     24  RegisterUnit('SqlDatabase', @SqlDatabase.Register);
     25  RegisterUnit('WebPage', @WebPage.Register);
     26  RegisterUnit('WebApp', @WebApp.Register);
    2827  RegisterUnit('LazIDEReg', @LazIDEReg.Register);
    2928end;
  • trunk/Packages/CoolWeb/LazIDEReg.pas

    r149 r151  
    44
    55uses
    6   Classes, SysUtils, LazIDEIntf, ProjectIntf, FormEditingIntf, UWebPage, Forms,
     6  Classes, SysUtils, LazIDEIntf, ProjectIntf, FormEditingIntf, WebPage, Forms,
    77  Controls;
    88
  • trunk/Packages/CoolWeb/Modules/PageList.pas

    r150 r151  
    1 unit UPageList;
     1unit PageList;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UHtmlClasses;
     6  Classes, SysUtils, HtmlClasses;
    77
    88type
  • trunk/Packages/CoolWeb/Modules/WebUser.pas

    r150 r151  
    1 unit UWebUser;
     1unit WebUser;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, synacode, USqlDatabase, Common, UHTTPServer, Generics;
     6  Classes, SysUtils, synacode, SqlDatabase, Common, HTTPServer, Generics;
    77
    88const
  • trunk/Packages/CoolWeb/Network/TCPServer.pas

    r150 r151  
    1 unit UTCPServer;
     1unit TCPServer;
    22
    33interface
  • trunk/Packages/CoolWeb/Persistence/SqlDatabase.pas

    r150 r151  
    1 unit USqlDatabase;
     1unit SqlDatabase;
    22
    33// Modified: 2022-09-08
     
    206206  DbNames: string;
    207207  DbValues: string;
    208   I: Integer;
    209208  Value: string;
    210209  DbResult: TDbRows;
     
    272271  DbValues: string;
    273272  Value: string;
    274   I: Integer;
    275273  DbResult: TDbRows;
    276274  Item: TPair<string, string>;
     
    313311  DbValues: string;
    314312  Value: string;
    315   I: Integer;
    316313  DbResult: TDbRows;
    317314  Item: TPair<string, string>;
  • trunk/Packages/CoolWeb/WebServer/HTTPServer.pas

    r150 r151  
    1 unit UHTTPServer;
     1unit HTTPServer;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, Common, UMemoryStreamEx, UMIMEType, Synautil, Syncobjs,
     6  Classes, SysUtils, Common, MemoryStreamEx, MIMEType, Synautil, Syncobjs,
    77  Generics.Collections, Generics;
    88
     
    7777
    7878  TRequestHandlerList = class(TObjectList<TRequestHandler>)
    79     procedure Add(AName: string; AHandler: TRequestEvent);
     79    function AddNew(AName: string; AHandler: TRequestEvent): TRequestHandler;
    8080    function IndexOfName(AName: string): TRequestHandler;
    8181  end;
     
    279279{ TRequestHandlerList }
    280280
    281 procedure TRequestHandlerList.Add(AName: string; AHandler: TRequestEvent);
    282 begin
    283   with TRequestHandler(Items[inherited Add(TRequestHandler.Create)]) do begin
    284     Name := AName;
    285     Handler := AHandler;
    286   end;
     281function TRequestHandlerList.AddNew(AName: string; AHandler: TRequestEvent): TRequestHandler;
     282begin
     283  Result := TRequestHandler.Create;
     284  Result.Name := AName;
     285  Result.Handler := AHandler;
     286  Add(Result);
    287287end;
    288288
  • trunk/Packages/CoolWeb/WebServer/HTTPServerCGI.pas

    r150 r151  
    1 unit UHTTPServerCGI;
     1unit HTTPServerCGI;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UHTTPServer, IOStream, Generics.Collections;
     6  Classes, SysUtils, HTTPServer, IOStream, Generics.Collections;
    77
    88type
  • trunk/Packages/CoolWeb/WebServer/HTTPServerTCP.pas

    r150 r151  
    1 unit UHTTPServerTCP;
     1unit HTTPServerTCP;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UHTTPServer, UTCPServer, SynaUtil, Generics.Collections,
     6  Classes, SysUtils, HTTPServer, TCPServer, SynaUtil, Generics.Collections,
    77  Generics;
    88
  • trunk/Packages/CoolWeb/WebServer/HTTPServerTurboPower.pas

    r150 r151  
    1 unit UHTTPServerTurboPower;
     1unit HTTPServerTurboPower;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, Forms, UHTTPServer, IpHtml;
     6  Classes, SysUtils, Forms, HTTPServer, IpHtml;
    77
    88type
     
    2323
    2424uses
    25   UTurboPowerForm;
     25  TurboPowerForm;
    2626
    2727procedure Register;
  • trunk/Packages/CoolWeb/WebServer/HTTPSessionFile.pas

    r150 r151  
    1 unit UHTTPSessionFile;
     1unit HTTPSessionFile;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UHTTPServer, syncobjs, synacode, Common, FileUtil,
     6  Classes, SysUtils, HTTPServer, syncobjs, synacode, Common, FileUtil,
    77  LazFileUtils;
    88
  • trunk/Packages/CoolWeb/WebServer/HTTPSessionMySQL.pas

    r150 r151  
    1 unit UHTTPSessionMySQL;
     1unit HTTPSessionMySQL;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UHTTPServer, syncobjs, synacode, Common, USqlDatabase;
     6  Classes, SysUtils, HTTPServer, syncobjs, synacode, Common, SqlDatabase;
    77
    88type
  • trunk/Packages/CoolWeb/WebServer/TurboPowerForm.pas

    r150 r151  
    1 unit UTurboPowerForm;
     1unit TurboPowerForm;
    22
    33interface
  • trunk/Packages/CoolWeb/WebServer/WebApp.pas

    r150 r151  
    1 unit UWebApp;
     1unit WebApp;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UWebPage, UHTTPSessionFile, UHTTPServer, Forms, FileUtil,
     6  Classes, SysUtils, WebPage, HTTPSessionFile, HTTPServer, Forms, FileUtil,
    77  Generics.Collections;
    88
     
    6060
    6161uses
    62   UHTTPServerCGI, UHTTPServerTCP, UHTTPServerTurboPower;
     62  HTTPServerCGI, HTTPServerTCP, HTTPServerTurboPower;
    6363
    6464procedure Register;
  • trunk/Packages/CoolWeb/WebServer/WebPage.pas

    r150 r151  
    1 unit UWebPage;
     1unit WebPage;
    22
    33interface
    44
    55uses
    6   Classes, SysUtils, UHTTPServer, Controls;
     6  Classes, SysUtils, HTTPServer, Controls;
    77
    88type
Note: See TracChangeset for help on using the changeset viewer.