xref: /trunk/main/ucb/source/ucp/file/filprp.hxx (revision cdf0e10c)
1 /*************************************************************************
2  *
3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4  *
5  * Copyright 2000, 2010 Oracle and/or its affiliates.
6  *
7  * OpenOffice.org - a multi-platform office productivity suite
8  *
9  * This file is part of OpenOffice.org.
10  *
11  * OpenOffice.org is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU Lesser General Public License version 3
13  * only, as published by the Free Software Foundation.
14  *
15  * OpenOffice.org is distributed in the hope that it will be useful,
16  * but WITHOUT ANY WARRANTY; without even the implied warranty of
17  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  * GNU Lesser General Public License version 3 for more details
19  * (a copy is included in the LICENSE file that accompanied this code).
20  *
21  * You should have received a copy of the GNU Lesser General Public License
22  * version 3 along with OpenOffice.org.  If not, see
23  * <http://www.openoffice.org/license.html>
24  * for a copy of the LGPLv3 License.
25  *
26  ************************************************************************/
27 #ifndef _FILPRP_HXX_
28 #define _FILPRP_HXX_
29 
30 #include <ucbhelper/macros.hxx>
31 #include <cppuhelper/weak.hxx>
32 #include <com/sun/star/beans/XPropertySetInfo.hpp>
33 #include <com/sun/star/ucb/XContentProvider.hpp>
34 #include <com/sun/star/lang/XTypeProvider.hpp>
35 
36 
37 namespace fileaccess {
38 
39 	class shell;
40 
41 	class XPropertySetInfo_impl
42 		: public cppu::OWeakObject,
43 		  public com::sun::star::lang::XTypeProvider,
44 		  public com::sun::star::beans::XPropertySetInfo
45 	{
46 	public:
47 		XPropertySetInfo_impl( shell* pMyShell,const rtl::OUString& aUnqPath );
48 		XPropertySetInfo_impl( shell* pMyShell,const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& seq );
49 
50 		virtual ~XPropertySetInfo_impl();
51 
52 		// XInterface
53 		virtual com::sun::star::uno::Any SAL_CALL
54 		queryInterface(
55 			const com::sun::star::uno::Type& aType )
56 			throw( com::sun::star::uno::RuntimeException);
57 
58 		virtual void SAL_CALL
59 		acquire(
60 			void )
61 			throw();
62 
63 		virtual void SAL_CALL
64 		release(
65 			void )
66 			throw();
67 
68 
69 		// XTypeProvider
70 
71 		XTYPEPROVIDER_DECL()
72 
73 		virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property > SAL_CALL
74 		getProperties(
75 			void )
76 			throw( com::sun::star::uno::RuntimeException );
77 
78 		virtual com::sun::star::beans::Property SAL_CALL
79 		getPropertyByName(
80 			const rtl::OUString& aName )
81 			throw( com::sun::star::beans::UnknownPropertyException,
82 				   com::sun::star::uno::RuntimeException);
83 
84 		virtual sal_Bool SAL_CALL
85 		hasPropertyByName( const rtl::OUString& Name )
86 			throw( com::sun::star::uno::RuntimeException );
87 
88 	private:
89 		shell*                                                                     m_pMyShell;
90 		com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider >    m_xProvider;
91 		sal_Int32                                                                  m_count;
92 		com::sun::star::uno::Sequence< com::sun::star::beans::Property >           m_seq;
93 	};
94 }
95 
96 #endif
97 
98