Arnulf Wiedemann wrote:
Am Mittwoch, 15. Juni 2005 09:22 schrieb Stephan Bergmann:

Arnulf Wiedemann wrote:

Hello Stephan,
thanks for your fast answer.

Am Dienstag, 14. Juni 2005 17:51 schrieb Stephan Bergmann:

IIRC, UNO remote bridge protocols are found by library name.  That is,
if you have a protocol named xyz (and corresponding accept strings/UNO
URLs would be of the form "...;xyz..." instead of the familiar
"...;urp..."), its implementation would be in in a dynamic library
called libxyz_uno.so (on Unix), similar to the existing liburp_uno.so.

I did not know that it's as easy as to have a corresponding library. So
it is enough, if I have built such a library, to copy the new library
into the program directory and then the protocol will be recognized (that
means there is no registry entry or something similar necessary)?

I'm really not sure about the details.  If you encounter any problems,
report back and I'll see if I can find some time to dig into that.

-Stephan

[...]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Hi Stephan,
meanwhile I have found out that there must exist a service in the service registry. For the urp protocol it is the line with UrpBridge:
    / com.sun.star.comp.remotebridges.Bridge.various
     / UNO
       / ACTIVATOR
         Value: Type = RG_VALUETYPE_STRING
                Size = 34
                Data = "com.sun.star.loader.SharedLibrary"

       / SERVICES
         / com.sun.star.bridge.UrpBridge                                <===== 
existing urp protocol
         / com.sun.star.bridge.UrtpBridge                       <=====  my new 
protocol urpt
         / com.sun.star.bridge.Bridge
         / com.sun.star.bridge.IiopBridge
       / LOCATION
         Value: Type = RG_VALUETYPE_STRING
                Size = 20
                Data = "remotebridge.uno.so"

Can you give me a hint/link to docu how to add that line "UrtpBridge" to the services database (I have produced the above with the regview command) and could that be enough for load the library liburtp_uno.so with my text-based frontend?

Thanks,
Arnulf

A bridge for protocol xyz must be a UNO service implementation that simultaneously supports the UNO service "com.sun.star.bridge.Bridge" and the UNO service "com.sun.star.bridge.xyzBridge" (where the "xyz" part can be any mixture of upper and lower case), see remotebridges/source/factory/bridgefactory.cxx.

What you found in services.rdb is the service implementation named "com.sun.star.comp.remotebridges.Bridge.various" that happens to be the only bridge implementation available in a default OOo. It happens to support two protocols, "urp" and "iiop" (which is dead code).

To introduce a bridge for a new protocol "urtp", you would either need to write a UNO component that supports the UNO services "com.sun.star.bridge.Bridge" and "com.sun.star.bridge.UrtpBridge" (see the UNOIDL documentation of com.sun.star.bridge.Bridge, and the Developer's Guide on general information about developing and deploying UNO components). Or you hack your protocol into the existing "com.sun.star.comp.remotebridges.Bridge.various" implementation, see remotebridges/source/bridge/remote_bridge.cxx (since you want to re-use the existing urp code, it might work to patch ORemoteBridge::initialize so that if the protocol name in swProtocol is "urtp", you change it to "urp"; swProtocol will contain the complete protocol string, consisting of the protocol name followed by zero or more parameters of the form ",KEY=VALUE").

-Stephan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to