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 28 #ifndef PRODUCT_MAPPER_HXX 29 #define PRODUCT_MAPPER_HXX 30 31 #include <soldep/sstring.hxx> 32 33 class GenericInformation; 34 class GenericInformationList; 35 36 DECLARE_LIST( BaseProductList, ByteString * ) 37 38 // 39 // class ProductMapper 40 // 41 42 #define PRODUCT_MAPPER_OK 0x0000 43 #define PRODUCT_MAPPER_NO_PRODUCT 0x0001 44 #define PRODUCT_MAPPER_NO_VERSION_INFORMATION 0x0002 45 46 class ProductMapper 47 { 48 private: 49 GenericInformationList *pVersionList; 50 GenericInformationList *pProductList; 51 52 SByteStringList aBaseList; 53 SByteStringList aPrintedList; 54 55 sal_uInt16 PrintDependentTargets( const ByteString &rProduct, sal_uInt16 nLevel = 0 ); 56 sal_uInt16 PrintAndDeleteBaseList(); 57 58 SByteStringList *GetMinorList( const ByteString &rVersion, const ByteString &rEnvironment ); 59 BaseProductList *GetBases( GenericInformation *pProductInfo, sal_uInt16 nLevel = 0, BaseProductList *pBases = NULL ); 60 61 sal_uInt16 PrintSingleMinorList( GenericInformation *pProductInfo, BaseProductList *pBases, const ByteString rEnvironment ); 62 63 public: 64 ProductMapper(); 65 ProductMapper( GenericInformationList *pVerList ); 66 67 ~ProductMapper(); 68 69 void CreateProductList( GenericInformationList *pVerList ); 70 71 sal_uInt16 GetProductInformation( const ByteString &rProduct, GenericInformation *& pProductInfo ); 72 sal_uInt16 PrintDependencies( const ByteString &rProduct ); 73 sal_uInt16 PrintProductList(); 74 75 sal_uInt16 PrintMinorList( const ByteString rProduct, const ByteString rEnvironment ); 76 77 static String GetVersionRoot( GenericInformationList *pList, const ByteString &rVersion ); 78 79 GenericInformationList *GetProductList() { return pProductList; } 80 }; 81 82 83 #endif // PRODUCT_MAPPER_HXX 84 85