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 <tools/link.hxx>
23 #include <rtl/ustring.hxx>
24 #include <com/sun/star/uno/Sequence.h>
25 #include <salhelper/simplereferenceobject.hxx>
28 class SvtFileDialog_Base
;
36 class AsyncPickerAction
: public salhelper::SimpleReferenceObject
49 SvtFileDialog_Base
* m_pDialog
;
55 AsyncPickerAction( SvtFileDialog_Base
* _pDialog
, SvtFileView
* _pView
, const Action _eAction
);
57 /** executes the action
60 the minimum timeout to wait, in milliseconds. If negative, the action will we done
61 synchronously. If between 0 and 999, it will be corrected to 1000, means the
62 smallest valid value is 1000 (which equals one second).
64 The maximum time to wait for a result, in milliseconds. If there's no result of
65 the action within the given time frame, the action will be cancelled.
66 If smaller than or equal to <arg>_nMinTimeout</arg>, it will be corrected to
67 <arg>_nMinTimeout</arg> + 30000.
70 const OUString
& _rURL
,
71 const OUString
& _rFilter
,
72 sal_Int32 _nMinTimeout
,
73 sal_Int32 _nMaxTimeout
,
74 const css::uno::Sequence
< OUString
>& rDenyList
);
76 /// cancels the running action
80 virtual ~AsyncPickerAction() override
;
83 DECL_LINK( OnActionDone
, void*, void );
85 AsyncPickerAction( const AsyncPickerAction
& ) = delete;
86 AsyncPickerAction
& operator=( const AsyncPickerAction
& ) = delete;
93 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */