Getting started with the SDK

IBM Director is a management product for systems administrators in small to medium growth companies. IBM Director solves the problem of managing today's Windows and Intel-centric PC and LAN networks, and addresses real system management issues, enabling you to focus on managing your primary business. For more information on Director, visit the IBM Director Web site at http://www.pc.ibm.com/ww/eserver/xseries/systems_management/nfdir.html.

Although IBM Director is designed to meet the system management needs of most small to medium companies, your organization might require a customized solution that is not provided by the IBM Director product directly out-of-the-box. Toward this end, the IBM Director Software Development Kit (SDK) enables you to customize and enhance IBM Director to meet your organization's needs.

This SDK provides documentation and sample code for extending IBM Director. Using the guidelines described in Getting started with programmed extensions, you can develop application programs (extensions) that can be fully integrated into Director. To extend Director programmatically, you must be experienced in Java or C++ programming, preferably in a systems development environment.

Subtopics

Requirements for using the SDK interface

This SDK is designed to be viewed using a browser that supports frames and Javascript, for example, Netscape Navigator 4.0 and later and Internet Explorer 4.0 and later. Other browsers might or might not format the SDK files correctly.

If you use a browser without frames support, you can invoke the file f_getstart.html as a starting point and link to the instructional files from this document. Refer to How the SDK Files Are Organized for information on how the files are labeled and grouped. The only Javascript code invoked is at the beginning of the table of contents link structures to clear the windows. If your browser does not support Javascript, these links might not resolve correctly.

Requirements for Java Code development

A good portion of the programming extensions described in the Director SDK involve code you must develop in Java. Any extensions your organization develops must coexist with IBM Director code, therefore your Java code must run using the same level of Java as Director. The Director product uses the Sun Java Development Kit (JDK) Release 1.3.1. All of the Java samples are coded using this development kit. Before compiling your sample code, set the following environment variables:

Variable Value
JDK_X86_DIR The base JDK directory
SERVERINSTALL The directory where IBM Director is installed
MSSDK The MSSDK directory

The jar files containing IBM Director class files (Director.jar, DirLibs.jar, DirAgent.jar); JFC class files (swing10.jar, swing.jar, windows.jar); and other class files are located in the subdirectory lib_jav. The output class files described in this SDK will run on a system on which IBM Director has been installed. To locate the path to the IBM Director classes, use the registry editor, regedit, and look up the entry for the name Root under HKEY_LOCAL_MACHINE\SOFTWARE\Tivoli\Director\CurrentVersion. The value of Root is the path to the installed Director. The Java classes should be located in the Classes subdirectory under that path.

Requirements for C++ code development

The C++ extensions provided by IBM Director use a number of different compilers and versions because of the multitude of platforms that IBM Director supports. In order to interface with specific extensions, you will need to use the correct header files for a specific platform and to link with the correct libraries for that platform.

The following table describes all of the include file subdirectories provided by the IBM Director SDK:
Subdirectory Name Contents
inc Contains include files that are common to all platforms. These files will compile conditionally based on which platform and compiler are used.
inc_w32 Contains include files that are specific to all 32-bit Windows operating systems supported by Director, specifically Windows NT 4.0, Windows 95, Windows 98, and Windows 2000.

The following table describes all of the subdirectories provided by the IBM Director SDK that contain libraries with which your extensions will need to link:
Subdirectory Name Contents
lib_w32 Contains link libraries that are specific to 32-bit Windows operating systems. These libraries were built using the Microsoft 32-bit C++ Optimizing Compiler Version 4.2
lib_w32.bor Contains link libraries that are specific to 32-bit Windows operating systems. These libraries were built using the Borland C++ Version 4.52 Compiler.
lib_nov Contains link libraries that are specific to the Novell operating system. These libraries were built using the Watcom C/C++ V10.6 compiler.
lib_jav Contains jar files for the Java portion of the SDK.

The IBM Director SDK also contains some include files and library files which were not shipped as part of the IBM Director product. The files included in this SDK are:

TWGSdEvt.h and TWGSdEvt.lib
Used to link your application to TWGSdEvt.dll. These files are described in Creating and Sending an Event.

Sample code overview

Several of the samples provided contain code that demonstrates extension development for multiple platforms. This code is split among several subtrees, one for each platform, under that sample's base directory. This sample code will be labeled according to the platform and/or compiler required. Let's review the naming convention used so that you know what code is for what platforms.

The 32-bit Windows samples are found in subtree w32. These samples are coded to build with the Microsoft 32-bit C++ Optimizing Compiler Version 4.2 or 5.0. If you compile the 32-bit Windows samples with Microsoft C++ Version 6.0, you should define the compiler switch NO_STRICT to turn off strict type checking. This will permit compatible linking with the libraries provided in this SDK. The makefiles provided with the C++ samples define NO_STRICT.

All of the Java source code for the samples is sorted differently from the C++ code because of the package naming feature of Java. All of the Java source for the samples can be found under the samples\javasrc directory.

Executable files included with this SDK

The executable files included in this SDK are:
twgsvcee.exe
Creates an ini file for registering a task service with a Director agent. This file is described in Creating and Registering an Agent Service.
ListTasks.bat
Lists all the tasks that are currently registered with the IBM Director Server. ListTasks.bat is described in Deployment of extensions.
DeleteTask.bat
Removes the specified task extension from the server while the server is running. Indicate which task to delete using the TaskID of the task. You must stop the IBM Director Management Console before running, or unpredictable results might occur. DeleteTask.bat is described in Deployment of Extensions.
All utilities and all class files that are referenced and not described previously are included with IBM Director.

How the SDK Files are organized

This section describes how the SDK files are grouped and installed.
SDK structure files
HTML files that include the overview, GUI, and navigational links that present this SDK. The link files begin with toc_. The overview text files begin with f_. These files are installed in the docs\ directory.
Programming topics
HTML files that describe the concepts and procedures you need to begin developing Java or C++ application programs that extend Director.


These files begin with e_ and are installed in the docs\ directory.

Reference tables for IBM Director extension topics
HTML files containing the tables that provide syntactical details for code operations. These tables are linked from various locations in the extension files; however, you can select Extending IBM Director programmatically => Reference Information in the table of contents to view the linked list.


The reference files begin with r_ and are installed in the docs\ directory.

IBM Director Java class descriptions
HTML files containing the IBM Director Java class descriptions. These files are indexed to help you locate IBM Director interfaces, classes, methods and exceptions. Select Extending IBM Director Programmatically => Director Java Class Descriptions in the table of contents to view the main window for the IBM Director Java class descriptions. Javadoc files are also linked from various locations in the extension files.


The Java class descriptions are grouped into Javadoc packages. For example, the com.tivoli.twg.alertmgr package describes the class files needed to extend the IBM Director event management task. All Javadoc files are installed in the docs\javadoc directory.

IBM Director sample code
Java and C++ source and object files containing tested samples that demonstrate the concepts and procedures described in the programming extension topics. To view the overview for all samples, select Sample Code Overview in the table of contents for the programming extension topics. To view an overview of each sample, select Related sample code in the table of contents for a specific programming extension topic.


Java sample source files are installed in subdirectories of samples\javasrc\com. Native C++ samples are installed in other subdirectories of the samples directory. For example, resource monitor agent samples are installed in samples\monagent.

The sample overview files begin with s_ and are installed in the docs\ directory.