update dev300-m58
[ooovba.git] / configmgr / source / localbe / localdataimportsvc.hxx
blob187e6703e43dd8e87b9f07652b990b61489dd4d9
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: localdataimportsvc.hxx,v $
10 * $Revision: 1.4 $
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 CONFIGMGR_LOCALBE_IMPORTSVC_HXX
32 #define CONFIGMGR_LOCALBE_IMPORTSVC_HXX
34 #include "serviceinfohelper.hxx"
35 #include <cppuhelper/implbase2.hxx>
36 #include <osl/mutex.hxx>
37 #include <com/sun/star/uno/XComponentContext.hpp>
38 #include <com/sun/star/lang/XServiceInfo.hpp>
39 #include <com/sun/star/task/XJob.hpp>
41 // -----------------------------------------------------------------------------
43 namespace configmgr
45 // -----------------------------------------------------------------------------
46 namespace localbe
48 // -----------------------------------------------------------------------------
49 namespace uno = ::com::sun::star::uno;
50 namespace lang = ::com::sun::star::lang;
51 namespace task = ::com::sun::star::task;
52 namespace beans = ::com::sun::star::beans;
53 // -----------------------------------------------------------------------------
55 class LocalDataImportService : public ::cppu::WeakImplHelper2<
56 task::XJob,
57 lang::XServiceInfo
60 public:
61 explicit
62 LocalDataImportService(uno::Reference< uno::XComponentContext > const & _xContext);
63 ~LocalDataImportService();
65 // XServiceInfo
66 virtual rtl::OUString SAL_CALL
67 getImplementationName( )
68 throw (uno::RuntimeException);
70 virtual sal_Bool SAL_CALL
71 supportsService( const rtl::OUString& ServiceName )
72 throw (uno::RuntimeException);
74 virtual uno::Sequence< rtl::OUString > SAL_CALL
75 getSupportedServiceNames( )
76 throw (uno::RuntimeException);
78 // XJob
79 virtual uno::Any SAL_CALL
80 execute( const uno::Sequence< beans::NamedValue >& Arguments )
81 throw (lang::IllegalArgumentException, uno::Exception, uno::RuntimeException);
83 protected:
84 uno::Reference< lang::XMultiServiceFactory > getServiceFactory() const
85 { return m_xServiceFactory; }
87 private:
88 uno::Reference< lang::XMultiServiceFactory > m_xServiceFactory;
90 static ServiceInfoHelper getServiceInfo();
92 // -----------------------------------------------------------------------------
93 } // namespace xml
94 // -----------------------------------------------------------------------------
96 } // namespace configmgr
97 #endif