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