Update ooo320-m1
[ooovba.git] / fpicker / source / unx / kde_unx / UnxNotifyThread.hxx
blob3e46906ec0a8e1ed0a209a63c499ba56aba352a9
1 /*************************************************************************
9 * The Contents of this file are made available subject to the terms of
10 * either of the following licenses
12 * - GNU Lesser General Public License Version 2.1
13 * - Sun Industry Standards Source License Version 1.1
15 * Sun Microsystems Inc., October, 2000
17 * GNU Lesser General Public License Version 2.1
18 * =============================================
19 * Copyright 2000 by Sun Microsystems, Inc.
20 * 901 San Antonio Road, Palo Alto, CA 94303, USA
22 * This library is free software; you can redistribute it and/or
23 * modify it under the terms of the GNU Lesser General Public
24 * License version 2.1, as published by the Free Software Foundation.
26 * This library is distributed in the hope that it will be useful,
27 * but WITHOUT ANY WARRANTY; without even the implied warranty of
28 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
29 * Lesser General Public License for more details.
31 * You should have received a copy of the GNU Lesser General Public
32 * License along with this library; if not, write to the Free Software
33 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
34 * MA 02111-1307 USA
37 * Sun Industry Standards Source License Version 1.1
38 * =================================================
39 * The contents of this file are subject to the Sun Industry Standards
40 * Source License Version 1.1 (the "License"); You may not use this file
41 * except in compliance with the License. You may obtain a copy of the
42 * License at http://www.openoffice.org/license.html.
44 * Software provided under this License is provided on an "AS IS" basis,
45 * WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
46 * WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
47 * MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
48 * See the License for the specific provisions governing your rights and
49 * obligations concerning the Software.
51 * The Initial Developer of the Original Code is: Sun Microsystems, Inc.
53 * Copyright: 2000 by Sun Microsystems, Inc.
55 * All Rights Reserved.
57 * Contributor(s): Jan Holesovsky <kendy@openoffice.org>
60 ************************************************************************/
62 #ifndef _UNXNOTIFYTHREAD_HXX_
63 #define _UNXNOTIFYTHREAD_HXX_
65 #ifndef _COM_SUN_STAR_UI_DIALOGS_XFILEPICKERLISTENER_HPP_
66 #include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
67 #endif
69 #ifndef _COM_SUN_STAR_UNO_REFERENCE_HXX_
70 #include <com/sun/star/uno/Reference.hxx>
71 #endif
73 #ifndef _OSL_CONDITN_HXX_
74 #include <osl/conditn.hxx>
75 #endif
77 #ifndef _OSL_MUTEX_HXX_
78 #include <osl/mutex.hxx>
79 #endif
81 #ifndef _OSL_THREAD_HXX_
82 #include <osl/thread.hxx>
83 #endif
85 class UnxFilePicker;
87 class UnxFilePickerNotifyThread : public ::osl::Thread
89 protected:
90 enum NotifyType
92 Nothing = 0,
93 FileSelectionChanged
94 // TODO More to come...
97 UnxFilePicker *m_pUnxFilePicker;
99 ::osl::Mutex m_aMutex;
101 ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener > m_xListener;
103 sal_Bool m_bExit;
104 ::osl::Condition m_aExitCondition;
106 NotifyType m_eNotifyType;
107 ::osl::Condition m_aNotifyCondition;
108 sal_Int16 m_nControlId;
110 public:
111 UnxFilePickerNotifyThread( UnxFilePicker *pUnxFilePicker );
113 virtual void SAL_CALL addFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
114 throw( ::com::sun::star::uno::RuntimeException );
115 virtual void SAL_CALL removeFilePickerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::ui::dialogs::XFilePickerListener >& xListener )
116 throw( ::com::sun::star::uno::RuntimeException );
118 void SAL_CALL exit();
120 void SAL_CALL fileSelectionChanged();
121 /* TODO
122 void SAL_CALL directoryChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
123 rtl::OUString SAL_CALL helpRequested( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent ) const;
124 void SAL_CALL controlStateChanged( ::com::sun::star::ui::dialogs::FilePickerEvent aEvent );
125 void SAL_CALL dialogSizeChanged( );
128 protected:
129 virtual void SAL_CALL run();
132 #endif // _UNXNOTIFYTHREAD_HXX_