1 /* 2 * Copyright (c) 2024 Huawei Device Co., Ltd. 3 * Licensed under the Apache License, Version 2.0 (the "License"); 4 * you may not use this file except in compliance with the License. 5 * You may obtain a copy of the License at 6 * 7 * http://www.apache.org/licenses/LICENSE-2.0 8 * 9 * Unless required by applicable law or agreed to in writing, software 10 * distributed under the License is distributed on an "AS IS" BASIS, 11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 * See the License for the specific language governing permissions and 13 * limitations under the License. 14 */ 15 16 #ifndef FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_NAVIGATION_ROUTER_MAP_HELPER_H 17 #define FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_NAVIGATION_ROUTER_MAP_HELPER_H 18 19 #include "bundle_info.h" 20 #include "sem_ver.h" 21 22 #include <set> 23 24 namespace OHOS { 25 namespace AppExecFwk { 26 class RouterMapHelper { 27 public: 28 static void MergeRouter(BundleInfo &info); 29 static void MergeRouter(const std::vector<RouterItem>& routerArrayList, 30 std::vector<RouterItem>& routerArray, const std::set<std::string>& moduleNameSet); 31 static int32_t Compare(const std::string &version1, const std::string &version2); 32 static int32_t Compare(const SemVer &semVer1, const SemVer &semVer2); 33 static int32_t CompareIdentifiers(const std::string& a, const std::string& b); 34 static int32_t CompareMain(const SemVer &semVer1, const SemVer &semVer2); 35 static int32_t ComparePre(const SemVer &semVer1, const SemVer &semVer2); 36 static std::string ExtractVersionFromOhmurl(const std::string &ohmurl); 37 }; 38 } // AppExecFwk 39 } // OHOS 40 #endif // FOUNDATION_APPEXECFWK_SERVICES_BUNDLEMGR_INCLUDE_NAVIGATION_ROUTER_MAP_HELPER_H