1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: asyncfilepicker.hxx,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
31 #ifndef SVTOOLS_SOURCE_FILEPICKER_ASYNCFILEPICKER_HXX
32 #define SVTOOLS_SOURCE_FILEPICKER_ASYNCFILEPICKER_HXX
34 /** === begin UNO includes === **/
35 /** === end UNO includes === **/
37 #include <tools/link.hxx>
38 #include <tools/string.hxx>
39 #include <rtl/ref.hxx>
40 #include <rtl/ustring.hxx>
41 #include <com/sun/star/uno/Sequence.h>
46 typedef ::com::sun::star::uno::Sequence
< ::rtl::OUString
> OUStringList
;
48 //........................................................................
51 //........................................................................
54 //====================================================================
56 //====================================================================
57 class AsyncPickerAction
: public ::rtl::IReference
68 mutable oslInterlockedCount m_refCount
;
71 SvtFileDialog
* m_pDialog
;
77 AsyncPickerAction( SvtFileDialog
* _pDialog
, SvtFileView
* _pView
, const Action _eAction
);
79 /** executes the action
82 the minimum timeout to wait, in milliseconds. If negative, the action will we done
83 synchronously. If between 0 and 999, it will be corrected to 1000, means the
84 smallest valid value is 1000 (which equals one second).
86 The maximum time to wait for a result, in milliseconds. If there's no result of
87 the action within the given time frame, the action will be cancelled.
88 If smaller than or equal to <arg>_nMinTimeout</arg>, it will be corrected to
89 <arg>_nMinTimeout</arg> + 30000.
93 const String
& _rFilter
,
94 sal_Int32 _nMinTimeout
,
95 sal_Int32 _nMaxTimeout
,
96 const OUStringList
& rBlackList
= OUStringList() );
98 /// cancels the running action
101 // IReference overridables
102 virtual oslInterlockedCount SAL_CALL
acquire();
103 virtual oslInterlockedCount SAL_CALL
release();
106 virtual ~AsyncPickerAction();
109 DECL_LINK( OnActionDone
, void* );
111 AsyncPickerAction(); // never implemented
112 AsyncPickerAction( const AsyncPickerAction
& ); // never implemented
113 AsyncPickerAction
& operator=( const AsyncPickerAction
& ); // never implemented
116 //........................................................................
118 //........................................................................
120 #endif // SVTOOLS_SOURCE_FILEPICKER_ASYNCFILEPICKER_HXX