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 24 #ifndef _SD_PPT_EXSOUNDCOLLECTION_HXX 25 #define _SD_PPT_EXSOUNDCOLLECTION_HXX 26 27 #ifdef DBG_ANIM_LOG 28 #include <stdio.h> 29 #endif 30 #include <tools/string.hxx> 31 #include <tools/stream.hxx> 32 #ifndef BOOST_SHARED_PTR_HPP_INCLUDED 33 #include <boost/shared_ptr.hpp> 34 #endif 35 36 #include <list> 37 38 namespace ppt 39 { 40 41 class ExSoundEntry 42 { 43 sal_uInt32 nFileSize; 44 String aSoundURL; 45 46 String ImplGetName() const; 47 String ImplGetExtension() const; 48 49 public : 50 51 sal_Bool IsSameURL( const String& rURL ) const; GetFileSize() const52 sal_uInt32 GetFileSize( ) const { return nFileSize; }; 53 54 ExSoundEntry( const String& rSoundURL ); 55 56 // returns the size of a complete SoundContainer 57 sal_uInt32 GetSize( sal_uInt32 nId ) const; 58 void Write( SvStream& rSt, sal_uInt32 nId ); 59 }; 60 61 class ExSoundCollection : private List 62 { 63 const ExSoundEntry* ImplGetByIndex( sal_uInt32 nId ) const; 64 65 public: 66 ExSoundCollection()67 ExSoundCollection() {} 68 ~ExSoundCollection(); 69 70 sal_uInt32 GetId( const String& ); 71 72 // returns the size of a complete SoundCollectionContainer 73 sal_uInt32 GetSize() const; 74 void Write( SvStream& rSt ); 75 }; 76 77 } // namespace ppt 78 79 #endif 80