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 SVTOOLS_SOURCE_FILEPICKER_ASYNCFILEPICKER_HXX
21 #define SVTOOLS_SOURCE_FILEPICKER_ASYNCFILEPICKER_HXX
23 #include <tools/link.hxx>
24 #include <tools/string.hxx>
25 #include <rtl/ref.hxx>
26 #include <rtl/ustring.hxx>
27 #include <com/sun/star/uno/Sequence.h>
32 typedef ::com::sun::star::uno::Sequence
< OUString
> OUStringList
;
34 //........................................................................
37 //........................................................................
40 //====================================================================
42 //====================================================================
43 class AsyncPickerAction
: public ::rtl::IReference
54 mutable oslInterlockedCount m_refCount
;
57 SvtFileDialog
* m_pDialog
;
63 AsyncPickerAction( SvtFileDialog
* _pDialog
, SvtFileView
* _pView
, const Action _eAction
);
65 /** executes the action
68 the minimum timeout to wait, in milliseconds. If negative, the action will we done
69 synchronously. If between 0 and 999, it will be corrected to 1000, means the
70 smallest valid value is 1000 (which equals one second).
72 The maximum time to wait for a result, in milliseconds. If there's no result of
73 the action within the given time frame, the action will be cancelled.
74 If smaller than or equal to <arg>_nMinTimeout</arg>, it will be corrected to
75 <arg>_nMinTimeout</arg> + 30000.
79 const String
& _rFilter
,
80 sal_Int32 _nMinTimeout
,
81 sal_Int32 _nMaxTimeout
,
82 const OUStringList
& rBlackList
= OUStringList() );
84 /// cancels the running action
87 // IReference overridables
88 virtual oslInterlockedCount SAL_CALL
acquire();
89 virtual oslInterlockedCount SAL_CALL
release();
92 virtual ~AsyncPickerAction();
95 DECL_LINK( OnActionDone
, void* );
97 AsyncPickerAction(); // never implemented
98 AsyncPickerAction( const AsyncPickerAction
& ); // never implemented
99 AsyncPickerAction
& operator=( const AsyncPickerAction
& ); // never implemented
102 //........................................................................
104 //........................................................................
106 #endif // SVTOOLS_SOURCE_FILEPICKER_ASYNCFILEPICKER_HXX
108 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */