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 {
138 uno::Any aRet = cppu::queryInterface( rType,
139 static_cast< lang::XTypeProvider * >( this ),
140 static_cast< task::XInteractionRequest * >( this ) );
141
142 return aRet.hasValue() ? aRet : OWeakObject::queryInterface( rType );
143 }
144
145 //=========================================================================
146 //
147 // XTypeProvider methods.
148 //
149 //=========================================================================
150
151 // virtual
getImplementationId()152 uno::Sequence< sal_Int8 > SAL_CALL InteractionRequest::getImplementationId()
153 {
154 static cppu::OImplementationId* pId = NULL;
155 if ( !pId )
156 {
157 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
158 if ( !pId )
159 {
160 static cppu::OImplementationId id( sal_False );
161 pId = &id;
162 }
163 }
164 return (*pId).getImplementationId();
165 }
166
167 //=========================================================================
168 // virtual
getTypes()169 uno::Sequence< uno::Type > SAL_CALL InteractionRequest::getTypes()
170 {
171 static cppu::OTypeCollection* pCollection = 0;
172 if ( !pCollection )
173 {
174 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
175 if ( !pCollection )
176 {
177 static cppu::OTypeCollection collection(
178 getCppuType( static_cast<
179 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
180 getCppuType( static_cast<
181 uno::Reference< task::XInteractionRequest > * >( 0 ) ) );
182 pCollection = &collection;
183 }
184 }
185 return (*pCollection).getTypes();
186 }
187
188 //=========================================================================
189 //
190 // XInteractionRequest methods.
191 //
192 //=========================================================================
193
194 // virtual
getRequest()195 uno::Any SAL_CALL InteractionRequest::getRequest()
196 {
197 return m_pImpl->m_aRequest;
198 }
199
200 //=========================================================================
201 // virtual
202 uno::Sequence< uno::Reference< task::XInteractionContinuation > > SAL_CALL
getContinuations()203 InteractionRequest::getContinuations()
204 {
205 return m_pImpl->m_aContinuations;
206 }
207
208 //=========================================================================
209 //=========================================================================
210 //
211 // InteractionContinuation Implementation.
212 //
213 //=========================================================================
214 //=========================================================================
215
216 namespace ucbhelper
217 {
218
219 struct InteractionContinuation_Impl
220 {
221 InteractionRequest * m_pRequest;
222
InteractionContinuation_Implucbhelper::InteractionContinuation_Impl223 InteractionContinuation_Impl( InteractionRequest * pRequest )
224 : m_pRequest( pRequest ) {}
225 };
226
227 }
228
229 //=========================================================================
InteractionContinuation(InteractionRequest * pRequest)230 InteractionContinuation::InteractionContinuation(
231 InteractionRequest * pRequest )
232 : m_pImpl( new InteractionContinuation_Impl( pRequest ) )
233 {
234 }
235
236 //=========================================================================
237 // virtual
~InteractionContinuation()238 InteractionContinuation::~InteractionContinuation()
239 {
240 delete m_pImpl;
241 }
242
243 //=========================================================================
recordSelection()244 void InteractionContinuation::recordSelection()
245 {
246 m_pImpl->m_pRequest->setSelection( this );
247 }
248
249 //=========================================================================
250 //=========================================================================
251 //
252 // InteractionAbort Implementation.
253 //
254 //=========================================================================
255 //=========================================================================
256
257 //=========================================================================
258 //
259 // XInterface methods.
260 //
261 //=========================================================================
262
263 // virtual
acquire()264 void SAL_CALL InteractionAbort::acquire()
265 throw()
266 {
267 OWeakObject::acquire();
268 }
269
270 //=========================================================================
271 // virtual
release()272 void SAL_CALL InteractionAbort::release()
273 throw()
274 {
275 OWeakObject::release();
276 }
277
278 //=========================================================================
279 // virtual
280 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)281 InteractionAbort::queryInterface( const uno::Type & rType )
282 {
283 uno::Any aRet = cppu::queryInterface( rType,
284 static_cast< lang::XTypeProvider * >( this ),
285 static_cast< task::XInteractionContinuation * >( this ),
286 static_cast< task::XInteractionAbort * >( this ) );
287
288 return aRet.hasValue()
289 ? aRet : InteractionContinuation::queryInterface( rType );
290 }
291
292 //=========================================================================
293 //
294 // XTypeProvider methods.
295 //
296 //=========================================================================
297
298 // virtual
getImplementationId()299 uno::Sequence< sal_Int8 > SAL_CALL InteractionAbort::getImplementationId()
300 {
301 static cppu::OImplementationId* pId = NULL;
302 if ( !pId )
303 {
304 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
305 if ( !pId )
306 {
307 static cppu::OImplementationId id( sal_False );
308 pId = &id;
309 }
310 }
311 return (*pId).getImplementationId();
312 }
313
314 //=========================================================================
315 // virtual
getTypes()316 uno::Sequence< uno::Type > SAL_CALL InteractionAbort::getTypes()
317 {
318 static cppu::OTypeCollection* pCollection = 0;
319 if ( !pCollection )
320 {
321 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
322 if ( !pCollection )
323 {
324 static cppu::OTypeCollection collection(
325 getCppuType( static_cast<
326 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
327 getCppuType( static_cast<
328 uno::Reference< task::XInteractionAbort > * >( 0 ) ) );
329 pCollection = &collection;
330 }
331 }
332 return (*pCollection).getTypes();
333 }
334
335 //=========================================================================
336 //
337 // XInteractionContinuation methods.
338 //
339 //=========================================================================
340
341 // virtual
select()342 void SAL_CALL InteractionAbort::select()
343 {
344 recordSelection();
345 }
346
347 //=========================================================================
348 //=========================================================================
349 //
350 // InteractionRetry Implementation.
351 //
352 //=========================================================================
353 //=========================================================================
354
355 //=========================================================================
356 //
357 // XInterface methods.
358 //
359 //=========================================================================
360
361 // virtual
acquire()362 void SAL_CALL InteractionRetry::acquire()
363 throw()
364 {
365 OWeakObject::acquire();
366 }
367
368 //=========================================================================
369 // virtual
release()370 void SAL_CALL InteractionRetry::release()
371 throw()
372 {
373 OWeakObject::release();
374 }
375
376 //=========================================================================
377 // virtual
378 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)379 InteractionRetry::queryInterface( const uno::Type & rType )
380 {
381 uno::Any aRet = cppu::queryInterface( rType,
382 static_cast< lang::XTypeProvider * >( this ),
383 static_cast< task::XInteractionContinuation * >( this ),
384 static_cast< task::XInteractionRetry * >( this ) );
385
386 return aRet.hasValue()
387 ? aRet : InteractionContinuation::queryInterface( rType );
388 }
389
390 //=========================================================================
391 //
392 // XTypeProvider methods.
393 //
394 //=========================================================================
395
396 // virtual
getImplementationId()397 uno::Sequence< sal_Int8 > SAL_CALL InteractionRetry::getImplementationId()
398 {
399 static cppu::OImplementationId* pId = NULL;
400 if ( !pId )
401 {
402 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
403 if ( !pId )
404 {
405 static cppu::OImplementationId id( sal_False );
406 pId = &id;
407 }
408 }
409 return (*pId).getImplementationId();
410 }
411
412 //=========================================================================
413 // virtual
getTypes()414 uno::Sequence< uno::Type > SAL_CALL InteractionRetry::getTypes()
415 {
416 static cppu::OTypeCollection* pCollection = 0;
417 if ( !pCollection )
418 {
419 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
420 if ( !pCollection )
421 {
422 static cppu::OTypeCollection collection(
423 getCppuType( static_cast<
424 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
425 getCppuType( static_cast<
426 uno::Reference< task::XInteractionRetry > * >( 0 ) ) );
427 pCollection = &collection;
428 }
429 }
430 return (*pCollection).getTypes();
431 }
432
433 //=========================================================================
434 //
435 // XInteractionContinuation methods.
436 //
437 //=========================================================================
438
439 // virtual
select()440 void SAL_CALL InteractionRetry::select()
441 {
442 recordSelection();
443 }
444
445 //=========================================================================
446 //=========================================================================
447 //
448 // InteractionApprove Implementation.
449 //
450 //=========================================================================
451 //=========================================================================
452
453 //=========================================================================
454 //
455 // XInterface methods.
456 //
457 //=========================================================================
458
459 // virtual
acquire()460 void SAL_CALL InteractionApprove::acquire()
461 throw()
462 {
463 OWeakObject::acquire();
464 }
465
466 //=========================================================================
467 // virtual
release()468 void SAL_CALL InteractionApprove::release()
469 throw()
470 {
471 OWeakObject::release();
472 }
473
474 //=========================================================================
475 // virtual
476 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)477 InteractionApprove::queryInterface( const uno::Type & rType )
478 {
479 uno::Any aRet = cppu::queryInterface( rType,
480 static_cast< lang::XTypeProvider * >( this ),
481 static_cast< task::XInteractionContinuation * >( this ),
482 static_cast< task::XInteractionApprove * >( this ) );
483
484 return aRet.hasValue()
485 ? aRet : InteractionContinuation::queryInterface( rType );
486 }
487
488 //=========================================================================
489 //
490 // XTypeProvider methods.
491 //
492 //=========================================================================
493
494 // virtual
getImplementationId()495 uno::Sequence< sal_Int8 > SAL_CALL InteractionApprove::getImplementationId()
496 {
497 static cppu::OImplementationId* pId = NULL;
498 if ( !pId )
499 {
500 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
501 if ( !pId )
502 {
503 static cppu::OImplementationId id( sal_False );
504 pId = &id;
505 }
506 }
507 return (*pId).getImplementationId();
508 }
509
510 //=========================================================================
511 // virtual
getTypes()512 uno::Sequence< uno::Type > SAL_CALL InteractionApprove::getTypes()
513 {
514 static cppu::OTypeCollection* pCollection = 0;
515 if ( !pCollection )
516 {
517 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
518 if ( !pCollection )
519 {
520 static cppu::OTypeCollection collection(
521 getCppuType( static_cast<
522 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
523 getCppuType( static_cast<
524 uno::Reference< task::XInteractionApprove > * >( 0 ) ) );
525 pCollection = &collection;
526 }
527 }
528 return (*pCollection).getTypes();
529 }
530
531 //=========================================================================
532 //
533 // XInteractionContinuation methods.
534 //
535 //=========================================================================
536
537 // virtual
select()538 void SAL_CALL InteractionApprove::select()
539 {
540 recordSelection();
541 }
542
543 //=========================================================================
544 //=========================================================================
545 //
546 // InteractionDisapprove Implementation.
547 //
548 //=========================================================================
549 //=========================================================================
550
551 //=========================================================================
552 //
553 // XInterface methods.
554 //
555 //=========================================================================
556
557 // virtual
acquire()558 void SAL_CALL InteractionDisapprove::acquire()
559 throw()
560 {
561 OWeakObject::acquire();
562 }
563
564 //=========================================================================
565 // virtual
release()566 void SAL_CALL InteractionDisapprove::release()
567 throw()
568 {
569 OWeakObject::release();
570 }
571
572 //=========================================================================
573 // virtual
574 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)575 InteractionDisapprove::queryInterface( const uno::Type & rType )
576 {
577 uno::Any aRet = cppu::queryInterface( rType,
578 static_cast< lang::XTypeProvider * >( this ),
579 static_cast< task::XInteractionContinuation * >( this ),
580 static_cast< task::XInteractionDisapprove * >( this ) );
581
582 return aRet.hasValue()
583 ? aRet : InteractionContinuation::queryInterface( rType );
584 }
585
586 //=========================================================================
587 //
588 // XTypeProvider methods.
589 //
590 //=========================================================================
591
592 // virtual
getImplementationId()593 uno::Sequence< sal_Int8 > SAL_CALL InteractionDisapprove::getImplementationId()
594 {
595 static cppu::OImplementationId* pId = NULL;
596 if ( !pId )
597 {
598 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
599 if ( !pId )
600 {
601 static cppu::OImplementationId id( sal_False );
602 pId = &id;
603 }
604 }
605 return (*pId).getImplementationId();
606 }
607
608 //=========================================================================
609 // virtual
getTypes()610 uno::Sequence< uno::Type > SAL_CALL InteractionDisapprove::getTypes()
611 {
612 static cppu::OTypeCollection* pCollection = 0;
613 if ( !pCollection )
614 {
615 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
616 if ( !pCollection )
617 {
618 static cppu::OTypeCollection collection(
619 getCppuType( static_cast<
620 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
621 getCppuType( static_cast<
622 uno::Reference< task::XInteractionDisapprove > * >( 0 ) ) );
623 pCollection = &collection;
624 }
625 }
626 return (*pCollection).getTypes();
627 }
628
629 //=========================================================================
630 //
631 // XInteractionContinuation methods.
632 //
633 //=========================================================================
634
635 // virtual
select()636 void SAL_CALL InteractionDisapprove::select()
637 {
638 recordSelection();
639 }
640
641 //=========================================================================
642 //=========================================================================
643 //
644 // InteractionSupplyAuthentication Implementation.
645 //
646 //=========================================================================
647 //=========================================================================
648
649 //=========================================================================
650 //
651 // XInterface methods.
652 //
653 //=========================================================================
654
655 // virtual
acquire()656 void SAL_CALL InteractionSupplyAuthentication::acquire()
657 throw()
658 {
659 OWeakObject::acquire();
660 }
661
662 //=========================================================================
663 // virtual
release()664 void SAL_CALL InteractionSupplyAuthentication::release()
665 throw()
666 {
667 OWeakObject::release();
668 }
669
670 //=========================================================================
671 // virtual
672 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)673 InteractionSupplyAuthentication::queryInterface( const uno::Type & rType )
674 {
675 uno::Any aRet = cppu::queryInterface( rType,
676 static_cast< lang::XTypeProvider * >( this ),
677 static_cast< task::XInteractionContinuation * >( this ),
678 static_cast< ucb::XInteractionSupplyAuthentication * >( this ),
679 static_cast< ucb::XInteractionSupplyAuthentication2 * >( this ));
680
681 return aRet.hasValue()
682 ? aRet : InteractionContinuation::queryInterface( rType );
683 }
684
685 //=========================================================================
686 //
687 // XTypeProvider methods.
688 //
689 //=========================================================================
690
691 // virtual
692 uno::Sequence< sal_Int8 > SAL_CALL
getImplementationId()693 InteractionSupplyAuthentication::getImplementationId()
694 {
695 static cppu::OImplementationId* pId = NULL;
696 if ( !pId )
697 {
698 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
699 if ( !pId )
700 {
701 static cppu::OImplementationId id( sal_False );
702 pId = &id;
703 }
704 }
705 return (*pId).getImplementationId();
706 }
707
708 //=========================================================================
709 // virtual
getTypes()710 uno::Sequence< uno::Type > SAL_CALL InteractionSupplyAuthentication::getTypes()
711 {
712 static cppu::OTypeCollection* pCollection = 0;
713 if ( !pCollection )
714 {
715 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
716 if ( !pCollection )
717 {
718 static cppu::OTypeCollection collection(
719 getCppuType( static_cast<
720 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
721 getCppuType( static_cast<
722 uno::Reference<
723 ucb::XInteractionSupplyAuthentication2 > * >( 0 ) ) );
724 pCollection = &collection;
725 }
726 }
727 return (*pCollection).getTypes();
728 }
729
730 //=========================================================================
731 //
732 // XInteractionContinuation methods.
733 //
734 //=========================================================================
735
736 // virtual
select()737 void SAL_CALL InteractionSupplyAuthentication::select()
738 {
739 recordSelection();
740 }
741
742 //=========================================================================
743 //
744 // XInteractionSupplyAuthentication methods.
745 //
746 //=========================================================================
747
748 // virtual
749 sal_Bool SAL_CALL
canSetRealm()750 InteractionSupplyAuthentication::canSetRealm()
751 {
752 return m_bCanSetRealm;
753 }
754
755 //=========================================================================
756 // virtual
757 void SAL_CALL
setRealm(const rtl::OUString & Realm)758 InteractionSupplyAuthentication::setRealm( const rtl::OUString& Realm )
759 {
760 OSL_ENSURE( m_bCanSetPassword,
761 "InteractionSupplyAuthentication::setRealm - Not supported!" );
762
763 if ( m_bCanSetRealm )
764 m_aRealm = Realm;
765 }
766
767 //=========================================================================
768 // virtual
769 sal_Bool SAL_CALL
canSetUserName()770 InteractionSupplyAuthentication::canSetUserName()
771 {
772 return m_bCanSetUserName;
773 }
774
775 //=========================================================================
776 // virtual
777 void SAL_CALL
setUserName(const rtl::OUString & UserName)778 InteractionSupplyAuthentication::setUserName( const rtl::OUString& UserName )
779 {
780 OSL_ENSURE( m_bCanSetUserName,
781 "InteractionSupplyAuthentication::setUserName - Not supported!" );
782
783 if ( m_bCanSetUserName )
784 m_aUserName = UserName;
785 }
786
787 //=========================================================================
788 // virtual
789 sal_Bool SAL_CALL
canSetPassword()790 InteractionSupplyAuthentication::canSetPassword()
791 {
792 return m_bCanSetPassword;
793 }
794
795 //=========================================================================
796 // virtual
797 void SAL_CALL
setPassword(const rtl::OUString & Password)798 InteractionSupplyAuthentication::setPassword( const rtl::OUString& Password )
799 {
800 OSL_ENSURE( m_bCanSetPassword,
801 "InteractionSupplyAuthentication::setPassword - Not supported!" );
802
803 if ( m_bCanSetPassword )
804 m_aPassword = Password;
805 }
806
807 //=========================================================================
808 // virtual
809 uno::Sequence< ucb::RememberAuthentication > SAL_CALL
getRememberPasswordModes(ucb::RememberAuthentication & Default)810 InteractionSupplyAuthentication::getRememberPasswordModes(
811 ucb::RememberAuthentication& Default )
812 {
813 Default = m_eDefaultRememberPasswordMode;
814 return m_aRememberPasswordModes;
815 }
816
817 //=========================================================================
818 // virtual
819 void SAL_CALL
setRememberPassword(ucb::RememberAuthentication Remember)820 InteractionSupplyAuthentication::setRememberPassword(
821 ucb::RememberAuthentication Remember )
822 {
823 m_eRememberPasswordMode = Remember;
824 }
825
826 //=========================================================================
827 // virtual
828 sal_Bool SAL_CALL
canSetAccount()829 InteractionSupplyAuthentication::canSetAccount()
830 {
831 return m_bCanSetAccount;
832 }
833
834 //=========================================================================
835 // virtual
836 void SAL_CALL
setAccount(const rtl::OUString & Account)837 InteractionSupplyAuthentication::setAccount( const rtl::OUString& Account )
838 {
839 OSL_ENSURE( m_bCanSetAccount,
840 "InteractionSupplyAuthentication::setAccount - Not supported!" );
841
842 if ( m_bCanSetAccount )
843 m_aAccount = Account;
844 }
845
846 //=========================================================================
847 // virtual
848 uno::Sequence< ucb::RememberAuthentication > SAL_CALL
getRememberAccountModes(ucb::RememberAuthentication & Default)849 InteractionSupplyAuthentication::getRememberAccountModes(
850 ucb::RememberAuthentication& Default )
851 {
852 Default = m_eDefaultRememberAccountMode;
853 return m_aRememberAccountModes;
854 }
855
856 //=========================================================================
857 // virtual
setRememberAccount(ucb::RememberAuthentication Remember)858 void SAL_CALL InteractionSupplyAuthentication::setRememberAccount(
859 ucb::RememberAuthentication Remember )
860 {
861 m_eRememberAccountMode = Remember;
862 }
863
864 //=========================================================================
865 //
866 // XInteractionSupplyAuthentication2 methods.
867 //
868 //=========================================================================
869
870 // virtual
871 ::sal_Bool SAL_CALL
canUseSystemCredentials(::sal_Bool & Default)872 InteractionSupplyAuthentication::canUseSystemCredentials(
873 ::sal_Bool& Default )
874 {
875 Default = m_bDefaultUseSystemCredentials;
876 return m_bCanUseSystemCredentials;
877 }
878
879 //=========================================================================
880 // virtual
setUseSystemCredentials(::sal_Bool UseSystemCredentials)881 void SAL_CALL InteractionSupplyAuthentication::setUseSystemCredentials(
882 ::sal_Bool UseSystemCredentials )
883 {
884 if ( m_bCanUseSystemCredentials )
885 m_bUseSystemCredentials = UseSystemCredentials;
886 }
887
888
889 //=========================================================================
890 //=========================================================================
891 //
892 // InteractionSupplyName Implementation.
893 //
894 //=========================================================================
895 //=========================================================================
896
897 //=========================================================================
898 //
899 // XInterface methods.
900 //
901 //=========================================================================
902
903 // virtual
acquire()904 void SAL_CALL InteractionSupplyName::acquire()
905 throw()
906 {
907 OWeakObject::acquire();
908 }
909
910 //=========================================================================
911 // virtual
release()912 void SAL_CALL InteractionSupplyName::release()
913 throw()
914 {
915 OWeakObject::release();
916 }
917
918 //=========================================================================
919 // virtual
920 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)921 InteractionSupplyName::queryInterface( const uno::Type & rType )
922 {
923 uno::Any aRet = cppu::queryInterface( rType,
924 static_cast< lang::XTypeProvider * >( this ),
925 static_cast< task::XInteractionContinuation * >( this ),
926 static_cast< ucb::XInteractionSupplyName * >( this ) );
927
928 return aRet.hasValue()
929 ? aRet : InteractionContinuation::queryInterface( rType );
930 }
931
932 //=========================================================================
933 //
934 // XTypeProvider methods.
935 //
936 //=========================================================================
937
938 // virtual
getImplementationId()939 uno::Sequence< sal_Int8 > SAL_CALL InteractionSupplyName::getImplementationId()
940 {
941 static cppu::OImplementationId* pId = NULL;
942 if ( !pId )
943 {
944 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
945 if ( !pId )
946 {
947 static cppu::OImplementationId id( sal_False );
948 pId = &id;
949 }
950 }
951 return (*pId).getImplementationId();
952 }
953
954 //=========================================================================
955 // virtual
getTypes()956 uno::Sequence< uno::Type > SAL_CALL InteractionSupplyName::getTypes()
957 {
958 static cppu::OTypeCollection* pCollection = 0;
959 if ( !pCollection )
960 {
961 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
962 if ( !pCollection )
963 {
964 static cppu::OTypeCollection collection(
965 getCppuType( static_cast<
966 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
967 getCppuType( static_cast<
968 uno::Reference< ucb::XInteractionSupplyName > * >( 0 ) ) );
969 pCollection = &collection;
970 }
971 }
972 return (*pCollection).getTypes();
973 }
974
975 //=========================================================================
976 //
977 // XInteractionContinuation methods.
978 //
979 //=========================================================================
980
981 // virtual
select()982 void SAL_CALL InteractionSupplyName::select()
983 {
984 recordSelection();
985 }
986
987 //=========================================================================
988 //
989 // XInteractionSupplyName methods.
990 //
991 //=========================================================================
992
993 // virtual
994 void SAL_CALL
setName(const rtl::OUString & Name)995 InteractionSupplyName::setName( const rtl::OUString& Name )
996 {
997 m_aName = Name;
998 }
999
1000 //=========================================================================
1001 //=========================================================================
1002 //
1003 // InteractionReplaceExistingData Implementation.
1004 //
1005 //=========================================================================
1006 //=========================================================================
1007
1008 //=========================================================================
1009 //
1010 // XInterface methods.
1011 //
1012 //=========================================================================
1013
1014 // virtual
acquire()1015 void SAL_CALL InteractionReplaceExistingData::acquire()
1016 throw()
1017 {
1018 OWeakObject::acquire();
1019 }
1020
1021 //=========================================================================
1022 // virtual
release()1023 void SAL_CALL InteractionReplaceExistingData::release()
1024 throw()
1025 {
1026 OWeakObject::release();
1027 }
1028
1029 //=========================================================================
1030 // virtual
1031 uno::Any SAL_CALL
queryInterface(const uno::Type & rType)1032 InteractionReplaceExistingData::queryInterface( const uno::Type & rType )
1033 {
1034 uno::Any aRet = cppu::queryInterface( rType,
1035 static_cast< lang::XTypeProvider * >( this ),
1036 static_cast< task::XInteractionContinuation * >( this ),
1037 static_cast< ucb::XInteractionReplaceExistingData * >( this ) );
1038
1039 return aRet.hasValue()
1040 ? aRet : InteractionContinuation::queryInterface( rType );
1041 }
1042
1043 //=========================================================================
1044 //
1045 // XTypeProvider methods.
1046 //
1047 //=========================================================================
1048
1049 // virtual
1050 uno::Sequence< sal_Int8 > SAL_CALL
getImplementationId()1051 InteractionReplaceExistingData::getImplementationId()
1052 {
1053 static cppu::OImplementationId* pId = NULL;
1054 if ( !pId )
1055 {
1056 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1057 if ( !pId )
1058 {
1059 static cppu::OImplementationId id( sal_False );
1060 pId = &id;
1061 }
1062 }
1063 return (*pId).getImplementationId();
1064 }
1065
1066 //=========================================================================
1067 // virtual
getTypes()1068 uno::Sequence< uno::Type > SAL_CALL InteractionReplaceExistingData::getTypes()
1069 {
1070 static cppu::OTypeCollection* pCollection = 0;
1071 if ( !pCollection )
1072 {
1073 osl::Guard< osl::Mutex > aGuard( osl::Mutex::getGlobalMutex() );
1074 if ( !pCollection )
1075 {
1076 static cppu::OTypeCollection collection(
1077 getCppuType( static_cast<
1078 uno::Reference< lang::XTypeProvider > * >( 0 ) ),
1079 getCppuType( static_cast<
1080 uno::Reference<
1081 ucb::XInteractionReplaceExistingData > * >( 0 ) ) );
1082 pCollection = &collection;
1083 }
1084 }
1085 return (*pCollection).getTypes();
1086 }
1087
1088 //=========================================================================
1089 //
1090 // XInteractionContinuation methods.
1091 //
1092 //=========================================================================
1093
1094 // virtual
select()1095 void SAL_CALL InteractionReplaceExistingData::select()
1096 {
1097 recordSelection();
1098 }
1099