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