When the office finds a protocol handler implementation for a URL in the configuration files, it asks the global service manager to instantiate that implementation. All components must be registered with the service manager before they can be instantiated. This happens automatically when an extension is being installed (see chapter Extensions).
The easiest method to configure and register a new protocol handler in a single step is therefore to use the Extension Manager. An extension for the example protocol handler could contain the following directory structure:
ExampleHandler.oxt: META-INF/manifest.xml ProtocolHandler.xcu windows.plt/ examplehandler.dll solaris_sparc.plt/ libexamplehandler.so linux_x86.plt/ libexamplehandler.so
The .xcu file can go directly into the root of the extension, the shared libraries for the various platforms go to their respective .plt directories. Both the .xcu and the libraries have to be referenced in the manifest.xml.
The package installation is as simple as changing to the <OfficePath>/program directory with a command-line shell and running
$ unopkg add /foo/bar/ExampleHandler.oxt
or simply starting the Extension Manager in your office to install the extensions via the UI.
For an detailed explanation of the extension structure please refer to Extensions.
|Content on this page is licensed under the Public Documentation License (PDL).|