acp_db.c File : acp_db.c
Description : Holds the loaded ACP Modules
Category : ACP Internal
Author : Charles Yates
This structure holds the collection of loaded ACPRUN objects
and is indexed by the physical location of the script file
on the disk.
Good job that it's encapsulated ... needs a lot of rework.
ACPDB_Init ACPDB DLLEXP ACPDB_Init( )
Function : ACPDB_Init
Description : Creates an active C page database
Input : void
Output : void
Returns : ACPDB - an empty acp database
ACPDB_Get int DLLEXP ACPDB_Get( ACPDB db, ACPENV global, char *script, ACP acp )
Function : ACPDB_Get
Description : Checks or creates the active c page run object
Input : ACPDB db - database to query
ACPENV global - site properties environment to use
char *url - to locate
ACP acp - acp structure to use
Output : Updates the db if the url does not exist
Returns : int - 0 if successful
ACPDB_GetHandler int DLLEXP ACPDB_GetHandler( ACPDB db, ACPENV global, char *id, char *uri, char *current )
Function : ACPDB_GetHandler
Description : Informs the caller if the uri is handled by the ACPDB instance
Input : ACPDB db - database to query
ACPENV global - site properties environment to use
char *id - returns the id of the handler
char *uri - uri to check
char *current - avoid returning this script and pass next
Output : void
Returns : int - 0 indicates URL not supported
ACPDB_Execute int DLLEXP ACPDB_Execute( ACPDB db, ACPENV global, char *script, ACP acp )
Function : ACPDB_Execute
Description : Executes the acp specified in the url
Input : ACPDB db - database to query
ACPENV global - site properties environment to use
char *url - to locate
ACP acp - ACP structure to use
Output : Updates the db if the url does not exist
Returns : ACPRUN - acp run object
ACPDB_Close void DLLEXP ACPDB_Close( ACPDB db, ACP acp )
Function : ACPDB_Close
Description : Closes the database
Input : ACPDB db - acp database to use
Output : Everything associated to db is destroyed
Returns : void
|