1 /**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 *
11 * http://www.apache.org/licenses/LICENSE-2.0
12 *
13 * Unless required by applicable law or agreed to in writing,
14 * software distributed under the License is distributed on an
15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16 * KIND, either express or implied. See the License for the
17 * specific language governing permissions and limitations
18 * under the License.
19 *
20 *************************************************************/
21
22
23
24 // MARKER(update_precomp.py): autogen include statement, do not remove
25 #include "precompiled_ucbhelper.hxx"
26
27 /**************************************************************************
28 TODO
29 **************************************************************************
30
31 *************************************************************************/
32 #include <osl/mutex.hxx>
33 #include <cppuhelper/typeprovider.hxx>
34 #include <ucbhelper/interactionrequest.hxx>
35
36 using namespace com::sun::star;
37 using namespace ucbhelper;
38
39 //=========================================================================
40 //=========================================================================
41 //
42 // InteractionRequest Implementation.
43 //
44 //=========================================================================
45 //=========================================================================
46
47 namespace ucbhelper
48 {
49
50 struct InteractionRequest_Impl
51 {
52 rtl::Reference< InteractionContinuation > m_xSelection;
53 com::sun::star::uno::Any m_aRequest;
54 com::sun::star::uno::Sequence<
55 com::sun::star::uno::Reference<
56 com::sun::star::task::XInteractionContinuation > > m_aContinuations;
57
InteractionRequest_Implucbhelper::InteractionRequest_Impl58 InteractionRequest_Impl() {}
InteractionRequest_Implucbhelper::InteractionRequest_Impl59 InteractionRequest_Impl( const uno::Any & rRequest )
60 : m_aRequest( rRequest ) {}
61 };
62
63 }
64
65 //=========================================================================
InteractionRequest()66 InteractionRequest::InteractionRequest()
67 : m_pImpl( new InteractionRequest_Impl )
68 {
69 }
70
71 //=========================================================================
InteractionRequest(const uno::Any & rRequest)72 InteractionRequest::InteractionRequest( const uno::Any & rRequest )
73 : m_pImpl( new InteractionRequest_Impl( rRequest ) )
74 {
75 }
76
77 //=========================================================================
78 // virtual
~InteractionRequest()79 InteractionRequest::~InteractionRequest()
80 {
81 delete m_pImpl;
82 }
83
84 //=========================================================================
setRequest(const uno::Any & rRequest)85 void InteractionRequest::setRequest( const uno::Any & rRequest )
86 {
87 m_pImpl->m_aRequest = rRequest;
88 }
89
90 //=========================================================================
setContinuations(const uno::Sequence<uno::Reference<task::XInteractionContinuation>> & rContinuations)91 void InteractionRequest::setContinuations(
92 const uno::Sequence< uno::Reference<
93 task::XInteractionContinuation > > & rContinuations )
94 {
95 m_pImpl->m_aContinuations = rContinuations;
96 }
97
98 //=========================================================================
99 rtl::Reference< InteractionContinuation >
getSelection() const100 InteractionRequest::getSelection() const
101 {
102 return m_pImpl->m_xSelection;
103 }
104
105 //=========================================================================
setSelection(const rtl::Reference<InteractionContinuation> & rxSelection)106 void InteractionRequest::setSelection(
107 const rtl::Reference< InteractionContinuation > & rxSelection )
108 {
109 m_pImpl->m_xSelection = rxSelection;
110 }
111
112 //=========================================================================
113 //
114 // XInterface methods.
115 //
116 //=========================================================================
117
118 // virtual
acquire()119 void SAL_CALL InteractionRequest::acquire()
120 throw()
121 {
122 OWeakObject::acquire();
123 }
124
125 //=========================================================================
126 // virtual
release()127 void SAL_CALL InteractionRequest::release()
128 throw()
129 {
130 OWeakObject::release();
131 }
132
133 //=========================================================================
134 // virtual
135 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)136 InteractionRequest::queryInterface( const uno::Type & rType )
137 throw ( uno::RuntimeException )
138 {
139 uno::Any aRet = cppu::queryInterface( rType,
140 static_cast< lang::XTypeProvider * >( this ),
141 static_cast< task::XInteractionRequest * >( this ) );
142
143 return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
144 }
145
146 //=========================================================================
147 //
148 // XTypeProvider methods.
149 //
150 //=========================================================================
151
152 // virtual
getImplementationId()153 uno::Sequence< sal_Int8 > SAL_CALL InteractionRequest::getImplementationId()
154 throw( uno::RuntimeException )
155 {
156 static cppu::OImplementationId* pId = NULL;
157 if ( !pId )
158 {
159 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
160 if ( !pId )
161 {
162 static cppu::OImplementationId id( sal_False );
163 pId = &id;
164 }
165 }
166 return (*pId).getImplementationId();
167 }
168
169 //=========================================================================
170 // virtual
getTypes()171 uno::Sequence< uno::Type > SAL_CALL InteractionRequest::getTypes()
172 throw( uno::RuntimeException )
173 {
174 static cppu::OTypeCollection* pCollection = 0;
175 if ( !pCollection )
176 {
177 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
178 if ( !pCollection )
179 {
180 static cppu::OTypeCollection collection(
181 getCppuType( static_cast<
182 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
183 getCppuType( static_cast<
184 uno::Reference< task::XInteractionRequest > * >( 0 ) ) );
185 pCollection = &collection;
186 }
187 }
188 return (*pCollection).getTypes();
189 }
190
191 //=========================================================================
192 //
193 // XInteractionRequest methods.
194 //
195 //=========================================================================
196
197 // virtual
getRequest()198 uno::Any SAL_CALL InteractionRequest::getRequest()
199 throw( uno::RuntimeException )
200 {
201 return m_pImpl->m_aRequest;
202 }
203
204 //=========================================================================
205 // virtual
206 uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL
getContinuations()207 InteractionRequest::getContinuations()
208 throw( uno::RuntimeException )
209 {
210 return m_pImpl->m_aContinuations;
211 }
212
213 //=========================================================================
214 //=========================================================================
215 //
216 // InteractionContinuation Implementation.
217 //
218 //=========================================================================
219 //=========================================================================
220
221 namespace ucbhelper
222 {
223
224 struct InteractionContinuation_Impl
225 {
226 InteractionRequest * m_pRequest;
227
InteractionContinuation_Implucbhelper::InteractionContinuation_Impl228 InteractionContinuation_Impl( InteractionRequest * pRequest )
229 : m_pRequest( pRequest ) {}
230 };
231
232 }
233
234 //=========================================================================
InteractionContinuation(InteractionRequest * pRequest)235 InteractionContinuation::InteractionContinuation(
236 InteractionRequest * pRequest )
237 : m_pImpl( new InteractionContinuation_Impl( pRequest ) )
238 {
239 }
240
241 //=========================================================================
242 // virtual
~InteractionContinuation()243 InteractionContinuation::~InteractionContinuation()
244 {
245 delete m_pImpl;
246 }
247
248 //=========================================================================
recordSelection()249 void InteractionContinuation::recordSelection()
250 {
251 m_pImpl->m_pRequest->setSelection( this );
252 }
253
254 //=========================================================================
255 //=========================================================================
256 //
257 // InteractionAbort Implementation.
258 //
259 //=========================================================================
260 //=========================================================================
261
262 //=========================================================================
263 //
264 // XInterface methods.
265 //
266 //=========================================================================
267
268 // virtual
acquire()269 void SAL_CALL InteractionAbort::acquire()
270 throw()
271 {
272 OWeakObject::acquire();
273 }
274
275 //=========================================================================
276 // virtual
release()277 void SAL_CALL InteractionAbort::release()
278 throw()
279 {
280 OWeakObject::release();
281 }
282
283 //=========================================================================
284 // virtual
285 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)286 InteractionAbort::queryInterface( const uno::Type & rType )
287 throw ( uno::RuntimeException )
288 {
289 uno::Any aRet = cppu::queryInterface( rType,
290 static_cast< lang::XTypeProvider * >( this ),
291 static_cast< task::XInteractionContinuation * >( this ),
292 static_cast< task::XInteractionAbort * >( this ) );
293
294 return aRet.hasValue()
295 ? aRet : InteractionContinuation::queryInterface( rType );
296 }
297
298 //=========================================================================
299 //
300 // XTypeProvider methods.
301 //
302 //=========================================================================
303
304 // virtual
getImplementationId()305 uno::Sequence< sal_Int8 > SAL_CALL InteractionAbort::getImplementationId()
306 throw( uno::RuntimeException )
307 {
308 static cppu::OImplementationId* pId = NULL;
309 if ( !pId )
310 {
311 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
312 if ( !pId )
313 {
314 static cppu::OImplementationId id( sal_False );
315 pId = &id;
316 }
317 }
318 return (*pId).getImplementationId();
319 }
320
321 //=========================================================================
322 // virtual
getTypes()323 uno::Sequence< uno::Type > SAL_CALL InteractionAbort::getTypes()
324 throw( uno::RuntimeException )
325 {
326 static cppu::OTypeCollection* pCollection = 0;
327 if ( !pCollection )
328 {
329 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
330 if ( !pCollection )
331 {
332 static cppu::OTypeCollection collection(
333 getCppuType( static_cast<
334 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
335 getCppuType( static_cast<
336 uno::Reference< task::XInteractionAbort > * >( 0 ) ) );
337 pCollection = &collection;
338 }
339 }
340 return (*pCollection).getTypes();
341 }
342
343 //=========================================================================
344 //
345 // XInteractionContinuation methods.
346 //
347 //=========================================================================
348
349 // virtual
select()350 void SAL_CALL InteractionAbort::select()
351 throw( uno::RuntimeException )
352 {
353 recordSelection();
354 }
355
356 //=========================================================================
357 //=========================================================================
358 //
359 // InteractionRetry Implementation.
360 //
361 //=========================================================================
362 //=========================================================================
363
364 //=========================================================================
365 //
366 // XInterface methods.
367 //
368 //=========================================================================
369
370 // virtual
acquire()371 void SAL_CALL InteractionRetry::acquire()
372 throw()
373 {
374 OWeakObject::acquire();
375 }
376
377 //=========================================================================
378 // virtual
release()379 void SAL_CALL InteractionRetry::release()
380 throw()
381 {
382 OWeakObject::release();
383 }
384
385 //=========================================================================
386 // virtual
387 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)388 InteractionRetry::queryInterface( const uno::Type & rType )
389 throw ( uno::RuntimeException )
390 {
391 uno::Any aRet = cppu::queryInterface( rType,
392 static_cast< lang::XTypeProvider * >( this ),
393 static_cast< task::XInteractionContinuation * >( this ),
394 static_cast< task::XInteractionRetry * >( this ) );
395
396 return aRet.hasValue()
397 ? aRet : InteractionContinuation::queryInterface( rType );
398 }
399
400 //=========================================================================
401 //
402 // XTypeProvider methods.
403 //
404 //=========================================================================
405
406 // virtual
getImplementationId()407 uno::Sequence< sal_Int8 > SAL_CALL InteractionRetry::getImplementationId()
408 throw( uno::RuntimeException )
409 {
410 static cppu::OImplementationId* pId = NULL;
411 if ( !pId )
412 {
413 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
414 if ( !pId )
415 {
416 static cppu::OImplementationId id( sal_False );
417 pId = &id;
418 }
419 }
420 return (*pId).getImplementationId();
421 }
422
423 //=========================================================================
424 // virtual
getTypes()425 uno::Sequence< uno::Type > SAL_CALL InteractionRetry::getTypes()
426 throw( uno::RuntimeException )
427 {
428 static cppu::OTypeCollection* pCollection = 0;
429 if ( !pCollection )
430 {
431 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
432 if ( !pCollection )
433 {
434 static cppu::OTypeCollection collection(
435 getCppuType( static_cast<
436 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
437 getCppuType( static_cast<
438 uno::Reference< task::XInteractionRetry > * >( 0 ) ) );
439 pCollection = &collection;
440 }
441 }
442 return (*pCollection).getTypes();
443 }
444
445 //=========================================================================
446 //
447 // XInteractionContinuation methods.
448 //
449 //=========================================================================
450
451 // virtual
select()452 void SAL_CALL InteractionRetry::select()
453 throw( uno::RuntimeException )
454 {
455 recordSelection();
456 }
457
458 //=========================================================================
459 //=========================================================================
460 //
461 // InteractionApprove Implementation.
462 //
463 //=========================================================================
464 //=========================================================================
465
466 //=========================================================================
467 //
468 // XInterface methods.
469 //
470 //=========================================================================
471
472 // virtual
acquire()473 void SAL_CALL InteractionApprove::acquire()
474 throw()
475 {
476 OWeakObject::acquire();
477 }
478
479 //=========================================================================
480 // virtual
release()481 void SAL_CALL InteractionApprove::release()
482 throw()
483 {
484 OWeakObject::release();
485 }
486
487 //=========================================================================
488 // virtual
489 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)490 InteractionApprove::queryInterface( const uno::Type & rType )
491 throw ( uno::RuntimeException )
492 {
493 uno::Any aRet = cppu::queryInterface( rType,
494 static_cast< lang::XTypeProvider * >( this ),
495 static_cast< task::XInteractionContinuation * >( this ),
496 static_cast< task::XInteractionApprove * >( this ) );
497
498 return aRet.hasValue()
499 ? aRet : InteractionContinuation::queryInterface( rType );
500 }
501
502 //=========================================================================
503 //
504 // XTypeProvider methods.
505 //
506 //=========================================================================
507
508 // virtual
getImplementationId()509 uno::Sequence< sal_Int8 > SAL_CALL InteractionApprove::getImplementationId()
510 throw( uno::RuntimeException )
511 {
512 static cppu::OImplementationId* pId = NULL;
513 if ( !pId )
514 {
515 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
516 if ( !pId )
517 {
518 static cppu::OImplementationId id( sal_False );
519 pId = &id;
520 }
521 }
522 return (*pId).getImplementationId();
523 }
524
525 //=========================================================================
526 // virtual
getTypes()527 uno::Sequence< uno::Type > SAL_CALL InteractionApprove::getTypes()
528 throw( uno::RuntimeException )
529 {
530 static cppu::OTypeCollection* pCollection = 0;
531 if ( !pCollection )
532 {
533 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
534 if ( !pCollection )
535 {
536 static cppu::OTypeCollection collection(
537 getCppuType( static_cast<
538 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
539 getCppuType( static_cast<
540 uno::Reference< task::XInteractionApprove > * >( 0 ) ) );
541 pCollection = &collection;
542 }
543 }
544 return (*pCollection).getTypes();
545 }
546
547 //=========================================================================
548 //
549 // XInteractionContinuation methods.
550 //
551 //=========================================================================
552
553 // virtual
select()554 void SAL_CALL InteractionApprove::select()
555 throw( uno::RuntimeException )
556 {
557 recordSelection();
558 }
559
560 //=========================================================================
561 //=========================================================================
562 //
563 // InteractionDisapprove Implementation.
564 //
565 //=========================================================================
566 //=========================================================================
567
568 //=========================================================================
569 //
570 // XInterface methods.
571 //
572 //=========================================================================
573
574 // virtual
acquire()575 void SAL_CALL InteractionDisapprove::acquire()
576 throw()
577 {
578 OWeakObject::acquire();
579 }
580
581 //=========================================================================
582 // virtual
release()583 void SAL_CALL InteractionDisapprove::release()
584 throw()
585 {
586 OWeakObject::release();
587 }
588
589 //=========================================================================
590 // virtual
591 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)592 InteractionDisapprove::queryInterface( const uno::Type & rType )
593 throw ( uno::RuntimeException )
594 {
595 uno::Any aRet = cppu::queryInterface( rType,
596 static_cast< lang::XTypeProvider * >( this ),
597 static_cast< task::XInteractionContinuation * >( this ),
598 static_cast< task::XInteractionDisapprove * >( this ) );
599
600 return aRet.hasValue()
601 ? aRet : InteractionContinuation::queryInterface( rType );
602 }
603
604 //=========================================================================
605 //
606 // XTypeProvider methods.
607 //
608 //=========================================================================
609
610 // virtual
getImplementationId()611 uno::Sequence< sal_Int8 > SAL_CALL InteractionDisapprove::getImplementationId()
612 throw( uno::RuntimeException )
613 {
614 static cppu::OImplementationId* pId = NULL;
615 if ( !pId )
616 {
617 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
618 if ( !pId )
619 {
620 static cppu::OImplementationId id( sal_False );
621 pId = &id;
622 }
623 }
624 return (*pId).getImplementationId();
625 }
626
627 //=========================================================================
628 // virtual
getTypes()629 uno::Sequence< uno::Type > SAL_CALL InteractionDisapprove::getTypes()
630 throw( uno::RuntimeException )
631 {
632 static cppu::OTypeCollection* pCollection = 0;
633 if ( !pCollection )
634 {
635 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
636 if ( !pCollection )
637 {
638 static cppu::OTypeCollection collection(
639 getCppuType( static_cast<
640 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
641 getCppuType( static_cast<
642 uno::Reference< task::XInteractionDisapprove > * >( 0 ) ) );
643 pCollection = &collection;
644 }
645 }
646 return (*pCollection).getTypes();
647 }
648
649 //=========================================================================
650 //
651 // XInteractionContinuation methods.
652 //
653 //=========================================================================
654
655 // virtual
select()656 void SAL_CALL InteractionDisapprove::select()
657 throw( uno::RuntimeException )
658 {
659 recordSelection();
660 }
661
662 //=========================================================================
663 //=========================================================================
664 //
665 // InteractionSupplyAuthentication Implementation.
666 //
667 //=========================================================================
668 //=========================================================================
669
670 //=========================================================================
671 //
672 // XInterface methods.
673 //
674 //=========================================================================
675
676 // virtual
acquire()677 void SAL_CALL InteractionSupplyAuthentication::acquire()
678 throw()
679 {
680 OWeakObject::acquire();
681 }
682
683 //=========================================================================
684 // virtual
release()685 void SAL_CALL InteractionSupplyAuthentication::release()
686 throw()
687 {
688 OWeakObject::release();
689 }
690
691 //=========================================================================
692 // virtual
693 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)694 InteractionSupplyAuthentication::queryInterface( const uno::Type & rType )
695 throw ( uno::RuntimeException )
696 {
697 uno::Any aRet = cppu::queryInterface( rType,
698 static_cast< lang::XTypeProvider * >( this ),
699 static_cast< task::XInteractionContinuation * >( this ),
700 static_cast< ucb::XInteractionSupplyAuthentication * >( this ),
701 static_cast< ucb::XInteractionSupplyAuthentication2 * >( this ));
702
703 return aRet.hasValue()
704 ? aRet : InteractionContinuation::queryInterface( rType );
705 }
706
707 //=========================================================================
708 //
709 // XTypeProvider methods.
710 //
711 //=========================================================================
712
713 // virtual
714 uno::Sequence< sal_Int8 > SAL_CALL
getImplementationId()715 InteractionSupplyAuthentication::getImplementationId()
716 throw( uno::RuntimeException )
717 {
718 static cppu::OImplementationId* pId = NULL;
719 if ( !pId )
720 {
721 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
722 if ( !pId )
723 {
724 static cppu::OImplementationId id( sal_False );
725 pId = &id;
726 }
727 }
728 return (*pId).getImplementationId();
729 }
730
731 //=========================================================================
732 // virtual
getTypes()733 uno::Sequence< uno::Type > SAL_CALL InteractionSupplyAuthentication::getTypes()
734 throw( uno::RuntimeException )
735 {
736 static cppu::OTypeCollection* pCollection = 0;
737 if ( !pCollection )
738 {
739 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
740 if ( !pCollection )
741 {
742 static cppu::OTypeCollection collection(
743 getCppuType( static_cast<
744 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
745 getCppuType( static_cast<
746 uno::Reference<
747 ucb::XInteractionSupplyAuthentication2 > * >( 0 ) ) );
748 pCollection = &collection;
749 }
750 }
751 return (*pCollection).getTypes();
752 }
753
754 //=========================================================================
755 //
756 // XInteractionContinuation methods.
757 //
758 //=========================================================================
759
760 // virtual
select()761 void SAL_CALL InteractionSupplyAuthentication::select()
762 throw( uno::RuntimeException )
763 {
764 recordSelection();
765 }
766
767 //=========================================================================
768 //
769 // XInteractionSupplyAuthentication methods.
770 //
771 //=========================================================================
772
773 // virtual
774 sal_Bool SAL_CALL
canSetRealm()775 InteractionSupplyAuthentication::canSetRealm()
776 throw( uno::RuntimeException )
777 {
778 return m_bCanSetRealm;
779 }
780
781 //=========================================================================
782 // virtual
783 void SAL_CALL
setRealm(const rtl::OUString & Realm)784 InteractionSupplyAuthentication::setRealm( const rtl::OUString& Realm )
785 throw( uno::RuntimeException )
786 {
787 OSL_ENSURE( m_bCanSetPassword,
788 "InteractionSupplyAuthentication::setRealm - Not supported!" );
789
790 if ( m_bCanSetRealm )
791 m_aRealm = Realm;
792 }
793
794 //=========================================================================
795 // virtual
796 sal_Bool SAL_CALL
canSetUserName()797 InteractionSupplyAuthentication::canSetUserName()
798 throw( uno::RuntimeException )
799 {
800 return m_bCanSetUserName;
801 }
802
803 //=========================================================================
804 // virtual
805 void SAL_CALL
setUserName(const rtl::OUString & UserName)806 InteractionSupplyAuthentication::setUserName( const rtl::OUString& UserName )
807 throw( uno::RuntimeException )
808 {
809 OSL_ENSURE( m_bCanSetUserName,
810 "InteractionSupplyAuthentication::setUserName - Not supported!" );
811
812 if ( m_bCanSetUserName )
813 m_aUserName = UserName;
814 }
815
816 //=========================================================================
817 // virtual
818 sal_Bool SAL_CALL
canSetPassword()819 InteractionSupplyAuthentication::canSetPassword()
820 throw( uno::RuntimeException )
821 {
822 return m_bCanSetPassword;
823 }
824
825 //=========================================================================
826 // virtual
827 void SAL_CALL
setPassword(const rtl::OUString & Password)828 InteractionSupplyAuthentication::setPassword( const rtl::OUString& Password )
829 throw( uno::RuntimeException )
830 {
831 OSL_ENSURE( m_bCanSetPassword,
832 "InteractionSupplyAuthentication::setPassword - Not supported!" );
833
834 if ( m_bCanSetPassword )
835 m_aPassword = Password;
836 }
837
838 //=========================================================================
839 // virtual
840 uno::Sequence< ucb::RememberAuthentication > SAL_CALL
getRememberPasswordModes(ucb::RememberAuthentication & Default)841 InteractionSupplyAuthentication::getRememberPasswordModes(
842 ucb::RememberAuthentication& Default )
843 throw( uno::RuntimeException )
844 {
845 Default = m_eDefaultRememberPasswordMode;
846 return m_aRememberPasswordModes;
847 }
848
849 //=========================================================================
850 // virtual
851 void SAL_CALL
setRememberPassword(ucb::RememberAuthentication Remember)852 InteractionSupplyAuthentication::setRememberPassword(
853 ucb::RememberAuthentication Remember )
854 throw( uno::RuntimeException )
855 {
856 m_eRememberPasswordMode = Remember;
857 }
858
859 //=========================================================================
860 // virtual
861 sal_Bool SAL_CALL
canSetAccount()862 InteractionSupplyAuthentication::canSetAccount()
863 throw( uno::RuntimeException )
864 {
865 return m_bCanSetAccount;
866 }
867
868 //=========================================================================
869 // virtual
870 void SAL_CALL
setAccount(const rtl::OUString & Account)871 InteractionSupplyAuthentication::setAccount( const rtl::OUString& Account )
872 throw( uno::RuntimeException )
873 {
874 OSL_ENSURE( m_bCanSetAccount,
875 "InteractionSupplyAuthentication::setAccount - Not supported!" );
876
877 if ( m_bCanSetAccount )
878 m_aAccount = Account;
879 }
880
881 //=========================================================================
882 // virtual
883 uno::Sequence< ucb::RememberAuthentication > SAL_CALL
getRememberAccountModes(ucb::RememberAuthentication & Default)884 InteractionSupplyAuthentication::getRememberAccountModes(
885 ucb::RememberAuthentication& Default )
886 throw( uno::RuntimeException )
887 {
888 Default = m_eDefaultRememberAccountMode;
889 return m_aRememberAccountModes;
890 }
891
892 //=========================================================================
893 // virtual
setRememberAccount(ucb::RememberAuthentication Remember)894 void SAL_CALL InteractionSupplyAuthentication::setRememberAccount(
895 ucb::RememberAuthentication Remember )
896 throw( uno::RuntimeException )
897 {
898 m_eRememberAccountMode = Remember;
899 }
900
901 //=========================================================================
902 //
903 // XInteractionSupplyAuthentication2 methods.
904 //
905 //=========================================================================
906
907 // virtual
908 ::sal_Bool SAL_CALL
canUseSystemCredentials(::sal_Bool & Default)909 InteractionSupplyAuthentication::canUseSystemCredentials(
910 ::sal_Bool& Default )
911 throw ( uno::RuntimeException )
912 {
913 Default = m_bDefaultUseSystemCredentials;
914 return m_bCanUseSystemCredentials;
915 }
916
917 //=========================================================================
918 // virtual
setUseSystemCredentials(::sal_Bool UseSystemCredentials)919 void SAL_CALL InteractionSupplyAuthentication::setUseSystemCredentials(
920 ::sal_Bool UseSystemCredentials )
921 throw ( uno::RuntimeException )
922 {
923 if ( m_bCanUseSystemCredentials )
924 m_bUseSystemCredentials = UseSystemCredentials;
925 }
926
927
928 //=========================================================================
929 //=========================================================================
930 //
931 // InteractionSupplyName Implementation.
932 //
933 //=========================================================================
934 //=========================================================================
935
936 //=========================================================================
937 //
938 // XInterface methods.
939 //
940 //=========================================================================
941
942 // virtual
acquire()943 void SAL_CALL InteractionSupplyName::acquire()
944 throw()
945 {
946 OWeakObject::acquire();
947 }
948
949 //=========================================================================
950 // virtual
release()951 void SAL_CALL InteractionSupplyName::release()
952 throw()
953 {
954 OWeakObject::release();
955 }
956
957 //=========================================================================
958 // virtual
959 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)960 InteractionSupplyName::queryInterface( const uno::Type & rType )
961 throw ( uno::RuntimeException )
962 {
963 uno::Any aRet = cppu::queryInterface( rType,
964 static_cast< lang::XTypeProvider * >( this ),
965 static_cast< task::XInteractionContinuation * >( this ),
966 static_cast< ucb::XInteractionSupplyName * >( this ) );
967
968 return aRet.hasValue()
969 ? aRet : InteractionContinuation::queryInterface( rType );
970 }
971
972 //=========================================================================
973 //
974 // XTypeProvider methods.
975 //
976 //=========================================================================
977
978 // virtual
getImplementationId()979 uno::Sequence< sal_Int8 > SAL_CALL InteractionSupplyName::getImplementationId()
980 throw( uno::RuntimeException )
981 {
982 static cppu::OImplementationId* pId = NULL;
983 if ( !pId )
984 {
985 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
986 if ( !pId )
987 {
988 static cppu::OImplementationId id( sal_False );
989 pId = &id;
990 }
991 }
992 return (*pId).getImplementationId();
993 }
994
995 //=========================================================================
996 // virtual
getTypes()997 uno::Sequence< uno::Type > SAL_CALL InteractionSupplyName::getTypes()
998 throw( uno::RuntimeException )
999 {
1000 static cppu::OTypeCollection* pCollection = 0;
1001 if ( !pCollection )
1002 {
1003 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1004 if ( !pCollection )
1005 {
1006 static cppu::OTypeCollection collection(
1007 getCppuType( static_cast<
1008 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
1009 getCppuType( static_cast<
1010 uno::Reference< ucb::XInteractionSupplyName > * >( 0 ) ) );
1011 pCollection = &collection;
1012 }
1013 }
1014 return (*pCollection).getTypes();
1015 }
1016
1017 //=========================================================================
1018 //
1019 // XInteractionContinuation methods.
1020 //
1021 //=========================================================================
1022
1023 // virtual
select()1024 void SAL_CALL InteractionSupplyName::select()
1025 throw( uno::RuntimeException )
1026 {
1027 recordSelection();
1028 }
1029
1030 //=========================================================================
1031 //
1032 // XInteractionSupplyName methods.
1033 //
1034 //=========================================================================
1035
1036 // virtual
1037 void SAL_CALL
setName(const rtl::OUString & Name)1038 InteractionSupplyName::setName( const rtl::OUString& Name )
1039 throw( uno::RuntimeException )
1040 {
1041 m_aName = Name;
1042 }
1043
1044 //=========================================================================
1045 //=========================================================================
1046 //
1047 // InteractionReplaceExistingData Implementation.
1048 //
1049 //=========================================================================
1050 //=========================================================================
1051
1052 //=========================================================================
1053 //
1054 // XInterface methods.
1055 //
1056 //=========================================================================
1057
1058 // virtual
acquire()1059 void SAL_CALL InteractionReplaceExistingData::acquire()
1060 throw()
1061 {
1062 OWeakObject::acquire();
1063 }
1064
1065 //=========================================================================
1066 // virtual
release()1067 void SAL_CALL InteractionReplaceExistingData::release()
1068 throw()
1069 {
1070 OWeakObject::release();
1071 }
1072
1073 //=========================================================================
1074 // virtual
1075 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)1076 InteractionReplaceExistingData::queryInterface( const uno::Type & rType )
1077 throw ( uno::RuntimeException )
1078 {
1079 uno::Any aRet = cppu::queryInterface( rType,
1080 static_cast< lang::XTypeProvider * >( this ),
1081 static_cast< task::XInteractionContinuation * >( this ),
1082 static_cast< ucb::XInteractionReplaceExistingData * >( this ) );
1083
1084 return aRet.hasValue()
1085 ? aRet : InteractionContinuation::queryInterface( rType );
1086 }
1087
1088 //=========================================================================
1089 //
1090 // XTypeProvider methods.
1091 //
1092 //=========================================================================
1093
1094 // virtual
1095 uno::Sequence< sal_Int8 > SAL_CALL
getImplementationId()1096 InteractionReplaceExistingData::getImplementationId()
1097 throw( uno::RuntimeException )
1098 {
1099 static cppu::OImplementationId* pId = NULL;
1100 if ( !pId )
1101 {
1102 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1103 if ( !pId )
1104 {
1105 static cppu::OImplementationId id( sal_False );
1106 pId = &id;
1107 }
1108 }
1109 return (*pId).getImplementationId();
1110 }
1111
1112 //=========================================================================
1113 // virtual
getTypes()1114 uno::Sequence< uno::Type > SAL_CALL InteractionReplaceExistingData::getTypes()
1115 throw( uno::RuntimeException )
1116 {
1117 static cppu::OTypeCollection* pCollection = 0;
1118 if ( !pCollection )
1119 {
1120 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1121 if ( !pCollection )
1122 {
1123 static cppu::OTypeCollection collection(
1124 getCppuType( static_cast<
1125 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
1126 getCppuType( static_cast<
1127 uno::Reference<
1128 ucb::XInteractionReplaceExistingData > * >( 0 ) ) );
1129 pCollection = &collection;
1130 }
1131 }
1132 return (*pCollection).getTypes();
1133 }
1134
1135 //=========================================================================
1136 //
1137 // XInteractionContinuation methods.
1138 //
1139 //=========================================================================
1140
1141 // virtual
select()1142 void SAL_CALL InteractionReplaceExistingData::select()
1143 throw( uno::RuntimeException )
1144 {
1145 recordSelection();
1146 }
1147
1148