OSF DCE Application Development Guide--Introduction and Style Guide
OSF DCE Application Development Guide—Introduction and Style Guide
1.3.2 DCE Interface Definition Language
As was mentioned earlier in this chapter, developing a DCE application involves writing
and compiling an interface definition, which defines the application’s client/server
interface. Application developers use IDL to write the interface definition. IDL is a
high-level descriptive language whose syntax resembles that of ANSI C. IDL is a
declarative, not a procedural, language. Some of the important attributes specified with
IDL are the following:
• For interfaces
uuid Specifies the interface’s UUID.
version Specifies the interface major and minor version number.
• For parameters
in Signifies a parameter whose value is passed from the client
to the server.
out Signifies a parameter whose value is passed from the server
to the client.
• For data types
handle Specifies a customized binding handle. Chapter 4 discusses
binding handles and binding methods in more detail.
context_handle Specifies a context handle, which is a pointer to state
information that the server uses and which is maintained
across RPC invocations. An example of a context handle is
a file pointer. For more information about context handles,
see the .
IDL’s operation attributes include specifiers for execution semantics: whether the
operation can be safely executed more than once, whether a response is expected, and so
on. The default is that operations can be executed at-most-once. Parameters (the
arguments supplied by the client when it makes the remote call) can be specified as input
to the server, output to the client, or both. See the for a complete description of IDL
syntax and usage.
1.3.3 The DCE IDL Compiler
The DCE IDL compiler idl processes interface definitions written in IDL and generates
header files and stub object code. (The compiler generates source code for the stubs in
ANSI C.) The code generated from an interface definition by the compiler includes client
and server stubs.
The compiler also generates a data structure called the interface specification, which
contains identifying and descriptive information about the compiled interface, and
creates a companion global variable, the interface handle, which is a reference to the
interface specification. Each header file generated by the IDL compiler contains the
1− 6 Tandem Computers Incorporated 124246