xref: /aoo4110/main/ucb/source/ucp/file/filprp.hxx (revision b1cdbd2c)
1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 #ifndef _FILPRP_HXX_
24 #define _FILPRP_HXX_
25 
26 #include <ucbhelper/macros.hxx>
27 #include <cppuhelper/weak.hxx>
28 #include <com/sun/star/beans/XPropertySetInfo.hpp>
29 #include <com/sun/star/ucb/XContentProvider.hpp>
30 #include <com/sun/star/lang/XTypeProvider.hpp>
31 
32 
33 namespace fileaccess {
34 
35 	class shell;
36 
37 	class XPropertySetInfo_impl
38 		: public cppu::OWeakObject,
39 		  public com::sun::star::lang::XTypeProvider,
40 		  public com::sun::star::beans::XPropertySetInfo
41 	{
42 	public:
43 		XPropertySetInfo_impl( shell* pMyShell,const rtl::OUString& aUnqPath );
44 		XPropertySetInfo_impl( shell* pMyShell,const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& seq );
45 
46 		virtual ~XPropertySetInfo_impl();
47 
48 		// XInterface
49 		virtual com::sun::star::uno::Any SAL_CALL
50 		queryInterface(
51 			const com::sun::star::uno::Type& aType )
52 			throw( com::sun::star::uno::RuntimeException);
53 
54 		virtual void SAL_CALL
55 		acquire(
56 			void )
57 			throw();
58 
59 		virtual void SAL_CALL
60 		release(
61 			void )
62 			throw();
63 
64 
65 		// XTypeProvider
66 
67 		XTYPEPROVIDER_DECL()
68 
69 		virtual com::sun::star::uno::Sequence< com::sun::star::beans::Property > SAL_CALL
70 		getProperties(
71 			void )
72 			throw( com::sun::star::uno::RuntimeException );
73 
74 		virtual com::sun::star::beans::Property SAL_CALL
75 		getPropertyByName(
76 			const rtl::OUString& aName )
77 			throw( com::sun::star::beans::UnknownPropertyException,
78 				   com::sun::star::uno::RuntimeException);
79 
80 		virtual sal_Bool SAL_CALL
81 		hasPropertyByName( const rtl::OUString& Name )
82 			throw( com::sun::star::uno::RuntimeException );
83 
84 	private:
85 		shell*                                                                     m_pMyShell;
86 		com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider >    m_xProvider;
87 		sal_Int32                                                                  m_count;
88 		com::sun::star::uno::Sequence< com::sun::star::beans::Property >           m_seq;
89 	};
90 }
91 
92 #endif
93 
94