Release Date: Tuesday, October 14, 1997
Expires no later than: December 31, 1997
Important: THIS DOCUMENTATION IS INCOMPLETE AND PROBABLY A BIT INACCURATE
It is subject to change as the API matures.
Feedback and contributions are encouraged:
Be aware that any of the functions which return a CGIErr may return
CGIErr_Unimplemented if the function has not been implemented for the
type of plug-in or application you are compiling (e.g., some services
are only available to plug-ins, or specific types of plug-ins, while
others may be only available to CGIs).
CGIErr CGIFormFieldsFromArgs ( APIData apidata, char *theString, UInt32 *count, CGIFormField **outFields )
The separator '&' separates individual fields. The delimiter '=' delimits the name and value in a field. For example: "Field 1=some stuff&Another Field=more stuff&Last Field=no stuff" Means that there are 3 fields with names "Field 1", "Another Field" and "Last Field"
CGIFormField * CGIFormFieldsFindRecord ( CGIFormField *fieldArray, const char *fieldName )
Returns a pointer to the first form field record, in the given fieldArray, that's name matches the supplied field name.
const char * CGIFormFieldsFindValue ( CGIFormField *fieldArray, const char *fieldName )
Returns a pointer to the string containing the value from the field specified by 'fieldName'. Returns a pointer to a null string ("") if the field is not found. The pointer points directly into the form fields array in apidata.
Important: Whatever you do - do not attempt to deallocate the string returned by this function!!!
void CGIFormFieldsDispose ( APIData apidata, CGIFormField *theFields )
Deallocate memory for theFields array.
Boolean CGIActionIsCGIorACGI ( APIData apidata )
Returns true if the action parameter is either CGI or ACGI.
Returns false if it is some other action.
Boolean CGIHostNameDifferent ( APIData apidata, char *theHostName, short hostNameLength )
Check to see if the client accessed the server with the correct host name. This is only useful for browsers that include the "Host:" field in their HTTP request. If no host field is found, (or if the server did not supply the full_request data) this function will default to returning false (no difference).
CGIErr CGIValidateUser ( APIData apidata, const char *name, const char *password, const char *realm )
Validate whether or not a specific user should be allowed access based on the server application's security realms.
Returns nil if user is validated.
Note: when compiled as a wsapi plug-in, this function may return WSAPI_E_MessageNotHandled if the server is using an external security validator, such as a security plug-in.
char * CGIEncodeURLChars ( APIData apidata, const char *theString, OSErr *outErr )
%hex encode all non-alphanumeric characters. IE. '~' (126) becomes '%7E'.
Returns NULL if unable to allocate memory for the encoded string.
CGIErr CGIPassAppleEvent ( APIData apidata, OSType destinationOSCreator )