Update ooo320-m1
[ooovba.git] / configmgr / source / localbe / localhierarchybrowsersvc.hxx
blob478dc6c6350498f6ada9318eeaee67df58d9dfce
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: localhierarchybrowsersvc.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_BROWSERSVC_HXX
32 #define CONFIGMGR_LOCALBE_BROWSERSVC_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 LocalHierarchyBrowserService : public ::cppu::WeakImplHelper2<
56 task::XJob,
57 lang::XServiceInfo
60 public:
61 explicit
62 LocalHierarchyBrowserService(uno::Reference< uno::XComponentContext > const & _xContext);
63 ~LocalHierarchyBrowserService();
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 private:
84 uno::Reference< lang::XMultiServiceFactory > getServiceFactory() const
85 { return m_xServiceFactory; }
87 uno::Sequence< rtl::OUString > findLocalComponentNames( rtl::OUString const & _aBaseDirectory, rtl::OUString const & _aComponentFileExtension, uno::Sequence< rtl::OUString > const & aExcludeList);
88 uno::Sequence< rtl::OUString > findLocalComponentUrls( rtl::OUString const & _aBaseDirectory, rtl::OUString const & _aComponentFileExtension, uno::Sequence< rtl::OUString > const & aExcludeList);
89 private:
90 uno::Reference< lang::XMultiServiceFactory > m_xServiceFactory;
92 static ServiceInfoHelper getServiceInfo();
94 // -----------------------------------------------------------------------------
95 } // namespace localbe
96 // -----------------------------------------------------------------------------
98 } // namespace configmgr
99 #endif