Defining properties

Use this procedure to define the properties for a custom server. Depending on whether the main() function will be system-generated or coded by you, you use the Blueworx Voice Response windows to specify one of the following sets of properties:

System-generated main()

User-generated main()

main() arguments

Compile flags

Object files

Link flags

Global declarations

Include files

main() arguments

Compile flags

Object files

Link flags

  1. From the Welcome window, select Applications —> Custom Servers
  2. Open the custom server: Open the custom server for which you want to define main() function properties. The system displays the Custom Server window for the selected custom server.
  3. Display Properties window: Click File —> Properties. The system displays the Properties window (see Figure 1). If you are creating a system-generated main() function, the window displays six panes; if you are coding the main() function yourself, the window displays four panes.
    Figure 1. Custom Server Properties window
    This is an example Custom Server Properties window.
  4. In each pane of this window, type the appropriate information, as follows:
    main() args
    The main() arguments are the input parameters required by the main() function. The arguments you type in this window are passed to the custom server when it is started from the Custom Server Manager window.

    When you specify arguments, do not insert a blank character between the flag and the data. For example, to use the -f flag with the data filename, specify it like this:

    -ffilename
    Compile Flags
    The compile flags provide the options for compiling the custom server during the build process.
    Syntax
    The compile flags are specified as described in the AIX Commands Reference. For example:

    -g (compiles with the debug option)

    -O (compiles with optimization)

    If you want Blueworx Voice Response to generate ANSI function prototypes for your user functions, set the flag -D DT_PROTO. This option, together with other appropriate options, is set automatically if you are using C++.

    To set the multiple process flag when your custom server has a system-generated main(), add the flag -DMULTI to the existing set of compile flags.

    Object Files
    The names of the object files are added to the Makefile during the build process.

    Object files need only be identified if they do not exist in a specified object library. If you code your own main() function, the name of the object file that contains the main() function must be included in the list.

    Syntax
    The object files are specified by their AIX path name. The .o file extension is required. For example:
    phonefunc.o
    set_path.o
    Note: The system-generated file customservername_ext.o is automatically included in this list. Do not use this name for an object file, as it will be overwritten by the system-generated file during the custom server build.
    Link Flags
    The link flags provide the options for linking the custom server during the build process, including the names of any required object libraries.
    Syntax
    The link flags are specified as described in the AIX Commands Reference (the cc command). For example:
    -lm
    -L/home/accounts/vae/mylib
    Global Declarations
    The global declarations are the global variables used by the main() function. In system-generated main() functions, specified global declarations are copied into the customservername_main.c above the Main() statement during the build process.
    Syntax
    The global declarations are specified using normal C language conventions. For example:
    #define MAXLEN 80
    char filename[256];
    Include Files
    Include files generally contain additional data pertinent to the application, such as information about constants and data structures.

    In system-generated main() functions, the names of specified include files are inserted in customservername_main.c above the Main() statement during the build process.

    Syntax
    Include files are specified by name, using normal C language conventions. For example:
    #include "myfile.h"
    #include <stdio.h>

If you are using a combination of C and C++ language files, put the C language files in a subdirectory of the custom server directory to keep them separate from the C++ language files. If you export or import your custom server directories, any subdirectories will also be exported and imported.

  1. Validate include statements: If you specify include files, click Validate to verify the syntax of include statements. The system displays an error message if the syntax is invalid. Refer to Include Files for syntax rules.
  2. When you have finished entering values for all properties, click OK. The system checks for syntax and notifies you of any errors. If all property specifications are valid, the Properties window closes.
  3. Save changes: Save the custom server.
  4. Close the Custom Server window.