Active C PagesTechnicalFAQDownloads

Home

ACP

Contact

Projects


Categories

[Index]

ACP Scripting
ACP Internal
ACP Container
Application
Web Internal
Web External
Utility

Files

acp_container.c
acp_in_container.c
acp_out_container.c

acp_container.c

   File         : acp_container.c
   Description  : ACP Container Development Functions
   Category     : ACP Container
   Author       : Charles Yates
  
   This source file and its header define the ACP Container functions. These
   functions allow a container to register callbacks and are distinct from the
   ACP Scripting functions which are for use in .acp scripts.

ACP_Init

   ACP DLLEXP ACP_Init( ACPDB db, ACPENV properties )
 
   Function     : ACP_Init
   Description  : Creates a new ACP structure
   Input        : ACPDB db - instance of an acp db
                  ACPENV properties - properties associated to the site
   Output       : void
   Returns      : An initialised ACP Structure

ACP_GetDb

   ACPDB DLLEXP ACP_GetDb( ACP acp )
 
   Function     : ACP_GetDb
   Description  : Gets the db entry in the ACP structure
   Input        : ACP acp - ACP structure to query
   Output       : void
   Returns      : The address of db in the ACP structure

ACP_SetCgiCreator

   void DLLEXP ACP_SetCgiCreator( ACP acp, ACP_CGI_CREATOR func )
 
   Function     : ACP_SetCgiCreator
   Description  : Sets the CGI environment builder
   Input        : ACP acp - ACP structure to update
                  ACP_CGI_CREATOR func - function to create the CGI environment
   Output       : Associates the ACP strcuture with the CGI environment creator
   Returns      : void

ACP_SetDataCourier

   void DLLEXP ACP_SetDataCourier( ACP acp, ACPDATA_SETTER setter, 
 
   Function     : ACP_SetDataCourier
   Description  : Sets the global data courier callbacks
   Input        : ACP acp - ACP structure to update
                  ACP_DATA_SETTER setter - setter function
                  ACP_DATA_SETTER getter - getter function
                  void *data - argument to pass back on getter/setter
   Output       : Associates the ACP strcuture with the data courier
   Returns      : void
   TODO         : Need global, server, session and request data couriers

ACP_SetShutdownCheck

   void DLLEXP ACP_SetShutdownCheck( ACP acp, int (*func)( void * ), void *arg )
 
   Function     : ACP_SetShutdownCheck
   Description  : Set the shutdown checking call back
   Input        : ACP acp - ACP structure to use
                  int (*func)(void *) - function to call back to
                  void *arg - argument to be received in callback
   Output       : acp is updated accordingly
   Returns      : void

ACP_SetUser

   void DLLEXP ACP_SetUser( ACP acp, void *user )
 
   Function     : ACP_SetUser
   Description  : Sets an unspecified user structure in the ACP structure.
   Input        : ACP acp - ACP structure to use
                  void *user - arbitrary pointer to be associated to ACP
   Output       : user value of ACP is updated
   Returns      : void

ACP_BypassNegotiation

   void DLLEXP ACP_BypassNegotiation( ACP acp )
 
   Function     : ACP_BypassNegotiation
   Description  : Allows a special case request to bypass the content negotiation
   Input        : ACP acp - ACP structure to use
   Output       : A subsequent Run on this acp will bypass the content negotiation
                  and deliver data as requested
   Returns      : void
   Comments     : This is really only of interest to the admin functionality

ACP_CanKeepalive

   int ACP_CanKeepalive( ACP acp )
 
   Function     : ACP_CanKeepalive
   Description  : After handling an HTTP request, this flag can be checked to
                  determine if keep alive functionality is valid on the incoming
                  stream.
   Input        : ACP acp - ACP structure to use
   Output       : void
   Returns      : int - 0 for no, != 0 for yes

ACP_Handle

   int ACP_Handle( ACP acp )
 
   Function     : ACP_Handle
   Description  : Handles an individual request
   Input        : ACP acp - acp instance to use
   Output       : acp is used to execute whatever the alternative*handler 
                  script MOD_Service call does
   Returns      : int - 0 indicates that no alternative is available
   Comments     :
  
   This function allows an ACP container to optionally support non-http requests
   specified by the alternative*handler environment variable.  The ACP struct 
   passed into alternative handling script carries no HTTP information. 

ACP_Close

   void DLLEXP ACP_Close( ACP acp )
 
   Function     : ACP_Close
   Description  : Closes the ACP structure given
   Input        : ACP acp - ACP structure to close
   Output       : The acp strcuture is destroyed
   Returns      : void