1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: interactionrequest.cxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_ucbhelper.hxx"
34 /**************************************************************************
36 **************************************************************************
38 *************************************************************************/
39 #include <osl/mutex.hxx>
40 #include <cppuhelper/typeprovider.hxx>
41 #include <ucbhelper/interactionrequest.hxx>
43 using namespace com::sun::star
;
44 using namespace ucbhelper
;
46 //=========================================================================
47 //=========================================================================
49 // InteractionRequest Implementation.
51 //=========================================================================
52 //=========================================================================
57 struct InteractionRequest_Impl
59 rtl::Reference
< InteractionContinuation
> m_xSelection
;
60 com::sun::star::uno::Any m_aRequest
;
61 com::sun::star::uno::Sequence
<
62 com::sun::star::uno::Reference
<
63 com::sun::star::task::XInteractionContinuation
> > m_aContinuations
;
65 InteractionRequest_Impl() {}
66 InteractionRequest_Impl( const uno::Any
& rRequest
)
67 : m_aRequest( rRequest
) {}
72 //=========================================================================
73 InteractionRequest::InteractionRequest()
74 : m_pImpl( new InteractionRequest_Impl
)
78 //=========================================================================
79 InteractionRequest::InteractionRequest( const uno::Any
& rRequest
)
80 : m_pImpl( new InteractionRequest_Impl( rRequest
) )
84 //=========================================================================
86 InteractionRequest::~InteractionRequest()
91 //=========================================================================
92 void InteractionRequest::setRequest( const uno::Any
& rRequest
)
94 m_pImpl
->m_aRequest
= rRequest
;
97 //=========================================================================
98 void InteractionRequest::setContinuations(
99 const uno::Sequence
< uno::Reference
<
100 task::XInteractionContinuation
> > & rContinuations
)
102 m_pImpl
->m_aContinuations
= rContinuations
;
105 //=========================================================================
106 rtl::Reference
< InteractionContinuation
>
107 InteractionRequest::getSelection() const
109 return m_pImpl
->m_xSelection
;
112 //=========================================================================
113 void InteractionRequest::setSelection(
114 const rtl::Reference
< InteractionContinuation
> & rxSelection
)
116 m_pImpl
->m_xSelection
= rxSelection
;
119 //=========================================================================
121 // XInterface methods.
123 //=========================================================================
126 void SAL_CALL
InteractionRequest::acquire()
129 OWeakObject::acquire();
132 //=========================================================================
134 void SAL_CALL
InteractionRequest::release()
137 OWeakObject::release();
140 //=========================================================================
143 InteractionRequest::queryInterface( const uno::Type
& rType
)
144 throw ( uno::RuntimeException
)
146 uno::Any aRet
= cppu::queryInterface( rType
,
147 static_cast< lang::XTypeProvider
* >( this ),
148 static_cast< task::XInteractionRequest
* >( this ) );
150 return aRet
.hasValue() ? aRet
: OWeakObject::queryInterface( rType
);
153 //=========================================================================
155 // XTypeProvider methods.
157 //=========================================================================
160 uno::Sequence
< sal_Int8
> SAL_CALL
InteractionRequest::getImplementationId()
161 throw( uno::RuntimeException
)
163 static cppu::OImplementationId
* pId
= NULL
;
166 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
169 static cppu::OImplementationId
id( sal_False
);
173 return (*pId
).getImplementationId();
176 //=========================================================================
178 uno::Sequence
< uno::Type
> SAL_CALL
InteractionRequest::getTypes()
179 throw( uno::RuntimeException
)
181 static cppu::OTypeCollection
* pCollection
= 0;
184 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
187 static cppu::OTypeCollection
collection(
188 getCppuType( static_cast<
189 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
190 getCppuType( static_cast<
191 uno::Reference
< task::XInteractionRequest
> * >( 0 ) ) );
192 pCollection
= &collection
;
195 return (*pCollection
).getTypes();
198 //=========================================================================
200 // XInteractionRequest methods.
202 //=========================================================================
205 uno::Any SAL_CALL
InteractionRequest::getRequest()
206 throw( uno::RuntimeException
)
208 return m_pImpl
->m_aRequest
;
211 //=========================================================================
213 uno::Sequence
< uno::Reference
< task::XInteractionContinuation
> > SAL_CALL
214 InteractionRequest::getContinuations()
215 throw( uno::RuntimeException
)
217 return m_pImpl
->m_aContinuations
;
220 //=========================================================================
221 //=========================================================================
223 // InteractionContinuation Implementation.
225 //=========================================================================
226 //=========================================================================
231 struct InteractionContinuation_Impl
233 InteractionRequest
* m_pRequest
;
235 InteractionContinuation_Impl( InteractionRequest
* pRequest
)
236 : m_pRequest( pRequest
) {}
241 //=========================================================================
242 InteractionContinuation::InteractionContinuation(
243 InteractionRequest
* pRequest
)
244 : m_pImpl( new InteractionContinuation_Impl( pRequest
) )
248 //=========================================================================
250 InteractionContinuation::~InteractionContinuation()
255 //=========================================================================
256 void InteractionContinuation::recordSelection()
258 m_pImpl
->m_pRequest
->setSelection( this );
261 //=========================================================================
262 //=========================================================================
264 // InteractionAbort Implementation.
266 //=========================================================================
267 //=========================================================================
269 //=========================================================================
271 // XInterface methods.
273 //=========================================================================
276 void SAL_CALL
InteractionAbort::acquire()
279 OWeakObject::acquire();
282 //=========================================================================
284 void SAL_CALL
InteractionAbort::release()
287 OWeakObject::release();
290 //=========================================================================
293 InteractionAbort::queryInterface( const uno::Type
& rType
)
294 throw ( uno::RuntimeException
)
296 uno::Any aRet
= cppu::queryInterface( rType
,
297 static_cast< lang::XTypeProvider
* >( this ),
298 static_cast< task::XInteractionContinuation
* >( this ),
299 static_cast< task::XInteractionAbort
* >( this ) );
301 return aRet
.hasValue()
302 ? aRet
: InteractionContinuation::queryInterface( rType
);
305 //=========================================================================
307 // XTypeProvider methods.
309 //=========================================================================
312 uno::Sequence
< sal_Int8
> SAL_CALL
InteractionAbort::getImplementationId()
313 throw( uno::RuntimeException
)
315 static cppu::OImplementationId
* pId
= NULL
;
318 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
321 static cppu::OImplementationId
id( sal_False
);
325 return (*pId
).getImplementationId();
328 //=========================================================================
330 uno::Sequence
< uno::Type
> SAL_CALL
InteractionAbort::getTypes()
331 throw( uno::RuntimeException
)
333 static cppu::OTypeCollection
* pCollection
= 0;
336 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
339 static cppu::OTypeCollection
collection(
340 getCppuType( static_cast<
341 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
342 getCppuType( static_cast<
343 uno::Reference
< task::XInteractionAbort
> * >( 0 ) ) );
344 pCollection
= &collection
;
347 return (*pCollection
).getTypes();
350 //=========================================================================
352 // XInteractionContinuation methods.
354 //=========================================================================
357 void SAL_CALL
InteractionAbort::select()
358 throw( uno::RuntimeException
)
363 //=========================================================================
364 //=========================================================================
366 // InteractionRetry Implementation.
368 //=========================================================================
369 //=========================================================================
371 //=========================================================================
373 // XInterface methods.
375 //=========================================================================
378 void SAL_CALL
InteractionRetry::acquire()
381 OWeakObject::acquire();
384 //=========================================================================
386 void SAL_CALL
InteractionRetry::release()
389 OWeakObject::release();
392 //=========================================================================
395 InteractionRetry::queryInterface( const uno::Type
& rType
)
396 throw ( uno::RuntimeException
)
398 uno::Any aRet
= cppu::queryInterface( rType
,
399 static_cast< lang::XTypeProvider
* >( this ),
400 static_cast< task::XInteractionContinuation
* >( this ),
401 static_cast< task::XInteractionRetry
* >( this ) );
403 return aRet
.hasValue()
404 ? aRet
: InteractionContinuation::queryInterface( rType
);
407 //=========================================================================
409 // XTypeProvider methods.
411 //=========================================================================
414 uno::Sequence
< sal_Int8
> SAL_CALL
InteractionRetry::getImplementationId()
415 throw( uno::RuntimeException
)
417 static cppu::OImplementationId
* pId
= NULL
;
420 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
423 static cppu::OImplementationId
id( sal_False
);
427 return (*pId
).getImplementationId();
430 //=========================================================================
432 uno::Sequence
< uno::Type
> SAL_CALL
InteractionRetry::getTypes()
433 throw( uno::RuntimeException
)
435 static cppu::OTypeCollection
* pCollection
= 0;
438 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
441 static cppu::OTypeCollection
collection(
442 getCppuType( static_cast<
443 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
444 getCppuType( static_cast<
445 uno::Reference
< task::XInteractionRetry
> * >( 0 ) ) );
446 pCollection
= &collection
;
449 return (*pCollection
).getTypes();
452 //=========================================================================
454 // XInteractionContinuation methods.
456 //=========================================================================
459 void SAL_CALL
InteractionRetry::select()
460 throw( uno::RuntimeException
)
465 //=========================================================================
466 //=========================================================================
468 // InteractionApprove Implementation.
470 //=========================================================================
471 //=========================================================================
473 //=========================================================================
475 // XInterface methods.
477 //=========================================================================
480 void SAL_CALL
InteractionApprove::acquire()
483 OWeakObject::acquire();
486 //=========================================================================
488 void SAL_CALL
InteractionApprove::release()
491 OWeakObject::release();
494 //=========================================================================
497 InteractionApprove::queryInterface( const uno::Type
& rType
)
498 throw ( uno::RuntimeException
)
500 uno::Any aRet
= cppu::queryInterface( rType
,
501 static_cast< lang::XTypeProvider
* >( this ),
502 static_cast< task::XInteractionContinuation
* >( this ),
503 static_cast< task::XInteractionApprove
* >( this ) );
505 return aRet
.hasValue()
506 ? aRet
: InteractionContinuation::queryInterface( rType
);
509 //=========================================================================
511 // XTypeProvider methods.
513 //=========================================================================
516 uno::Sequence
< sal_Int8
> SAL_CALL
InteractionApprove::getImplementationId()
517 throw( uno::RuntimeException
)
519 static cppu::OImplementationId
* pId
= NULL
;
522 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
525 static cppu::OImplementationId
id( sal_False
);
529 return (*pId
).getImplementationId();
532 //=========================================================================
534 uno::Sequence
< uno::Type
> SAL_CALL
InteractionApprove::getTypes()
535 throw( uno::RuntimeException
)
537 static cppu::OTypeCollection
* pCollection
= 0;
540 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
543 static cppu::OTypeCollection
collection(
544 getCppuType( static_cast<
545 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
546 getCppuType( static_cast<
547 uno::Reference
< task::XInteractionApprove
> * >( 0 ) ) );
548 pCollection
= &collection
;
551 return (*pCollection
).getTypes();
554 //=========================================================================
556 // XInteractionContinuation methods.
558 //=========================================================================
561 void SAL_CALL
InteractionApprove::select()
562 throw( uno::RuntimeException
)
567 //=========================================================================
568 //=========================================================================
570 // InteractionDisapprove Implementation.
572 //=========================================================================
573 //=========================================================================
575 //=========================================================================
577 // XInterface methods.
579 //=========================================================================
582 void SAL_CALL
InteractionDisapprove::acquire()
585 OWeakObject::acquire();
588 //=========================================================================
590 void SAL_CALL
InteractionDisapprove::release()
593 OWeakObject::release();
596 //=========================================================================
599 InteractionDisapprove::queryInterface( const uno::Type
& rType
)
600 throw ( uno::RuntimeException
)
602 uno::Any aRet
= cppu::queryInterface( rType
,
603 static_cast< lang::XTypeProvider
* >( this ),
604 static_cast< task::XInteractionContinuation
* >( this ),
605 static_cast< task::XInteractionDisapprove
* >( this ) );
607 return aRet
.hasValue()
608 ? aRet
: InteractionContinuation::queryInterface( rType
);
611 //=========================================================================
613 // XTypeProvider methods.
615 //=========================================================================
618 uno::Sequence
< sal_Int8
> SAL_CALL
InteractionDisapprove::getImplementationId()
619 throw( uno::RuntimeException
)
621 static cppu::OImplementationId
* pId
= NULL
;
624 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
627 static cppu::OImplementationId
id( sal_False
);
631 return (*pId
).getImplementationId();
634 //=========================================================================
636 uno::Sequence
< uno::Type
> SAL_CALL
InteractionDisapprove::getTypes()
637 throw( uno::RuntimeException
)
639 static cppu::OTypeCollection
* pCollection
= 0;
642 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
645 static cppu::OTypeCollection
collection(
646 getCppuType( static_cast<
647 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
648 getCppuType( static_cast<
649 uno::Reference
< task::XInteractionDisapprove
> * >( 0 ) ) );
650 pCollection
= &collection
;
653 return (*pCollection
).getTypes();
656 //=========================================================================
658 // XInteractionContinuation methods.
660 //=========================================================================
663 void SAL_CALL
InteractionDisapprove::select()
664 throw( uno::RuntimeException
)
669 //=========================================================================
670 //=========================================================================
672 // InteractionSupplyAuthentication Implementation.
674 //=========================================================================
675 //=========================================================================
677 //=========================================================================
679 // XInterface methods.
681 //=========================================================================
684 void SAL_CALL
InteractionSupplyAuthentication::acquire()
687 OWeakObject::acquire();
690 //=========================================================================
692 void SAL_CALL
InteractionSupplyAuthentication::release()
695 OWeakObject::release();
698 //=========================================================================
701 InteractionSupplyAuthentication::queryInterface( const uno::Type
& rType
)
702 throw ( uno::RuntimeException
)
704 uno::Any aRet
= cppu::queryInterface( rType
,
705 static_cast< lang::XTypeProvider
* >( this ),
706 static_cast< task::XInteractionContinuation
* >( this ),
707 static_cast< ucb::XInteractionSupplyAuthentication
* >( this ),
708 static_cast< ucb::XInteractionSupplyAuthentication2
* >( this ));
710 return aRet
.hasValue()
711 ? aRet
: InteractionContinuation::queryInterface( rType
);
714 //=========================================================================
716 // XTypeProvider methods.
718 //=========================================================================
721 uno::Sequence
< sal_Int8
> SAL_CALL
722 InteractionSupplyAuthentication::getImplementationId()
723 throw( uno::RuntimeException
)
725 static cppu::OImplementationId
* pId
= NULL
;
728 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
731 static cppu::OImplementationId
id( sal_False
);
735 return (*pId
).getImplementationId();
738 //=========================================================================
740 uno::Sequence
< uno::Type
> SAL_CALL
InteractionSupplyAuthentication::getTypes()
741 throw( uno::RuntimeException
)
743 static cppu::OTypeCollection
* pCollection
= 0;
746 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
749 static cppu::OTypeCollection
collection(
750 getCppuType( static_cast<
751 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
752 getCppuType( static_cast<
754 ucb::XInteractionSupplyAuthentication2
> * >( 0 ) ) );
755 pCollection
= &collection
;
758 return (*pCollection
).getTypes();
761 //=========================================================================
763 // XInteractionContinuation methods.
765 //=========================================================================
768 void SAL_CALL
InteractionSupplyAuthentication::select()
769 throw( uno::RuntimeException
)
774 //=========================================================================
776 // XInteractionSupplyAuthentication methods.
778 //=========================================================================
782 InteractionSupplyAuthentication::canSetRealm()
783 throw( uno::RuntimeException
)
785 return m_bCanSetRealm
;
788 //=========================================================================
791 InteractionSupplyAuthentication::setRealm( const rtl::OUString
& Realm
)
792 throw( uno::RuntimeException
)
794 OSL_ENSURE( m_bCanSetPassword
,
795 "InteractionSupplyAuthentication::setRealm - Not supported!" );
797 if ( m_bCanSetRealm
)
801 //=========================================================================
804 InteractionSupplyAuthentication::canSetUserName()
805 throw( uno::RuntimeException
)
807 return m_bCanSetUserName
;
810 //=========================================================================
813 InteractionSupplyAuthentication::setUserName( const rtl::OUString
& UserName
)
814 throw( uno::RuntimeException
)
816 OSL_ENSURE( m_bCanSetUserName
,
817 "InteractionSupplyAuthentication::setUserName - Not supported!" );
819 if ( m_bCanSetUserName
)
820 m_aUserName
= UserName
;
823 //=========================================================================
826 InteractionSupplyAuthentication::canSetPassword()
827 throw( uno::RuntimeException
)
829 return m_bCanSetPassword
;
832 //=========================================================================
835 InteractionSupplyAuthentication::setPassword( const rtl::OUString
& Password
)
836 throw( uno::RuntimeException
)
838 OSL_ENSURE( m_bCanSetPassword
,
839 "InteractionSupplyAuthentication::setPassword - Not supported!" );
841 if ( m_bCanSetPassword
)
842 m_aPassword
= Password
;
845 //=========================================================================
847 uno::Sequence
< ucb::RememberAuthentication
> SAL_CALL
848 InteractionSupplyAuthentication::getRememberPasswordModes(
849 ucb::RememberAuthentication
& Default
)
850 throw( uno::RuntimeException
)
852 Default
= m_eDefaultRememberPasswordMode
;
853 return m_aRememberPasswordModes
;
856 //=========================================================================
859 InteractionSupplyAuthentication::setRememberPassword(
860 ucb::RememberAuthentication Remember
)
861 throw( uno::RuntimeException
)
863 m_eRememberPasswordMode
= Remember
;
866 //=========================================================================
869 InteractionSupplyAuthentication::canSetAccount()
870 throw( uno::RuntimeException
)
872 return m_bCanSetAccount
;
875 //=========================================================================
878 InteractionSupplyAuthentication::setAccount( const rtl::OUString
& Account
)
879 throw( uno::RuntimeException
)
881 OSL_ENSURE( m_bCanSetAccount
,
882 "InteractionSupplyAuthentication::setAccount - Not supported!" );
884 if ( m_bCanSetAccount
)
885 m_aAccount
= Account
;
888 //=========================================================================
890 uno::Sequence
< ucb::RememberAuthentication
> SAL_CALL
891 InteractionSupplyAuthentication::getRememberAccountModes(
892 ucb::RememberAuthentication
& Default
)
893 throw( uno::RuntimeException
)
895 Default
= m_eDefaultRememberAccountMode
;
896 return m_aRememberAccountModes
;
899 //=========================================================================
901 void SAL_CALL
InteractionSupplyAuthentication::setRememberAccount(
902 ucb::RememberAuthentication Remember
)
903 throw( uno::RuntimeException
)
905 m_eRememberAccountMode
= Remember
;
908 //=========================================================================
910 // XInteractionSupplyAuthentication2 methods.
912 //=========================================================================
916 InteractionSupplyAuthentication::canUseSystemCredentials(
917 ::sal_Bool
& Default
)
918 throw ( uno::RuntimeException
)
920 Default
= m_bDefaultUseSystemCredentials
;
921 return m_bCanUseSystemCredentials
;
924 //=========================================================================
926 void SAL_CALL
InteractionSupplyAuthentication::setUseSystemCredentials(
927 ::sal_Bool UseSystemCredentials
)
928 throw ( uno::RuntimeException
)
930 if ( m_bCanUseSystemCredentials
)
931 m_bUseSystemCredentials
= UseSystemCredentials
;
935 //=========================================================================
936 //=========================================================================
938 // InteractionSupplyName Implementation.
940 //=========================================================================
941 //=========================================================================
943 //=========================================================================
945 // XInterface methods.
947 //=========================================================================
950 void SAL_CALL
InteractionSupplyName::acquire()
953 OWeakObject::acquire();
956 //=========================================================================
958 void SAL_CALL
InteractionSupplyName::release()
961 OWeakObject::release();
964 //=========================================================================
967 InteractionSupplyName::queryInterface( const uno::Type
& rType
)
968 throw ( uno::RuntimeException
)
970 uno::Any aRet
= cppu::queryInterface( rType
,
971 static_cast< lang::XTypeProvider
* >( this ),
972 static_cast< task::XInteractionContinuation
* >( this ),
973 static_cast< ucb::XInteractionSupplyName
* >( this ) );
975 return aRet
.hasValue()
976 ? aRet
: InteractionContinuation::queryInterface( rType
);
979 //=========================================================================
981 // XTypeProvider methods.
983 //=========================================================================
986 uno::Sequence
< sal_Int8
> SAL_CALL
InteractionSupplyName::getImplementationId()
987 throw( uno::RuntimeException
)
989 static cppu::OImplementationId
* pId
= NULL
;
992 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
995 static cppu::OImplementationId
id( sal_False
);
999 return (*pId
).getImplementationId();
1002 //=========================================================================
1004 uno::Sequence
< uno::Type
> SAL_CALL
InteractionSupplyName::getTypes()
1005 throw( uno::RuntimeException
)
1007 static cppu::OTypeCollection
* pCollection
= 0;
1010 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
1013 static cppu::OTypeCollection
collection(
1014 getCppuType( static_cast<
1015 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
1016 getCppuType( static_cast<
1017 uno::Reference
< ucb::XInteractionSupplyName
> * >( 0 ) ) );
1018 pCollection
= &collection
;
1021 return (*pCollection
).getTypes();
1024 //=========================================================================
1026 // XInteractionContinuation methods.
1028 //=========================================================================
1031 void SAL_CALL
InteractionSupplyName::select()
1032 throw( uno::RuntimeException
)
1037 //=========================================================================
1039 // XInteractionSupplyName methods.
1041 //=========================================================================
1045 InteractionSupplyName::setName( const rtl::OUString
& Name
)
1046 throw( uno::RuntimeException
)
1051 //=========================================================================
1052 //=========================================================================
1054 // InteractionReplaceExistingData Implementation.
1056 //=========================================================================
1057 //=========================================================================
1059 //=========================================================================
1061 // XInterface methods.
1063 //=========================================================================
1066 void SAL_CALL
InteractionReplaceExistingData::acquire()
1069 OWeakObject::acquire();
1072 //=========================================================================
1074 void SAL_CALL
InteractionReplaceExistingData::release()
1077 OWeakObject::release();
1080 //=========================================================================
1083 InteractionReplaceExistingData::queryInterface( const uno::Type
& rType
)
1084 throw ( uno::RuntimeException
)
1086 uno::Any aRet
= cppu::queryInterface( rType
,
1087 static_cast< lang::XTypeProvider
* >( this ),
1088 static_cast< task::XInteractionContinuation
* >( this ),
1089 static_cast< ucb::XInteractionReplaceExistingData
* >( this ) );
1091 return aRet
.hasValue()
1092 ? aRet
: InteractionContinuation::queryInterface( rType
);
1095 //=========================================================================
1097 // XTypeProvider methods.
1099 //=========================================================================
1102 uno::Sequence
< sal_Int8
> SAL_CALL
1103 InteractionReplaceExistingData::getImplementationId()
1104 throw( uno::RuntimeException
)
1106 static cppu::OImplementationId
* pId
= NULL
;
1109 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
1112 static cppu::OImplementationId
id( sal_False
);
1116 return (*pId
).getImplementationId();
1119 //=========================================================================
1121 uno::Sequence
< uno::Type
> SAL_CALL
InteractionReplaceExistingData::getTypes()
1122 throw( uno::RuntimeException
)
1124 static cppu::OTypeCollection
* pCollection
= 0;
1127 osl::Guard
< osl::Mutex
> aGuard( osl::Mutex::getGlobalMutex() );
1130 static cppu::OTypeCollection
collection(
1131 getCppuType( static_cast<
1132 uno::Reference
< lang::XTypeProvider
> * >( 0 ) ),
1133 getCppuType( static_cast<
1135 ucb::XInteractionReplaceExistingData
> * >( 0 ) ) );
1136 pCollection
= &collection
;
1139 return (*pCollection
).getTypes();
1142 //=========================================================================
1144 // XInteractionContinuation methods.
1146 //=========================================================================
1149 void SAL_CALL
InteractionReplaceExistingData::select()
1150 throw( uno::RuntimeException
)