update credits
[LibreOffice.git] / include / ucbhelper / interactionrequest.hxx
blob6de19931238c27eb86a22a5a47797e64ab307474
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #ifndef _UCBHELPER_INTERATIONREQUEST_HXX
21 #define _UCBHELPER_INTERATIONREQUEST_HXX
23 #include <com/sun/star/lang/XTypeProvider.hpp>
24 #include <com/sun/star/task/XInteractionRequest.hpp>
25 #include <com/sun/star/task/XInteractionAbort.hpp>
26 #include <com/sun/star/task/XInteractionRetry.hpp>
27 #include <com/sun/star/task/XInteractionApprove.hpp>
28 #include <com/sun/star/task/XInteractionDisapprove.hpp>
29 #include <com/sun/star/ucb/XInteractionReplaceExistingData.hpp>
30 #include <com/sun/star/ucb/XInteractionSupplyAuthentication2.hpp>
31 #include <com/sun/star/ucb/XInteractionSupplyName.hpp>
32 #include <rtl/ref.hxx>
33 #include <cppuhelper/weak.hxx>
34 #include "ucbhelper/ucbhelperdllapi.h"
36 namespace ucbhelper {
38 class InteractionContinuation;
40 //============================================================================
41 struct InteractionRequest_Impl;
43 /**
44 * This class implements the interface XInteractionRequest. Instances can
45 * be passed directly to XInteractionHandler::handle(...). Each interaction
46 * request contains an exception describing the error and a number of
47 * interaction continuations describing the possible "answers" for the request.
48 * After the request was passed to XInteractionHandler::handle(...) the method
49 * getSelection() returns the continuation choosen by the interaction handler.
51 * The typical usage of this class would be:
53 * 1) Create exception object that shall be handled by the interaction handler.
54 * 2) Create InteractionRequest, supply exception as ctor parameter
55 * 3) Create continuations needed and add them to a sequence
56 * 4) Supply the continuations to the InteractionRequest by calling
57 * setContinuations(...)
59 * This class can also be used as base class for more specialized requests,
60 * like authentication requests.
62 class UCBHELPER_DLLPUBLIC InteractionRequest : public cppu::OWeakObject,
63 public com::sun::star::lang::XTypeProvider,
64 public com::sun::star::task::XInteractionRequest
66 InteractionRequest_Impl * m_pImpl;
68 protected:
69 void setRequest( const com::sun::star::uno::Any & rRequest );
71 InteractionRequest();
72 virtual ~InteractionRequest();
74 public:
75 /**
76 * Constructor.
78 * @param rRequest is the exception describing the error.
80 InteractionRequest( const com::sun::star::uno::Any & rRequest );
82 /**
83 * This method sets the continuations for the request.
85 * @param rContinuations contains the possible continuations.
87 void setContinuations(
88 const com::sun::star::uno::Sequence<
89 com::sun::star::uno::Reference<
90 com::sun::star::task::XInteractionContinuation > > &
91 rContinuations );
93 // XInterface
94 virtual com::sun::star::uno::Any SAL_CALL
95 queryInterface( const com::sun::star::uno::Type & rType )
96 throw( com::sun::star::uno::RuntimeException );
97 virtual void SAL_CALL acquire()
98 throw();
99 virtual void SAL_CALL release()
100 throw();
102 // XTypeProvider
103 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
104 getTypes()
105 throw( com::sun::star::uno::RuntimeException );
106 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
107 getImplementationId()
108 throw( com::sun::star::uno::RuntimeException );
110 // XInteractionRequest
111 virtual com::sun::star::uno::Any SAL_CALL
112 getRequest()
113 throw( com::sun::star::uno::RuntimeException );
114 virtual com::sun::star::uno::Sequence<
115 com::sun::star::uno::Reference<
116 com::sun::star::task::XInteractionContinuation > > SAL_CALL
117 getContinuations()
118 throw( com::sun::star::uno::RuntimeException );
120 // Non-interface methods.
123 * After passing this request to XInteractionHandler::handle, this method
124 * returns the continuation that was choosen by the interaction handler.
126 * @return the continuation choosen by an interaction handler or an empty
127 * reference, if the request was not (yet) handled.
129 rtl::Reference< InteractionContinuation > getSelection() const;
132 * This method sets a continuation for the request. It also can be used
133 * to reset the continuation set by a previous XInteractionHandler::handle
134 * call in order to use this request object more then once.
136 * @param rxSelection is the interaction continuation to activate for
137 * the request or an empty reference in order to reset the
138 * current selection.
140 void
141 setSelection(
142 const rtl::Reference< InteractionContinuation > & rxSelection );
145 //============================================================================
146 struct InteractionContinuation_Impl;
149 * This class is the base for implementations of the interface
150 * XInteractionContinuation. Classes derived from this bas class work together
151 * with class InteractionRequest.
153 * Derived classes must implement their XInteractionContinuation::select()
154 * method the way that they simply call recordSelection() which is provided by
155 * this class.
157 class UCBHELPER_DLLPUBLIC InteractionContinuation : public cppu::OWeakObject
159 InteractionContinuation_Impl * m_pImpl;
161 protected:
163 * This method marks this continuation as "selected" at the request it
164 * belongs to.
166 * Derived classes must implement their XInteractionContinuation::select()
167 * method the way that they call this method.
169 void recordSelection();
170 virtual ~InteractionContinuation();
172 public:
173 InteractionContinuation( InteractionRequest * pRequest );
176 //============================================================================
178 * This class implements a standard interaction continuation, namely the
179 * interface XInteractionAbort. Instances of this class can be passed
180 * along with an interaction request to indicate the possiblity to abort
181 * the operation that caused the request.
183 class UCBHELPER_DLLPUBLIC InteractionAbort : public InteractionContinuation,
184 public com::sun::star::lang::XTypeProvider,
185 public com::sun::star::task::XInteractionAbort
187 public:
188 InteractionAbort( InteractionRequest * pRequest )
189 : InteractionContinuation( pRequest ) {}
191 // XInterface
192 virtual com::sun::star::uno::Any SAL_CALL
193 queryInterface( const com::sun::star::uno::Type & rType )
194 throw( com::sun::star::uno::RuntimeException );
195 virtual void SAL_CALL acquire()
196 throw();
197 virtual void SAL_CALL release()
198 throw();
200 // XTypeProvider
201 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
202 getTypes()
203 throw( com::sun::star::uno::RuntimeException );
204 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
205 getImplementationId()
206 throw( com::sun::star::uno::RuntimeException );
208 // XInteractionContinuation
209 virtual void SAL_CALL select()
210 throw( com::sun::star::uno::RuntimeException );
213 //============================================================================
215 * This class implements a standard interaction continuation, namely the
216 * interface XInteractionRetry. Instances of this class can be passed
217 * along with an interaction request to indicate the possiblity to retry
218 * the operation that caused the request.
220 class UCBHELPER_DLLPUBLIC InteractionRetry : public InteractionContinuation,
221 public com::sun::star::lang::XTypeProvider,
222 public com::sun::star::task::XInteractionRetry
224 public:
225 InteractionRetry( InteractionRequest * pRequest )
226 : InteractionContinuation( pRequest ) {}
228 // XInterface
229 virtual com::sun::star::uno::Any SAL_CALL
230 queryInterface( const com::sun::star::uno::Type & rType )
231 throw( com::sun::star::uno::RuntimeException );
232 virtual void SAL_CALL acquire()
233 throw();
234 virtual void SAL_CALL release()
235 throw();
237 // XTypeProvider
238 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
239 getTypes()
240 throw( com::sun::star::uno::RuntimeException );
241 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
242 getImplementationId()
243 throw( com::sun::star::uno::RuntimeException );
245 // XInteractionContinuation
246 virtual void SAL_CALL select()
247 throw( com::sun::star::uno::RuntimeException );
250 //============================================================================
252 * This class implements a standard interaction continuation, namely the
253 * interface XInteractionApprove. Instances of this class can be passed
254 * along with an interaction request to indicate the possiblity to approve
255 * the request.
257 class UCBHELPER_DLLPUBLIC InteractionApprove : public InteractionContinuation,
258 public com::sun::star::lang::XTypeProvider,
259 public com::sun::star::task::XInteractionApprove
261 public:
262 InteractionApprove( InteractionRequest * pRequest )
263 : InteractionContinuation( pRequest ) {}
265 // XInterface
266 virtual com::sun::star::uno::Any SAL_CALL
267 queryInterface( const com::sun::star::uno::Type & rType )
268 throw( com::sun::star::uno::RuntimeException );
269 virtual void SAL_CALL acquire()
270 throw();
271 virtual void SAL_CALL release()
272 throw();
274 // XTypeProvider
275 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
276 getTypes()
277 throw( com::sun::star::uno::RuntimeException );
278 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
279 getImplementationId()
280 throw( com::sun::star::uno::RuntimeException );
282 // XInteractionContinuation
283 virtual void SAL_CALL select()
284 throw( com::sun::star::uno::RuntimeException );
287 //============================================================================
289 * This class implements a standard interaction continuation, namely the
290 * interface XInteractionDisapprove. Instances of this class can be passed
291 * along with an interaction request to indicate the possiblity to disapprove
292 * the request.
294 class UCBHELPER_DLLPUBLIC InteractionDisapprove : public InteractionContinuation,
295 public com::sun::star::lang::XTypeProvider,
296 public com::sun::star::task::XInteractionDisapprove
298 public:
299 InteractionDisapprove( InteractionRequest * pRequest )
300 : InteractionContinuation( pRequest ) {}
302 // XInterface
303 virtual com::sun::star::uno::Any SAL_CALL
304 queryInterface( const com::sun::star::uno::Type & rType )
305 throw( com::sun::star::uno::RuntimeException );
306 virtual void SAL_CALL acquire()
307 throw();
308 virtual void SAL_CALL release()
309 throw();
311 // XTypeProvider
312 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
313 getTypes()
314 throw( com::sun::star::uno::RuntimeException );
315 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
316 getImplementationId()
317 throw( com::sun::star::uno::RuntimeException );
319 // XInteractionContinuation
320 virtual void SAL_CALL select()
321 throw( com::sun::star::uno::RuntimeException );
324 //============================================================================
326 * This class implements a standard interaction continuation, namely the
327 * interface XInteractionSupplyAuthentication. Instances of this class can be
328 * passed along with an authentication interaction request to enable the
329 * interaction handler to supply the missing authentication data.
331 class UCBHELPER_DLLPUBLIC InteractionSupplyAuthentication :
332 public InteractionContinuation,
333 public com::sun::star::lang::XTypeProvider,
334 public com::sun::star::ucb::XInteractionSupplyAuthentication2
336 com::sun::star::uno::Sequence< com::sun::star::ucb::RememberAuthentication >
337 m_aRememberPasswordModes;
338 com::sun::star::uno::Sequence< com::sun::star::ucb::RememberAuthentication >
339 m_aRememberAccountModes;
340 OUString m_aRealm;
341 OUString m_aUserName;
342 OUString m_aPassword;
343 OUString m_aAccount;
344 com::sun::star::ucb::RememberAuthentication m_eRememberPasswordMode;
345 com::sun::star::ucb::RememberAuthentication m_eDefaultRememberPasswordMode;
346 com::sun::star::ucb::RememberAuthentication m_eRememberAccountMode;
347 com::sun::star::ucb::RememberAuthentication m_eDefaultRememberAccountMode;
348 unsigned m_bCanSetRealm : 1;
349 unsigned m_bCanSetUserName : 1;
350 unsigned m_bCanSetPassword : 1;
351 unsigned m_bCanSetAccount : 1;
352 unsigned m_bCanUseSystemCredentials : 1;
353 unsigned m_bDefaultUseSystemCredentials : 1;
354 unsigned m_bUseSystemCredentials : 1;
356 public:
358 * Constructor.
360 * @param rxRequest is the interaction request that owns this continuation.
361 * @param bCanSetRealm indicates, whether the realm given with the
362 * authentication request is read-only.
363 * @param bCanSetUserName indicates, whether the username given with the
364 * authentication request is read-only.
365 * @param bCanSetPassword indicates, whether the password given with the
366 * authentication request is read-only.
367 * @param bCanSetAccount indicates, whether the account given with the
368 * authentication request is read-only.
370 * @see com::sun::star::ucb::AuthenticationRequest
372 inline InteractionSupplyAuthentication(
373 InteractionRequest * pRequest,
374 sal_Bool bCanSetRealm,
375 sal_Bool bCanSetUserName,
376 sal_Bool bCanSetPassword,
377 sal_Bool bCanSetAccount);
379 * Constructor.
381 * Note: The remember-authentication stuff is interesting only for
382 * clients implementing own password storage functionality.
384 * @param rxRequest is the interaction request that owns this continuation.
385 * @param bCanSetRealm indicates, whether the realm given with the
386 * authentication request is read-only.
387 * @param bCanSetUserName indicates, whether the username given with the
388 * authentication request is read-only.
389 * @param bCanSetPassword indicates, whether the password given with the
390 * authentication request is read-only.
391 * @param bCanSetAccount indicates, whether the account given with the
392 * authentication request is read-only.
393 * @param rRememberPasswordModes specifies the authentication-remember-
394 * modes for passwords supported by the requesting client.
395 * @param eDefaultRememberPasswordMode specifies the default
396 * authentication-remember-mode for passwords preferred by the
397 * requesting client.
398 * @param rRememberAccountModes specifies the authentication-remember-
399 * modes for accounts supported by the requesting client.
400 * @param eDefaultRememberAccountMode specifies the default
401 * authentication-remember-mode for accounts preferred by the
402 * requesting client.
403 * @param bCanUseSystemCredentials indicates whether issuer of the
404 * authetication request can obtain and use system credentials
405 * for authentication.
406 * @param bDefaultUseSystemCredentials specifies the default system
407 * credentials usage preferred by the requesting client
409 * @see com::sun::star::ucb::AuthenticationRequest
410 * @see com::sun::star::ucb::RememberAuthentication
412 inline InteractionSupplyAuthentication(
413 InteractionRequest * pRequest,
414 sal_Bool bCanSetRealm,
415 sal_Bool bCanSetUserName,
416 sal_Bool bCanSetPassword,
417 sal_Bool bCanSetAccount,
418 const com::sun::star::uno::Sequence<
419 com::sun::star::ucb::RememberAuthentication > &
420 rRememberPasswordModes,
421 const com::sun::star::ucb::RememberAuthentication
422 eDefaultRememberPasswordMode,
423 const com::sun::star::uno::Sequence<
424 com::sun::star::ucb::RememberAuthentication > &
425 rRememberAccountModes,
426 const com::sun::star::ucb::RememberAuthentication
427 eDefaultRememberAccountMode,
428 sal_Bool bCanUseSystemCredentials,
429 sal_Bool bDefaultUseSystemCredentials );
431 // XInterface
432 virtual com::sun::star::uno::Any SAL_CALL
433 queryInterface( const com::sun::star::uno::Type & rType )
434 throw( com::sun::star::uno::RuntimeException );
435 virtual void SAL_CALL acquire()
436 throw();
437 virtual void SAL_CALL release()
438 throw();
440 // XTypeProvider
441 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
442 getTypes()
443 throw( com::sun::star::uno::RuntimeException );
444 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
445 getImplementationId()
446 throw( com::sun::star::uno::RuntimeException );
448 // XInteractionContinuation
449 virtual void SAL_CALL select()
450 throw( com::sun::star::uno::RuntimeException );
452 // XInteractionSupplyAuthentication
453 virtual sal_Bool SAL_CALL
454 canSetRealm()
455 throw( com::sun::star::uno::RuntimeException );
456 virtual void SAL_CALL
457 setRealm( const OUString& Realm )
458 throw( com::sun::star::uno::RuntimeException );
460 virtual sal_Bool SAL_CALL
461 canSetUserName()
462 throw( com::sun::star::uno::RuntimeException );
463 virtual void SAL_CALL
464 setUserName( const OUString& UserName )
465 throw( com::sun::star::uno::RuntimeException );
467 virtual sal_Bool SAL_CALL
468 canSetPassword()
469 throw( com::sun::star::uno::RuntimeException );
470 virtual void SAL_CALL
471 setPassword( const OUString& Password )
472 throw( com::sun::star::uno::RuntimeException );
474 virtual com::sun::star::uno::Sequence<
475 com::sun::star::ucb::RememberAuthentication > SAL_CALL
476 getRememberPasswordModes(
477 com::sun::star::ucb::RememberAuthentication& Default )
478 throw( com::sun::star::uno::RuntimeException );
479 virtual void SAL_CALL
480 setRememberPassword( com::sun::star::ucb::RememberAuthentication Remember )
481 throw( com::sun::star::uno::RuntimeException );
483 virtual sal_Bool SAL_CALL
484 canSetAccount()
485 throw( com::sun::star::uno::RuntimeException );
486 virtual void SAL_CALL
487 setAccount( const OUString& Account )
488 throw( com::sun::star::uno::RuntimeException );
490 virtual com::sun::star::uno::Sequence<
491 com::sun::star::ucb::RememberAuthentication > SAL_CALL
492 getRememberAccountModes(
493 com::sun::star::ucb::RememberAuthentication& Default )
494 throw( com::sun::star::uno::RuntimeException );
495 virtual void SAL_CALL
496 setRememberAccount( com::sun::star::ucb::RememberAuthentication Remember )
497 throw( com::sun::star::uno::RuntimeException );
499 // XInteractionSupplyAuthentication2
500 virtual ::sal_Bool SAL_CALL canUseSystemCredentials( ::sal_Bool& Default )
501 throw ( ::com::sun::star::uno::RuntimeException );
502 virtual void SAL_CALL setUseSystemCredentials( ::sal_Bool UseSystemCredentials )
503 throw ( ::com::sun::star::uno::RuntimeException );
505 // Non-interface methods.
508 * This method returns the realm that was supplied by the interaction
509 * handler.
511 * @return the realm.
513 const OUString & getRealm() const { return m_aRealm; }
516 * This method returns the username that was supplied by the interaction
517 * handler.
519 * @return the username.
521 const OUString & getUserName() const { return m_aUserName; }
524 * This method returns the password that was supplied by the interaction
525 * handler.
527 * @return the password.
529 const OUString & getPassword() const { return m_aPassword; }
532 * This method returns the account that was supplied by the interaction
533 * handler.
535 * @return the account.
537 const OUString & getAccount() const { return m_aAccount; }
540 * This method returns the authentication remember-mode for the password
541 * that was supplied by the interaction handler.
543 * @return the remember-mode for the password.
545 const com::sun::star::ucb::RememberAuthentication &
546 getRememberPasswordMode() const { return m_eRememberPasswordMode; }
549 * This method returns the authentication remember-mode for the account
550 * that was supplied by the interaction handler.
552 * @return the remember-mode for the account.
554 const com::sun::star::ucb::RememberAuthentication &
555 getRememberAccountMode() const { return m_eRememberAccountMode; }
557 sal_Bool getUseSystemCredentials() const { return m_bUseSystemCredentials; }
560 //============================================================================
561 inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
562 InteractionRequest * pRequest,
563 sal_Bool bCanSetRealm,
564 sal_Bool bCanSetUserName,
565 sal_Bool bCanSetPassword,
566 sal_Bool bCanSetAccount )
567 : InteractionContinuation( pRequest ),
568 m_aRememberPasswordModes( com::sun::star::uno::Sequence<
569 com::sun::star::ucb::RememberAuthentication >( 1 ) ),
570 m_aRememberAccountModes( com::sun::star::uno::Sequence<
571 com::sun::star::ucb::RememberAuthentication >( 1 ) ),
572 m_eRememberPasswordMode( com::sun::star::ucb::RememberAuthentication_NO ),
573 m_eDefaultRememberPasswordMode(
574 com::sun::star::ucb::RememberAuthentication_NO ),
575 m_eRememberAccountMode( com::sun::star::ucb::RememberAuthentication_NO ),
576 m_eDefaultRememberAccountMode(
577 com::sun::star::ucb::RememberAuthentication_NO ),
578 m_bCanSetRealm( bCanSetRealm ),
579 m_bCanSetUserName( bCanSetUserName ),
580 m_bCanSetPassword( bCanSetPassword ),
581 m_bCanSetAccount( bCanSetAccount ),
582 m_bCanUseSystemCredentials( sal_False ),
583 m_bDefaultUseSystemCredentials( sal_False ),
584 m_bUseSystemCredentials( sal_False )
586 m_aRememberPasswordModes[ 0 ]
587 = com::sun::star::ucb::RememberAuthentication_NO;
588 m_aRememberAccountModes [ 0 ]
589 = com::sun::star::ucb::RememberAuthentication_NO;
592 //============================================================================
593 inline InteractionSupplyAuthentication::InteractionSupplyAuthentication(
594 InteractionRequest * pRequest,
595 sal_Bool bCanSetRealm,
596 sal_Bool bCanSetUserName,
597 sal_Bool bCanSetPassword,
598 sal_Bool bCanSetAccount,
599 const com::sun::star::uno::Sequence<
600 com::sun::star::ucb::RememberAuthentication > & rRememberPasswordModes,
601 const com::sun::star::ucb::RememberAuthentication
602 eDefaultRememberPasswordMode,
603 const com::sun::star::uno::Sequence<
604 com::sun::star::ucb::RememberAuthentication > & rRememberAccountModes,
605 const com::sun::star::ucb::RememberAuthentication
606 eDefaultRememberAccountMode,
607 sal_Bool bCanUseSystemCredentials,
608 sal_Bool bDefaultUseSystemCredentials )
609 : InteractionContinuation( pRequest ),
610 m_aRememberPasswordModes( rRememberPasswordModes ),
611 m_aRememberAccountModes( rRememberAccountModes ),
612 m_eRememberPasswordMode( eDefaultRememberPasswordMode ),
613 m_eDefaultRememberPasswordMode( eDefaultRememberPasswordMode ),
614 m_eRememberAccountMode( eDefaultRememberAccountMode ),
615 m_eDefaultRememberAccountMode( eDefaultRememberAccountMode ),
616 m_bCanSetRealm( bCanSetRealm ),
617 m_bCanSetUserName( bCanSetUserName ),
618 m_bCanSetPassword( bCanSetPassword ),
619 m_bCanSetAccount( bCanSetAccount ),
620 m_bCanUseSystemCredentials( bCanUseSystemCredentials ),
621 m_bDefaultUseSystemCredentials( bDefaultUseSystemCredentials ),
622 m_bUseSystemCredentials( bDefaultUseSystemCredentials & bCanUseSystemCredentials )
626 //============================================================================
628 * This class implements a standard interaction continuation, namely the
629 * interface XInteractionSupplyName. Instances of this class can be passed
630 * along with an interaction request to indicate the possiblity to
631 * supply a new name.
633 class InteractionSupplyName : public InteractionContinuation,
634 public com::sun::star::lang::XTypeProvider,
635 public com::sun::star::ucb::XInteractionSupplyName
637 OUString m_aName;
639 public:
640 InteractionSupplyName( InteractionRequest * pRequest )
641 : InteractionContinuation( pRequest ) {}
643 // XInterface
644 virtual com::sun::star::uno::Any SAL_CALL
645 queryInterface( const com::sun::star::uno::Type & rType )
646 throw( com::sun::star::uno::RuntimeException );
647 virtual void SAL_CALL acquire()
648 throw();
649 virtual void SAL_CALL release()
650 throw();
652 // XTypeProvider
653 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
654 getTypes()
655 throw( com::sun::star::uno::RuntimeException );
656 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
657 getImplementationId()
658 throw( com::sun::star::uno::RuntimeException );
660 // XInteractionContinuation
661 virtual void SAL_CALL select()
662 throw( com::sun::star::uno::RuntimeException );
664 // XInteractionSupplyName
665 virtual void SAL_CALL setName( const OUString& Name )
666 throw ( com::sun::star::uno::RuntimeException );
668 // Non-interface methods.
671 * This method returns the name that was supplied by the interaction
672 * handler.
674 * @return the name.
676 const OUString & getName() const { return m_aName; }
679 //============================================================================
681 * This class implements a standard interaction continuation, namely the
682 * interface XInteractionReplaceExistingData. Instances of this class can be
683 * passed along with an interaction request to indicate the possiblity to
684 * replace existing data.
686 class InteractionReplaceExistingData :
687 public InteractionContinuation,
688 public com::sun::star::lang::XTypeProvider,
689 public com::sun::star::ucb::XInteractionReplaceExistingData
691 public:
692 InteractionReplaceExistingData( InteractionRequest * pRequest )
693 : InteractionContinuation( pRequest ) {}
695 // XInterface
696 virtual com::sun::star::uno::Any SAL_CALL
697 queryInterface( const com::sun::star::uno::Type & rType )
698 throw( com::sun::star::uno::RuntimeException );
699 virtual void SAL_CALL acquire()
700 throw();
701 virtual void SAL_CALL release()
702 throw();
704 // XTypeProvider
705 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL
706 getTypes()
707 throw( com::sun::star::uno::RuntimeException );
708 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL
709 getImplementationId()
710 throw( com::sun::star::uno::RuntimeException );
712 // XInteractionContinuation
713 virtual void SAL_CALL select()
714 throw( com::sun::star::uno::RuntimeException );
717 } // namespace ucbhelper
719 #endif /* !_UCBHELPER_INTERATIONREQUEST_HXX */
721 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */