diff options
author | Jörg Budischewski <jbu@openoffice.org> | 2000-12-04 10:12:54 +0000 |
---|---|---|
committer | Jörg Budischewski <jbu@openoffice.org> | 2000-12-04 10:12:54 +0000 |
commit | 9acab11cee26da4716f1ad1b52dc3ba6f174066a (patch) | |
tree | 4945ef6692826d1318b20be9721514a1ef08a6e0 /bridges | |
parent | c4afe3cd7aba1099164bdacf1ce0cd6fcb62f6b2 (diff) |
#80776# extra release calls are now sent within writer thread
Diffstat (limited to 'bridges')
-rw-r--r-- | bridges/inc/bridges/remote/context.h | 12 | ||||
-rw-r--r-- | bridges/inc/bridges/remote/helper.hxx | 26 | ||||
-rw-r--r-- | bridges/source/remote/static/helper.cxx | 18 |
3 files changed, 38 insertions, 18 deletions
diff --git a/bridges/inc/bridges/remote/context.h b/bridges/inc/bridges/remote/context.h index 31b2213f318f..2a8f86e9c666 100644 --- a/bridges/inc/bridges/remote/context.h +++ b/bridges/inc/bridges/remote/context.h @@ -2,9 +2,9 @@ * * $RCSfile: context.h,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:28:48 $ + * last change: $Author: jbu $ $Date: 2000-12-04 11:09:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -82,14 +82,6 @@ struct remote_Context; struct remote_Interface; -/***** - * @deprecated - ****/ -typedef void ( SAL_CALL * remote_createStubFunc ) ( - remote_Interface **ppRemoteI, - rtl_uString *pOid , - typelib_TypeDescriptionReference *pTypeRef, - uno_Environment *pEnvRemote ); /*** * performs a query-interface for a certain interface via the remote connection ! diff --git a/bridges/inc/bridges/remote/helper.hxx b/bridges/inc/bridges/remote/helper.hxx index c6eff3044dff..aedede7dd315 100644 --- a/bridges/inc/bridges/remote/helper.hxx +++ b/bridges/inc/bridges/remote/helper.hxx @@ -2,9 +2,9 @@ * * $RCSfile: helper.hxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:28:48 $ + * last change: $Author: jbu $ $Date: 2000-12-04 11:09:57 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -60,13 +60,33 @@ ************************************************************************/ #include <bridges/remote/bridgeimpl.hxx> +typedef void ( SAL_CALL * ReleaseRemoteCallbackFunc ) ( + remote_Interface *ppRemoteI, + rtl_uString *pOid, + typelib_TypeDescriptionReference *pTypeRef, + uno_Environment *pEnvRemote + ); + +typedef void ( SAL_CALL * remote_createStubFunc ) ( + remote_Interface **ppRemoteI, + rtl_uString *pOid , + typelib_TypeDescriptionReference *pTypeRef, + uno_Environment *pEnvRemote, + ReleaseRemoteCallbackFunc callback + ); namespace bridges_remote { + + /** @param callback If the bridge implementation wants to handle the remote release call, + it can do it giving this callback. If callback == 0, the releaseRemote + method of the stub is called. + */ void SAL_CALL remote_createStub ( remote_Interface **ppRemoteI, rtl_uString *pOid , typelib_TypeDescriptionReference *pType, - uno_Environment *pEnvRemote ); + uno_Environment *pEnvRemote, + ReleaseRemoteCallbackFunc callback ); void SAL_CALL remote_retrieveOidFromProxy( remote_Interface *pRemtoeI, diff --git a/bridges/source/remote/static/helper.cxx b/bridges/source/remote/static/helper.cxx index 5fbd68350771..6cfe317d2034 100644 --- a/bridges/source/remote/static/helper.cxx +++ b/bridges/source/remote/static/helper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: helper.cxx,v $ * - * $Revision: 1.1.1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: hr $ $Date: 2000-09-18 15:28:50 $ + * last change: $Author: jbu $ $Date: 2000-12-04 11:12:54 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -79,7 +79,8 @@ void SAL_CALL remote_createStub ( remote_Interface **ppRemoteI, rtl_uString *pOid , typelib_TypeDescriptionReference *pTypeRef, - uno_Environment *pEnvRemote ) + uno_Environment *pEnvRemote, + ReleaseRemoteCallbackFunc releaseRemoteCallback ) { typelib_TypeDescription *pType = 0; typelib_typedescriptionreference_getDescription( &pType, pTypeRef ); @@ -94,8 +95,15 @@ void SAL_CALL remote_createStub ( { if( (*ppRemoteI)->acquire == ::bridges_remote::Remote2RemoteStub::thisAcquire ) { - // send a release to remote - ((::bridges_remote::Remote2RemoteStub *)*ppRemoteI)->releaseRemote(); + if( releaseRemoteCallback ) + { + // use the callback handler, the bridge wants to send the call immeadiatly + releaseRemoteCallback( *ppRemoteI , pOid, pTypeRef , pEnvRemote ); + } + else + { + ((::bridges_remote::Remote2RemoteStub *)*ppRemoteI)->releaseRemote(); + } } else { |