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 _FILID_HXX_ 24 #define _FILID_HXX_ 25 26 #include <rtl/ustring.hxx> 27 #include <cppuhelper/weak.hxx> 28 #include <com/sun/star/lang/XTypeProvider.hpp> 29 #include <com/sun/star/ucb/XContentIdentifier.hpp> 30 31 namespace fileaccess { 32 33 class shell; 34 35 class FileContentIdentifier : 36 public cppu::OWeakObject, 37 public com::sun::star::lang::XTypeProvider, 38 public com::sun::star::ucb::XContentIdentifier 39 { 40 41 // This implementation has to be reworked 42 public: 43 FileContentIdentifier( shell* pMyShell, 44 const rtl::OUString& aUnqPath, 45 sal_Bool IsNormalized = true ); 46 47 virtual ~FileContentIdentifier(); 48 49 // XInterface 50 virtual com::sun::star::uno::Any SAL_CALL 51 queryInterface( 52 const com::sun::star::uno::Type& aType ) 53 throw( com::sun::star::uno::RuntimeException ); 54 55 virtual void SAL_CALL 56 acquire( 57 void ) 58 throw(); 59 60 virtual void SAL_CALL 61 release( 62 void ) 63 throw(); 64 65 // XTypeProvider 66 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL 67 getTypes( 68 void ) 69 throw( com::sun::star::uno::RuntimeException ); 70 71 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 72 getImplementationId( 73 void ) 74 throw( com::sun::star::uno::RuntimeException ); 75 76 // XContentIdentifier 77 virtual rtl::OUString SAL_CALL 78 getContentIdentifier( 79 void ) 80 throw( com::sun::star::uno::RuntimeException ); 81 82 virtual rtl::OUString SAL_CALL 83 getContentProviderScheme( 84 void ) 85 throw( com::sun::star::uno::RuntimeException ); 86 87 private: 88 shell* m_pMyShell; 89 rtl::OUString m_aContentId; // The URL string 90 rtl::OUString m_aNormalizedId; // The somehow normalized string 91 rtl::OUString m_aProviderScheme; 92 sal_Bool m_bNormalized; 93 }; 94 95 } // end namespace fileaccess 96 97 98 #endif 99