Update ooo320-m1
[ooovba.git] / desktop / unx / splash / unxsplash.hxx
blob54193248fd7eeb5cb6d5a5322ebd365d224da0d4
1 /*************************************************************************
3 * OpenOffice.org - a multi-platform office productivity suite
5 * $RCSfile$
7 * $Revision: 7305 $
9 * last change: $Author: jholesovsky $ $Date: 2006-08-04 16:35:41 +0200 (Pá, 04 srp 2006) $
11 * The Contents of this file are made available subject to
12 * the terms of GNU Lesser General Public License Version 2.1.
15 * GNU Lesser General Public License Version 2.1
16 * =============================================
17 * Copyright 2005 by Sun Microsystems, Inc.
18 * 901 San Antonio Road, Palo Alto, CA 94303, USA
20 * This library is free software; you can redistribute it and/or
21 * modify it under the terms of the GNU Lesser General Public
22 * License version 2.1, as published by the Free Software Foundation.
24 * This library is distributed in the hope that it will be useful,
25 * but WITHOUT ANY WARRANTY; without even the implied warranty of
26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
27 * Lesser General Public License for more details.
29 * You should have received a copy of the GNU Lesser General Public
30 * License along with this library; if not, write to the Free Software
31 * Foundation, Inc., 59 Temple Place, Suite 330, Boston,
32 * MA 02111-1307 USA
34 ************************************************************************/
36 #include <stdio.h>
38 #ifndef _COM_SUN_STAR_LANG_XSERVICEINFO_HPP_
39 #include <com/sun/star/lang/XServiceInfo.hpp>
40 #endif
41 #ifndef _COM_SUN_STAR_UNO_EXCEPTION_HPP_
42 #include <com/sun/star/uno/Exception.hpp>
43 #endif
44 #ifndef _COM_SUN_STAR_UNO_REFERENCE_H_
45 #include <com/sun/star/uno/Reference.h>
46 #endif
47 #ifndef _COM_SUN_STAR_LANG_XCOMPONENT_HPP_
48 #include <com/sun/star/lang/XComponent.hpp>
49 #endif
50 #ifndef _COM_SUN_STAR_TASK_XSTATUSINDICATOR_HPP_
51 #include <com/sun/star/task/XStatusIndicator.hpp>
52 #endif
53 #ifndef _COM_SUN_STAR_LANG_XINITIALIZATION_HPP_
54 #include <com/sun/star/lang/XInitialization.hpp>
55 #endif
56 #ifndef _CPPUHELPER_IMPLBASE2_HXX_
57 #include <cppuhelper/implbase2.hxx>
58 #endif
59 #ifndef _CPPUHELPER_INTERFACECONTAINER_H_
60 #include <cppuhelper/interfacecontainer.h>
61 #endif
62 #include <com/sun/star/lang/XSingleServiceFactory.hpp>
63 #include <osl/mutex.hxx>
64 #ifndef _RTL_BOOTSTRAP_HXX_
65 #include <rtl/bootstrap.hxx>
66 #endif
68 using namespace ::rtl;
69 using namespace ::com::sun::star::uno;
70 using namespace ::com::sun::star::lang;
71 using namespace ::com::sun::star::task;
73 namespace desktop {
75 class UnxSplashScreen : public ::cppu::WeakImplHelper2< XStatusIndicator, XInitialization >
77 private:
78 // don't allow anybody but ourselves to create instances of this class
79 UnxSplashScreen( const UnxSplashScreen& );
80 UnxSplashScreen( void );
81 UnxSplashScreen operator =( const UnxSplashScreen& );
83 UnxSplashScreen( const Reference< XMultiServiceFactory >& xFactory );
85 virtual ~UnxSplashScreen();
87 static UnxSplashScreen *m_pINSTANCE;
89 static osl::Mutex m_aMutex;
90 Reference< XMultiServiceFactory > m_rFactory;
92 FILE *m_pOutFd;
94 public:
95 static const char* interfaces[];
96 static const sal_Char *serviceName;
97 static const sal_Char *implementationName;
98 static const sal_Char *supportedServiceNames[];
100 static Reference< XInterface > getInstance( const Reference < XMultiServiceFactory >& xFactory );
102 // static service info
103 static OUString impl_getImplementationName();
104 static Sequence<OUString> impl_getSupportedServiceNames();
106 // XStatusIndicator
107 virtual void SAL_CALL start( const OUString& aText, sal_Int32 nRange ) throw ( RuntimeException );
108 virtual void SAL_CALL end() throw ( RuntimeException );
109 virtual void SAL_CALL reset() throw ( RuntimeException );
110 virtual void SAL_CALL setText( const OUString& aText ) throw ( RuntimeException );
111 virtual void SAL_CALL setValue( sal_Int32 nValue ) throw ( RuntimeException );
113 // XInitialize
114 virtual void SAL_CALL initialize( const ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any>& aArguments ) throw ( RuntimeException );