1*53a9af0aSAndrew Rist /************************************************************** 2cdf0e10cSrcweir * 3*53a9af0aSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*53a9af0aSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*53a9af0aSAndrew Rist * distributed with this work for additional information 6*53a9af0aSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*53a9af0aSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*53a9af0aSAndrew Rist * "License"); you may not use this file except in compliance 9*53a9af0aSAndrew Rist * with the License. You may obtain a copy of the License at 10*53a9af0aSAndrew Rist * 11*53a9af0aSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*53a9af0aSAndrew Rist * 13*53a9af0aSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*53a9af0aSAndrew Rist * software distributed under the License is distributed on an 15*53a9af0aSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*53a9af0aSAndrew Rist * KIND, either express or implied. See the License for the 17*53a9af0aSAndrew Rist * specific language governing permissions and limitations 18*53a9af0aSAndrew Rist * under the License. 19*53a9af0aSAndrew Rist * 20*53a9af0aSAndrew Rist *************************************************************/ 21*53a9af0aSAndrew Rist 22*53a9af0aSAndrew Rist 23cdf0e10cSrcweir 24cdf0e10cSrcweir #ifndef PRODUCT_MAPPER_HXX 25cdf0e10cSrcweir #define PRODUCT_MAPPER_HXX 26cdf0e10cSrcweir 27cdf0e10cSrcweir #include <soldep/sstring.hxx> 28cdf0e10cSrcweir 29cdf0e10cSrcweir class GenericInformation; 30cdf0e10cSrcweir class GenericInformationList; 31cdf0e10cSrcweir 32cdf0e10cSrcweir DECLARE_LIST( BaseProductList, ByteString * ) 33cdf0e10cSrcweir 34cdf0e10cSrcweir // 35cdf0e10cSrcweir // class ProductMapper 36cdf0e10cSrcweir // 37cdf0e10cSrcweir 38cdf0e10cSrcweir #define PRODUCT_MAPPER_OK 0x0000 39cdf0e10cSrcweir #define PRODUCT_MAPPER_NO_PRODUCT 0x0001 40cdf0e10cSrcweir #define PRODUCT_MAPPER_NO_VERSION_INFORMATION 0x0002 41cdf0e10cSrcweir 42cdf0e10cSrcweir class ProductMapper 43cdf0e10cSrcweir { 44cdf0e10cSrcweir private: 45cdf0e10cSrcweir GenericInformationList *pVersionList; 46cdf0e10cSrcweir GenericInformationList *pProductList; 47cdf0e10cSrcweir 48cdf0e10cSrcweir SByteStringList aBaseList; 49cdf0e10cSrcweir SByteStringList aPrintedList; 50cdf0e10cSrcweir 51cdf0e10cSrcweir sal_uInt16 PrintDependentTargets( const ByteString &rProduct, sal_uInt16 nLevel = 0 ); 52cdf0e10cSrcweir sal_uInt16 PrintAndDeleteBaseList(); 53cdf0e10cSrcweir 54cdf0e10cSrcweir SByteStringList *GetMinorList( const ByteString &rVersion, const ByteString &rEnvironment ); 55cdf0e10cSrcweir BaseProductList *GetBases( GenericInformation *pProductInfo, sal_uInt16 nLevel = 0, BaseProductList *pBases = NULL ); 56cdf0e10cSrcweir 57cdf0e10cSrcweir sal_uInt16 PrintSingleMinorList( GenericInformation *pProductInfo, BaseProductList *pBases, const ByteString rEnvironment ); 58cdf0e10cSrcweir 59cdf0e10cSrcweir public: 60cdf0e10cSrcweir ProductMapper(); 61cdf0e10cSrcweir ProductMapper( GenericInformationList *pVerList ); 62cdf0e10cSrcweir 63cdf0e10cSrcweir ~ProductMapper(); 64cdf0e10cSrcweir 65cdf0e10cSrcweir void CreateProductList( GenericInformationList *pVerList ); 66cdf0e10cSrcweir 67cdf0e10cSrcweir sal_uInt16 GetProductInformation( const ByteString &rProduct, GenericInformation *& pProductInfo ); 68cdf0e10cSrcweir sal_uInt16 PrintDependencies( const ByteString &rProduct ); 69cdf0e10cSrcweir sal_uInt16 PrintProductList(); 70cdf0e10cSrcweir 71cdf0e10cSrcweir sal_uInt16 PrintMinorList( const ByteString rProduct, const ByteString rEnvironment ); 72cdf0e10cSrcweir 73cdf0e10cSrcweir static String GetVersionRoot( GenericInformationList *pList, const ByteString &rVersion ); 74cdf0e10cSrcweir GetProductList()75cdf0e10cSrcweir GenericInformationList *GetProductList() { return pProductList; } 76cdf0e10cSrcweir }; 77cdf0e10cSrcweir 78cdf0e10cSrcweir 79cdf0e10cSrcweir #endif // PRODUCT_MAPPER_HXX 80cdf0e10cSrcweir 81