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 .
22 #include <config_options.h>
23 #include <rtl/ref.hxx>
24 #include <rtl/ustring.hxx>
25 #include <com/sun/star/uno/Reference.hxx>
26 #include <framework/fwkdllapi.h>
28 namespace com::sun::star::task
30 class XInteractionContinuation
;
32 namespace com::sun::star::task
34 class XInteractionRequest
;
36 namespace com::sun::star::uno
38 template <class E
> class Sequence
;
43 /*-************************************************************************************************************
44 @short special request for interaction to ask user for right filter
45 @descr These helper can be used to ask user for right filter, if filter detection failed.
46 It capsulate communication with any interaction handler and supports an easy
47 access on interaction results for user of these class.
48 Use it and forget complex mechanism of interaction ...
50 @example RequestFilterSelect* pRequest = new RequestFilterSelect;
51 Reference< XInteractionRequest > xRequest ( pRequest );
52 xInteractionHandler->handle( xRequest );
53 if( ! pRequest.isAbort() )
55 OUString sFilter = pRequest->getFilter();
58 @implements XInteractionRequest
60 @devstatus ready to use
61 @threadsafe no (used on once position only!)
62 */ /*-*************************************************************************************************************/
63 class RequestFilterSelect_Impl
;
64 class UNLESS_MERGELIBS(FWK_DLLPUBLIC
) RequestFilterSelect
66 rtl::Reference
<RequestFilterSelect_Impl
> mxImpl
;
69 RequestFilterSelect(const OUString
& sURL
);
70 ~RequestFilterSelect();
72 RequestFilterSelect
& operator=(RequestFilterSelect
const&) = delete; // MSVC2019 workaround
73 RequestFilterSelect(RequestFilterSelect
const&) = delete; // MSVC2019 workaround
76 OUString
getFilter() const;
77 css::uno::Reference
<css::task::XInteractionRequest
> GetRequest() const;
80 /*-************************************************************************************************************
81 @short special request for interaction
82 @descr User must decide between a preselected and another detected filter.
83 It capsulate communication with any interaction handler and supports an easy
84 access on interaction results for user of these class.
86 @implements XInteractionRequest
88 @devstatus ready to use
89 @threadsafe no (used on once position only!)
90 */ /*-*************************************************************************************************************/
91 class FWK_DLLPUBLIC InteractionRequest
94 static css::uno::Reference
<css::task::XInteractionRequest
> CreateRequest(
95 const css::uno::Any
& aRequest
,
96 const css::uno::Sequence
<css::uno::Reference
<css::task::XInteractionContinuation
>>&
100 } // namespace framework
102 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */