Once you have created your access and service modules, you are ready to design the extension interfaces.
Designing an interface entails creating the interface and defining the methods that compose the interface. This task can only be done in the access module.
To design an interface
First, if working in a new extension, rename the sample interface of the sample extension already loaded into Netscape Extension Builder Designer.
If there is more than one access module in the extension, in the Tree view select the access module to which the new interface will belong.
Choose Insert - Interface or click the "Create a new Interface" tool-bar icon.
A new interface, named NewInterface, is created in the selected access
module. The new interface can be seen in the Tree view and it becomes the
currently selected extension component.
In the Component view, change the NewInterface name to match one of your predefined interfaces.
Specify the interface from which this interface inherits its basic and necessary functionality.
Most interfaces should inherit from the default IGXObject interface.
To describe the interface, enter a comment in the Comment text box.
This comment will appear in the IDL and source code files that correspond
to the access module that contains this interface.
To create additional interfaces, repeat steps 3 through 6.
When you are finished, choose File - Save.
You should now define the methods that compose the interface or
interfaces you have created. For more information about how to do this, see
Defining a Method.
Defining a Method
Once you have created the interfaces for your extension, you must define the methods that these interfaces expose.
To define a method
First, if working in a new extension, rename the sample methods loaded into Netscape Extension Builder Designer as a default.
To add new methods, in the Tree view select the interface to which the new method will belong.
Choose Insert - Method, or click the "Create a new Method" tool-bar icon.
A new method, named NewMethod, is created in the selected interface. The
new method can be seen in the Tree view and it becomes the currently
selected extension component.
In the Component view, change the new method named NewMethod to reflect a name of an actual method for this interface.
An interface cannot have multiple methods with the same name.
To describe the method, enter a comment in the Comment text box.
This comment will appear in the IDL and source code files that correspond
to this method.
To create additional methods for this interface, repeat steps 3 through 5.
When you are finished, choose File - Save.
You must now define the parameters used by the methods you have
created. For more information about how to do this, see Defining a
Parameter.
Defining a Parameter
As you create the methods exposed by the interface or interfaces of your extension, you need to define the parameters that are used by those methods.
To define a parameter
First, if you have not already done so, rename the sample parameters loaded into Netscape Extension Builder Designer as a default.
From the Tree view, select the method for which you want to define a parameter.
To edit an existing parameter, use the Component view and make your changes in the Parameter table.
The bottom-half of the Component view contains a parameter table to allow
you to define the parameters for the selected method.
To add a new parameter, click Add Parameter.
A new parameter is created.
Under Parameter Name, change the new parameter named NewParameter to reflect a unique parameter name for this method.
A method cannot have multiple parameters with the same name.
Under Parameter Type, specify the data type for the parameter.
Under In/Out, specify whether the parameter is an In or Out parameter.
It is recommended that methods have only one Out parameter for possibly
providing future access to the extension by Java clients. It is mandatory that
methods have only one Out parameter for Java extensions and C++
extensions with the Java access layer. This is a Java constraint.
To create additional parameters for the selected method, repeat steps 4 through 7.
When you are finished, choose File - Save.
You are now ready to implement the interfaces, including methods and
parameters, by designing coclasses. For more information about doing this,
see Designing a Coclass.