update dev300-m58
[ooovba.git] / xmlhelp / source / treeview / tvfactory.hxx
blobfc13a88b9ae2723cec33b06edd3869d6b5c3aebd
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: tvfactory.hxx,v $
10 * $Revision: 1.3 $
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 _TREEVIEW_TVFACTORY_HXX_
32 #define _TREEVIEW_TVFACTORY_HXX_
34 #include <rtl/ref.hxx>
35 #include <rtl/ustring.hxx>
36 #include <cppuhelper/weak.hxx>
37 #include <ucbhelper/macros.hxx>
38 #include <com/sun/star/uno/XInterface.hpp>
39 #include <com/sun/star/lang/XServiceInfo.hpp>
40 #include <com/sun/star/lang/XTypeProvider.hpp>
41 #include <com/sun/star/lang/XMultiServiceFactory.hpp>
45 namespace treeview {
47 class TVFactory:
48 public cppu::OWeakObject,
49 public com::sun::star::lang::XServiceInfo,
50 public com::sun::star::lang::XTypeProvider,
51 public com::sun::star::lang::XMultiServiceFactory
53 public:
55 TVFactory( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF );
57 ~TVFactory();
59 // XInterface
60 virtual com::sun::star::uno::Any SAL_CALL
61 queryInterface(
62 const com::sun::star::uno::Type& aType )
63 throw( com::sun::star::uno::RuntimeException);
65 virtual void SAL_CALL
66 acquire(
67 void )
68 throw();
70 virtual void SAL_CALL
71 release(
72 void )
73 throw();
76 // XTypeProvider
78 XTYPEPROVIDER_DECL()
81 // XServiceInfo
82 virtual rtl::OUString SAL_CALL
83 getImplementationName(
84 void )
85 throw( com::sun::star::uno::RuntimeException );
87 virtual sal_Bool SAL_CALL
88 supportsService(
89 const rtl::OUString& ServiceName )
90 throw(com::sun::star::uno::RuntimeException );
92 virtual com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL
93 getSupportedServiceNames(
94 void )
95 throw( com::sun::star::uno::RuntimeException );
97 // XMultiServiceFactory
99 virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
100 createInstance(
101 const rtl::OUString& aServiceSpecifier )
102 throw( com::sun::star::uno::Exception,
103 com::sun::star::uno::RuntimeException );
105 virtual com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
106 createInstanceWithArguments(
107 const rtl::OUString& ServiceSpecifier,
108 const com::sun::star::uno::Sequence< com::sun::star::uno::Any >& Arguments )
109 throw( com::sun::star::uno::Exception,
110 com::sun::star::uno::RuntimeException);
112 virtual com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL
113 getAvailableServiceNames( )
114 throw( com::sun::star::uno::RuntimeException );
116 // Other
118 static rtl::OUString SAL_CALL getImplementationName_static();
120 static com::sun::star::uno::Sequence< rtl::OUString > SAL_CALL getSupportedServiceNames_static();
122 static com::sun::star::uno::Reference< com::sun::star::lang::XSingleServiceFactory > SAL_CALL
123 createServiceFactory(
124 const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxServiceMgr );
126 static com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL
127 CreateInstance(
128 const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMultiServiceFactory );
131 private:
133 // Members
134 com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
135 com::sun::star::uno::Reference< com::sun::star::uno::XInterface > m_xHDS;
141 #endif