LibreOffice Module framework (master) 1
interaction.hxx
Go to the documentation of this file.
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#pragma once
21
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>
27
29{
30class XInteractionContinuation;
31}
33{
34class XInteractionRequest;
35}
36namespace com::sun::star::uno
37{
38template <class E> class Sequence;
39}
40
41namespace framework
42{
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 ...
49
50 @example RequestFilterSelect* pRequest = new RequestFilterSelect;
51 Reference< XInteractionRequest > xRequest ( pRequest );
52 xInteractionHandler->handle( xRequest );
53 if( ! pRequest.isAbort() )
54 {
55 OUString sFilter = pRequest->getFilter();
56 }
57
58 @implements XInteractionRequest
59
60 @devstatus ready to use
61 @threadsafe no (used on once position only!)
62*/ /*-*************************************************************************************************************/
63class RequestFilterSelect_Impl;
64class UNLESS_MERGELIBS(FWK_DLLPUBLIC) RequestFilterSelect
65{
67
68public:
69 RequestFilterSelect(const OUString& sURL);
70 ~RequestFilterSelect();
71
72 RequestFilterSelect& operator=(RequestFilterSelect const&) = delete; // MSVC2019 workaround
73 RequestFilterSelect(RequestFilterSelect const&) = delete; // MSVC2019 workaround
74
75 bool isAbort() const;
76 OUString getFilter() const;
77 css::uno::Reference<css::task::XInteractionRequest> GetRequest() const;
78};
79
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.
85
86 @implements XInteractionRequest
87
88 @devstatus ready to use
89 @threadsafe no (used on once position only!)
90*/ /*-*************************************************************************************************************/
92{
93public:
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>>&
97 lContinuations);
98};
99
100} // namespace framework
101
102/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
#define FWK_DLLPUBLIC
Definition: fwkdllapi.h:19