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 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 // XTypeProvider 65 virtual com::sun::star::uno::Sequence< com::sun::star::uno::Type > SAL_CALL 66 getTypes( 67 void ); 68 69 virtual com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL 70 getImplementationId( 71 void ); 72 73 // XContentIdentifier 74 virtual rtl::OUString SAL_CALL 75 getContentIdentifier( 76 void ); 77 78 virtual rtl::OUString SAL_CALL 79 getContentProviderScheme( 80 void ); 81 82 private: 83 shell* m_pMyShell; 84 rtl::OUString m_aContentId; // The URL string 85 rtl::OUString m_aNormalizedId; // The somehow normalized string 86 rtl::OUString m_aProviderScheme; 87 sal_Bool m_bNormalized; 88 }; 89 90 } // end namespace fileaccess 91 92 93 #endif 94