1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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 INCLUDED_FRAMEWORK_INTERACTION_HXX
21 #define INCLUDED_FRAMEWORK_INTERACTION_HXX
23 #include <config_options.h>
24 #include <rtl/ref.hxx>
25 #include <rtl/ustring.hxx>
26 #include <com/sun/star/uno/Reference.hxx>
27 #include <framework/fwkdllapi.h>
29 namespace com::sun::star::task
31 class XInteractionContinuation
;
33 namespace com::sun::star::task
35 class XInteractionRequest
;
37 namespace com::sun::star::uno
39 template <class E
> class Sequence
;
44 /*-************************************************************************************************************
45 @short special request for interaction to ask user for right filter
46 @descr These helper can be used to ask user for right filter, if filter detection failed.
47 It capsulate communication with any interaction handler and supports an easy
48 access on interaction results for user of these class.
49 Use it and forget complex mechanism of interaction ...
51 @example RequestFilterSelect* pRequest = new RequestFilterSelect;
52 Reference< XInteractionRequest > xRequest ( pRequest );
53 xInteractionHandler->handle( xRequest );
54 if( ! pRequest.isAbort() )
56 OUString sFilter = pRequest->getFilter();
59 @implements XInteractionRequest
61 @devstatus ready to use
62 @threadsafe no (used on once position only!)
63 */ /*-*************************************************************************************************************/
64 class RequestFilterSelect_Impl
;
65 class UNLESS_MERGELIBS(FWK_DLLPUBLIC
) RequestFilterSelect
67 rtl::Reference
<RequestFilterSelect_Impl
> mxImpl
;
70 RequestFilterSelect(const OUString
& sURL
);
71 ~RequestFilterSelect();
73 RequestFilterSelect
& operator=(RequestFilterSelect
const&) = delete; // MSVC2019 workaround
74 RequestFilterSelect(RequestFilterSelect
const&) = delete; // MSVC2019 workaround
77 OUString
getFilter() const;
78 css::uno::Reference
<css::task::XInteractionRequest
> GetRequest() const;
81 /*-************************************************************************************************************
82 @short special request for interaction
83 @descr User must decide between a preselected and another detected filter.
84 It capsulate communication with any interaction handler and supports an easy
85 access on interaction results for user of these class.
87 @implements XInteractionRequest
89 @devstatus ready to use
90 @threadsafe no (used on once position only!)
91 */ /*-*************************************************************************************************************/
92 class FWK_DLLPUBLIC InteractionRequest
95 static css::uno::Reference
<css::task::XInteractionRequest
> CreateRequest(
96 const css::uno::Any
& aRequest
,
97 const css::uno::Sequence
<css::uno::Reference
<css::task::XInteractionContinuation
>>&
101 } // namespace framework
103 #endif // #define INCLUDED_FRAMEWORK_INTERACTION_HXX
105 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */