Implement custom front calls

Implement front calls with a custom front call handler.

You may need to overload and provide your own implementation for most of the default front calls. These are some examples of those you may need to overload:
  • The default implementation of standard.getEnv("NAME") front call, will return the value of an environment variable, but this will apply to the GGC, for instance the BDL scenario server, if this was started. You will need to overload it to return the environment of the client.
  • standard.feInfo("numScreens" ) returns the number of screens the client is working with. By default 1 is returned, but clients may have 2 or 3 screens. Therefore, you may need to implement your own call and provide your own values to the front call.
Note: There are two internal BDL front calls provided for getFile and putFile by default. It is not expected that these will need to be overloaded.

To provide a custom front call implementation, you must:

  1. Implement a function of the FrontCallHandler prototype:
    PUBLIC TYPE FrontCallHandler FUNCTION(request FrontCallRequest INOUT) RETURNS FrontCallAnswer
    Where:
    • FrontCallHandler is the name of your custom function.
    • The parameter request of type ggc.FrontCallRequest is passed as a reference to the request information.
    • Values are returned in a record of type ggc.FrontCallAnswer.
    Note: For more information see the functions and record types defined in the ggc.4gl module source at FGLDIR/testing_utilities/ggc/src/ggclib.
  2. Register the function for callback with the call handler function.