Multi-informatica
 

 

Products

 

Resources

 

 

Gp Basics

Basically, gp units, provide a render html engine for construction of dynamic complex HTML pages. With extension to handle remote control commands. The basic element for rendering Html is THtm.

Some of html codes are coded like enum. types.

For example, html tags like <td>, <text> , <script> are using like a enum. type called TlinkTag, for convention this typed are building with the originiar html tag word with 'LT' added in the begin,  (example  TABLE tag is called ltTable by Gp engine).

tlinkTag = (ltnone, ltpp, lttd, ltth_, lttr, ltop, ltul, ltli ,ltbb, ltcap, lttable_, ltform, ltselect, lttextarea, lthtml, lthead, lttitle, ltbody, ltframeset, ltscript, ltText, ltinput, ltButton, ltspan, ltoptio, ltdiv, ltimg, ltaa);
( note : some tags with only one char, like <a> or <b> are coded like ltaa and ltbb ).

Some params 'size', 'border', 'VALIGN', 'bgcolor', 'name', 'method', 'action', 'width', 'value', 'align', 'type' have a integer representation.

Because is multilingual, some words or expression, are coded  in integer constant  too.

The key component is TgpServer which encapsulate  the kernel for build dynamic pages, answer to normal 'string like' http commands in different ways (but web compatible) , handle the list of thread process which answer to the system, have the list of posible actions... and much more.

tGpServer handle a list of tspyce components which provide the specific remote actions (like mouse movement, clicks, file support, handle process, ...) . Then, each group of web commands asociated to each action are encapsulated in a tGpServerce descendant.

Both tGpServer and tGpServerce are

For example, the file handle actions is encapsulated in TSpyceInspect component, or remote screen control in tSpyceScreen. Each other features have their tGpServerce class : TGpPasswords for login actions, tspyceSpice for automatic translation of delphi form to html forms ( so you can reuse old delphi form code by making it web accesible), tMiMenu for menu features.

tGpServer handle a list of users too. Each user is asociated to a Tuser class, which handle the specific info for each session, for example the screensession. This way the screen control can be made by more than one user. About the remote screen control, Gp have embeded a java applet which is downloaded in the client machine, Gp send only the bmp pieces of screen which changes. ( so it have a 'memory' for each session which remain the client image, for sending only the changes).

That is, encapsulate all the features of a  remote control web server  but without real connections. Then, you can use tGpServerPrimo in your system (because it not interferes with your communication system). In this way  , I develop 3 extension for tGpServerPrimo.

TgranPrimo which is a stand-alone HTTP TCP/IP  server ( extend TcustomGranPrimo)

TGpIndy which is a Indy adaptation (extend TidhttpServer)

Gp for Intraweb which is a IntraWeb component extension.

Threre is other important common used classes .

TResponserequest which is similar to encapsulate the TIdHTTPRequestInfo and TIdHTTPResponseInfo functionally , and use TgpHtml streams for handle responses.

Is the more common structure passed in spyobjects library call

Another important classes are TmiWebActionItem and TGpWebActions that encapsulate the commands path recognition and add new commands handlers.

( There is some example of how to use TmiResponserequest  and TmiWebActionItem in aliasweb.pas unit.)

Finally there is a base thread class TgpThread which provide a manage thread function in a threadlist TmiThreadList where is inserted all the TgpThread descendant.

The TgpThread descendant are process that work in different threads. Basically, in Tgranprimo component there is several communication TgpThread extensions: Listener threads for incoming connections, Answer threads for process the answer to this connections, Clients or Host threads for not keep-alive connections between different Gp systems, sending e-mail connections...

 

 

core Components  
TgpIndySSL Indy server with remote control purposes in SSL mode. is a new class to handle both https and http connections at same time.
TGranprimo Hi level spy component with full HTTP connections purposes.

 

Classes Description
TGpPasswords To support and handle passwords restrictions for different levels of connections

 

Tspy Tspy is the Tkspy descendant that serve as parent of the other spyce objects
   
tgpBase

Base of all gp components.

TgpComponent Provide base functions and template definitions
TSpyce provide base class for all the spy elements used in tgpServer.
Encapsulate concrete remote control features.
TSpyceScreen Basic object to handle screen remote control.
TSpyceFiles Gp object for remote file handle purposes.
TSpyceInspect Spyce descendant for handle objects inpector properties feature.
TgpCaplture for offline screen capture.
TSpyceSpice For automatic translation of delphi form to html forms.
tMiMenu  
   

 

TGpIndyServer = class (TIdTCPServer) Base class of all gpindy servers
public      
  function DoExecute(AThread: contextoIndy): Boolean Execute the action asociated with thread overriding TidTCPServer method
  procedure runBrowser_ run in the browser
  procedure DoCommandGet (AThread: contextoIndy; rere: TresponRequest); get the result
  property DefaultPort inherited from TidTCPServer
  property OnCommandGet: TIdHTTPGetEvent to extend the get response feature
  property
granprimo :TSpy link to gp system
end;      

 

TGpIndy = class (TGpIndyServer) indy Server with self contained remote functions
public      
  property
gp :TGranprimoOthers self contained Tspy service.
  property active : boolean Is the server active ?
end;      

 

TChildIndyServer = class (TGpIndyServer) indy Server which actue as child of other component.
public      
end;      

TGpIndySSL = class (TcustomGranprimo) gp component with full ssl and normal support.
public      
  Procedure

addMenuMain (const titulo,subtitulo,detalle:string);

Add a new entry in menu.
  function getVirtualPort :integer; optain the 'virtual' listen port
  function GetLocalAddr: TStringlist; optain the local ip interface address.
  function

sendafile ( th:TmiInfileThread; const remotedir,namefile:string):boolean;

splicit send file to remote connection
  function MakeSpyce (AClass: TPersistentClass):Tspyce; create a child spyce class
  procedure MakeRegisterSpyce (const AClasses: array of TPersistentClass); create the array of spyce classes
  function addaction (const paction:string; ev:TGranPrimoEvent; spice:Tkspy):TmiWebAction; add a new action to the response engine.
Create a new TmiWebAction item with pathinfo=paction and onaction=ev
  procedure

procedure LogAuto;

procedure to add action to can be handled by Gp
public      
  property Active: boolean Active or desactive the listen socket.
  property serverNormal : TChildIndyServer Child server for normal connection
  property serverSSL : TChildIndyServer Child server for SSL connection
  property IdServerIOHandlerSSL : tmiServerIOHandlerSSL Component to do the ssl filter
  property FclassProxy: TGpIndyServerClass; class of proxy server generated in a client connection.
  property modoServer : tmodoserver Indicate the mode (which servers will be open)
end;      

 

 

Classes Description
   
   
THtmlDoc TspyHtml extension to handle HTML doc, specially head tag
thtmlForm To handle html forms tags <form>
THtmlImage To handle Image tag <img>
THtmlTable To handle html <table> tag
   
TmiThreadList List of active threads
TmiWebAction Web action Item.
TResponRequest encapsulate all the HTML request and response information Is the more common structure passed in spyobjects library call
THtm HTML render engine.
   
TGpWebActions collection of TmiWebAction items
TInspectItem Item Nodes of TfileCollection
TObjectCollection  

TfileCollec

TfileCollec = class (TCollection)

Collection tree of directory and files

TFileItem

TFileItem = class(TCollectionItem)

Item Nodes of n
TListObjetos Tstring list refresentation of a tree of objects.

 

Enumeration Description
TipoClient

kind of spy threads

Value Description
gpUnknow  
ghost normal thread for handle incomming request
gclientpasive thread which connect with other Gp system in pasive
gclientactive thread which connect with other Gp system in active
ghuespedProxy thread which keep connection as host with the remote client
gHuespeddirect thread which keep connection as host with the remote client
girclisten Thread that keep connection with a IRC server
glistener main listening thread for host purposes
gProxyListener Thread for listening bridge connections
gproxy thread to handle the bridge request
goffline thread for handle off-line features
gcreateform internal thread for sincronize form creations
gsmtp thread to connect smtp system
gmapi thread to handle mapi connections to send e-mails
gpgetfile  
ganswer thread to handle request to host

 

 

tlinkTag Some of html codes are coded like enum types
TSpyFuncion

kind of the main function to make by spy object

Enumeration Description
sCPUMachine Remote system information
sfLocalNet Local net Information
sfHelp  
sffiles driver, folder and files tree,
streeObject remote object tree list
sedobject Remote object Inspector
sfseescreen static remote screen image. You can do mouse clicks ,
sdemo demo function for show purposes
sjprimo Remote desktop.access by java applet
sspice instant translation delphi to web
slistthread list of active threads
suploadfile upload function to dir
   

 

 

 

 

   

Teléfono: 978-610539 - Fax: 978-610861 -Trav.Agustina Aragón 1,1e 44002 Teruel ( España ).webmaster

Copyright © 1997-2004 , [Multi-Informatica Teruel, S.L].La información contenida en este documento está sujeta a modificaciones sin previo aviso. Otros productos u organizaciones mencionadas aquí son marcas comerciales o marcas registradas propiedad de sus respectivas organizaciones o propietarios.

  Zapatec