M module-services/service-cellular/CMakeLists.txt => module-services/service-cellular/CMakeLists.txt +5 -3
@@ 17,9 17,9 @@ set(SOURCES
src/CSQHandler.cpp
src/volte/VolteCapabilityHandler.cpp
- src/volte/ImsiParserUS.cpp
- src/volte/VolteAllowedUSList.cpp
src/volte/VolteCapabilityHandlerCellular.cpp
+ src/volte/ImsiParser.cpp
+ src/volte/VolteAllowedList.cpp
src/ussd/USSDHandler.cpp
@@ 52,7 52,9 @@ set(SOURCES
requests/ColpRequest.cpp
requests/CallWaitingRequest.cpp
requests/CallBarringRequest.cpp
- handler/RawATHandler.cpp)
+ handler/RawATHandler.cpp
+ src/volte/VolteAllowedList.hpp
+)
add_library(${PROJECT_NAME} STATIC ${SOURCES})
M module-services/service-cellular/src/ServiceCellularPriv.cpp => module-services/service-cellular/src/ServiceCellularPriv.cpp +2 -4
@@ 10,8 10,7 @@
#include <service-db/agents/settings/SystemSettings.hpp>
-#include <volte/ImsiParserUS.hpp>
-#include <volte/VolteAllowedUSList.hpp>
+#include <volte/VolteAllowedList.hpp>
#include <volte/VolteCapabilityHandlerCellular.hpp>
#include <service-evtmgr/EVMessages.hpp>
@@ 47,8 46,7 @@ namespace cellular::internal
std::make_unique<CSQHandler>(),
},
volteCapability{
- std::make_unique<VolteCapabilityHandler>(std::make_unique<cellular::service::ImsiParserUS>(),
- std::make_unique<cellular::service::VolteAllowedUSList>(),
+ std::make_unique<VolteCapabilityHandler>(std::make_unique<cellular::service::VolteAllowedList>(),
std::make_unique<cellular::service::VolteCapabilityCellular>())},
ussdHandler{std::make_unique<USSDHandler>()}
{
A module-services/service-cellular/src/volte/ImsiParser.cpp => module-services/service-cellular/src/volte/ImsiParser.cpp +27 -0
@@ 0,0 1,27 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#include "ImsiParser.hpp"
+
+namespace cellular
+{
+ auto service::ImsiParser::isAllowed(const std::string &imsi) const -> bool
+ {
+ if (operatorCodes.empty()) {
+ return false;
+ }
+
+ for (auto const &code : operatorCodes) {
+ if (textStartsWith(imsi, code)) {
+ return true;
+ }
+ }
+
+ return false;
+ }
+
+ auto service::ImsiParser::textStartsWith(std::string_view text, std::string_view prefix) const -> bool
+ {
+ return !text.empty() && !prefix.empty() && std::equal(prefix.begin(), prefix.end(), text.begin());
+ }
+} // namespace cellular
R module-services/service-cellular/src/volte/ImsiParserInterface.hpp => module-services/service-cellular/src/volte/ImsiParser.hpp +10 -6
@@ 1,19 1,23 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
-#include "OperatorInfo.hpp"
#include <string>
-#include <optional>
+#include <string_view>
+#include <vector>
namespace cellular::service
{
- class ImsiParserInteface
+ class ImsiParser
{
public:
- virtual ~ImsiParserInteface() = default;
+ explicit ImsiParser(std::vector<std::string> &&operatorList) : operatorCodes{operatorList}
+ {}
+ auto isAllowed(const std::string &imsi) const -> bool;
- virtual auto parse(const std::string &imsi) -> std::optional<OperatorInfo> = 0;
+ private:
+ std::vector<std::string> operatorCodes;
+ inline auto textStartsWith(std::string_view text, std::string_view prefix) const -> bool;
};
} // namespace cellular::service
D module-services/service-cellular/src/volte/ImsiParserUS.cpp => module-services/service-cellular/src/volte/ImsiParserUS.cpp +0 -37
@@ 1,37 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#include "ImsiParserUS.hpp"
-#include <log/log.hpp>
-#include <array>
-#include <algorithm>
-#include <stdexcept>
-
-namespace cellular::service
-{
- constexpr auto usMccCount = 7;
- const std::array<std::string, usMccCount> usMcc{"310", "311", "312", "313", "314", "315", "316"};
-
- auto ImsiParserUS::parse(const std::string &imsi) -> std::optional<OperatorInfo>
- {
- constexpr auto mccSize = 3;
- constexpr auto mncSize = 3;
-
- std::string mcc, mnc;
- try {
- mcc = imsi.substr(0, mccSize);
- mnc = imsi.substr(mccSize, mncSize);
- }
- catch (const std::out_of_range &e) {
- LOG_ERROR("[VoLTE] IMSI parsing error: %s", e.what());
- return std::nullopt;
- }
-
- if (std::find(std::begin(usMcc), std::end(usMcc), mcc) == std::end(usMcc)) {
- LOG_ERROR("[VoLTE] MCC not from USA");
- return std::nullopt;
- }
-
- return OperatorInfo(mcc, mnc);
- }
-} // namespace cellular::service
A module-services/service-cellular/src/volte/ImsiParser_Austria.hpp => module-services/service-cellular/src/volte/ImsiParser_Austria.hpp +18 -0
@@ 0,0 1,18 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#pragma once
+
+#include "ImsiParser.hpp"
+
+namespace cellular::service
+{
+ ;
+
+ struct ImsiParserAT : ImsiParser
+ {
+ explicit ImsiParserAT()
+ : ImsiParser(std::vector<std::string>{"23201", "23203", "23213", "23205", "23210", "23207", "23208"})
+ {}
+ };
+} // namespace cellular::service
R module-services/service-cellular/src/volte/VolteAllowedUSList.hpp => module-services/service-cellular/src/volte/ImsiParser_Canada.hpp +7 -6
@@ 1,16 1,17 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
-#include "VolteAllowedListInterface.hpp"
-#include "OperatorInfo.hpp"
+#include "ImsiParser.hpp"
namespace cellular::service
{
- class VolteAllowedUSList : public VolteAllowedListInterface
+ struct ImsiParserCA : ImsiParser
{
- public:
- auto isVolteAllowed(const OperatorInfo &operatorInfo) -> bool final;
+ explicit ImsiParserCA()
+ : ImsiParser(std::vector<std::string>{
+ "302220", "302270", "302300", "302310", "302490", "302510", "302500", "302610", "302720", "302780"})
+ {}
};
} // namespace cellular::service
R module-services/service-cellular/src/volte/ImsiParserUS.hpp => module-services/service-cellular/src/volte/ImsiParser_Denmark.hpp +6 -5
@@ 1,15 1,16 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
-#include "ImsiParserInterface.hpp"
+#include "ImsiParser.hpp"
namespace cellular::service
{
- class ImsiParserUS : public ImsiParserInteface
+ struct ImsiParserDK : ImsiParser
{
- public:
- auto parse(const std::string &imsi) -> std::optional<OperatorInfo> final;
+ explicit ImsiParserDK()
+ : ImsiParser(std::vector<std::string>{"23801", "23802", "23806", "23820", "23866", "28801", "28802"})
+ {}
};
} // namespace cellular::service
R module-services/service-cellular/src/volte/OperatorInfo.hpp => module-services/service-cellular/src/volte/ImsiParser_Germany.hpp +6 -11
@@ 1,22 1,17 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
#pragma once
-#include <string>
+#include "ImsiParser.hpp"
namespace cellular::service
{
- struct OperatorInfo
+ struct ImsiParserDE : ImsiParser
{
- OperatorInfo(const std::string &mcc, const std::string &mnc) : MCC(mcc), MNC(mnc)
+ explicit ImsiParserDE()
+ : ImsiParser(std::vector<std::string>{
+ "26201", "26206", "26202", "26204", "26209", "26203", "26205", "26208", "26223"})
{}
- std::string MCC;
- std::string MNC;
-
- friend bool operator==(const OperatorInfo &lhs, const OperatorInfo &rhs)
- {
- return lhs.MCC == rhs.MCC && lhs.MNC == rhs.MNC;
- }
};
} // namespace cellular::service
A module-services/service-cellular/src/volte/ImsiParser_GreatBritain.hpp => module-services/service-cellular/src/volte/ImsiParser_GreatBritain.hpp +34 -0
@@ 0,0 1,34 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#pragma once
+
+#include "ImsiParser.hpp"
+
+namespace cellular::service
+{
+ struct ImsiParserGB : ImsiParser
+ {
+ explicit ImsiParserGB()
+ : ImsiParser(std::vector<std::string>{"23401",
+ "23410",
+ "23411",
+ "23403",
+ "23415",
+ "23420",
+ "23430",
+ "23433",
+ "23434",
+ "23450",
+ "23480",
+ "365010",
+ "348170",
+ "348770",
+ "34605",
+ "346001",
+ "346140",
+ "750001",
+ "26601"})
+ {}
+ };
+} // namespace cellular::service
A module-services/service-cellular/src/volte/ImsiParser_Netherlands.hpp => module-services/service-cellular/src/volte/ImsiParser_Netherlands.hpp +17 -0
@@ 0,0 1,17 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#pragma once
+
+#include "ImsiParser.hpp"
+
+namespace cellular::service
+{
+ struct ImsiParserNL : ImsiParser
+ {
+ explicit ImsiParserNL()
+ : ImsiParser(std::vector<std::string>{
+ "20402", "20404", "20406", "20407", "20408", "20410", "20416", "20420", "20433", "20418"})
+ {}
+ };
+} // namespace cellular::service
A module-services/service-cellular/src/volte/ImsiParser_Poland.hpp => module-services/service-cellular/src/volte/ImsiParser_Poland.hpp +32 -0
@@ 0,0 1,32 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#pragma once
+
+#include "ImsiParser.hpp"
+#include <vector>
+
+namespace cellular::service
+{
+ struct ImsiParserPL : ImsiParser
+ {
+ explicit ImsiParserPL()
+ : ImsiParser(std::vector<std::string>{"26001",
+ "26011",
+ "26002",
+ "26010",
+ "26034",
+ "26003",
+ "26015",
+ "26016",
+ "26017",
+ "26006",
+ "26045",
+ "26098",
+ "26008",
+ "26009",
+ "26012",
+ "26013"})
+ {}
+ };
+} // namespace cellular::service
A module-services/service-cellular/src/volte/ImsiParser_UnitedStates.hpp => module-services/service-cellular/src/volte/ImsiParser_UnitedStates.hpp +28 -0
@@ 0,0 1,28 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#pragma once
+
+#include "ImsiParser.hpp"
+#include <vector>
+
+namespace cellular::service
+{
+ struct ImsiParserUS : ImsiParser
+ {
+ explicit ImsiParserUS()
+ : ImsiParser(std::vector<std::string>{"310053",
+ "310120",
+ "310260",
+ "310530",
+ "310770",
+ "311490",
+ "311660",
+ "311880",
+ "311882",
+ "312190",
+ "312250",
+ "312530"})
+ {}
+ };
+} // namespace cellular::service
A module-services/service-cellular/src/volte/VolteAllowedList.cpp => module-services/service-cellular/src/volte/VolteAllowedList.cpp +52 -0
@@ 0,0 1,52 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#include "VolteAllowedList.hpp"
+#include "ImsiParser_Poland.hpp"
+#include "ImsiParser_UnitedStates.hpp"
+#include "ImsiParser_Netherlands.hpp"
+#include "ImsiParser_Germany.hpp"
+#include "ImsiParser_Denmark.hpp"
+#include "ImsiParser_GreatBritain.hpp"
+#include "ImsiParser_Canada.hpp"
+#include "ImsiParser_Austria.hpp"
+
+#include "module-utils/log/Logger.hpp"
+
+namespace
+{
+ template <typename Container, typename... Items>
+ void pushBack(Container &container, Items &&...items)
+ {
+ (container.push_back(std::forward<Items>(items)), ...);
+ }
+} // namespace
+
+namespace cellular::service
+{
+ auto VolteAllowedList::isVolteAllowed(const std::string &imsi) const -> bool
+ {
+ for (auto country : allowedList) {
+ if (country.isAllowed(imsi)) {
+ LOG_INFO("MCC supported, VoLTE allowed.");
+ return true;
+ }
+ }
+
+ LOG_ERROR("MCC not supported, VoLTE not allowed.");
+ return false;
+ }
+
+ void VolteAllowedList::buildList()
+ {
+ pushBack(allowedList,
+ ImsiParserPL(),
+ ImsiParserUS(),
+ ImsiParserDK(),
+ ImsiParserDE(),
+ ImsiParserNL(),
+ ImsiParserGB(),
+ ImsiParserCA(),
+ ImsiParserAT());
+ }
+} // namespace cellular::service
A module-services/service-cellular/src/volte/VolteAllowedList.hpp => module-services/service-cellular/src/volte/VolteAllowedList.hpp +24 -0
@@ 0,0 1,24 @@
+// Copyright (c) 2017-2023, Mudita Sp. z.o.o. All rights reserved.
+// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
+
+#include "VolteAllowedListInterface.hpp"
+#include "ImsiParser.hpp"
+#include <vector>
+
+namespace cellular::service
+{
+ class VolteAllowedList : public VolteAllowedListInterface
+ {
+ public:
+ VolteAllowedList()
+ {
+ buildList();
+ }
+
+ auto isVolteAllowed(const std::string &imsi) const -> bool final;
+
+ private:
+ void buildList();
+ std::vector<cellular::service::ImsiParser> allowedList;
+ };
+} // namespace cellular::service
M module-services/service-cellular/src/volte/VolteAllowedListInterface.hpp => module-services/service-cellular/src/volte/VolteAllowedListInterface.hpp +1 -2
@@ 3,7 3,6 @@
#pragma once
-#include "OperatorInfo.hpp"
#include <string>
namespace cellular::service
@@ 13,6 12,6 @@ namespace cellular::service
public:
virtual ~VolteAllowedListInterface() = default;
- auto virtual isVolteAllowed(const OperatorInfo &operatorInfo) -> bool = 0;
+ auto virtual isVolteAllowed(const std::string &imsi) const -> bool = 0;
};
} // namespace cellular::service
D module-services/service-cellular/src/volte/VolteAllowedUSList.cpp => module-services/service-cellular/src/volte/VolteAllowedUSList.cpp +0 -37
@@ 1,37 0,0 @@
-// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
-// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
-
-#include "VolteAllowedUSList.hpp"
-#include <log/log.hpp>
-#include <array>
-#include <algorithm>
-
-namespace cellular::service
-{
-
- constexpr auto allowedOperatorsCount = 12;
- const std::array<OperatorInfo, allowedOperatorsCount> allowedOperators{OperatorInfo{"310", "053"},
- OperatorInfo{"310", "120"},
- OperatorInfo{"310", "260"},
- OperatorInfo{"310", "530"},
- OperatorInfo{"310", "770"},
- OperatorInfo{"311", "490"},
- OperatorInfo{"311", "660"},
- OperatorInfo{"311", "880"},
- OperatorInfo{"311", "882"},
- OperatorInfo{"312", "190"},
- OperatorInfo{"312", "250"},
- OperatorInfo{"312", "530"}};
-
- auto VolteAllowedUSList::isVolteAllowed(const OperatorInfo &operatorInfo) -> bool
- {
- LOG_INFO("[VoLTE] trying to find MCC: %s, MNC: %s", operatorInfo.MCC.c_str(), operatorInfo.MNC.c_str());
-
- if (std::find(std::begin(allowedOperators), std::end(allowedOperators), operatorInfo) ==
- std::end(allowedOperators)) {
- LOG_ERROR("[VoLTE] unable to find MCC+MNC on list - VoLTE not allowed");
- return false;
- }
- return true;
- }
-} // namespace cellular::service
M module-services/service-cellular/src/volte/VolteCapabilityHandler.cpp => module-services/service-cellular/src/volte/VolteCapabilityHandler.cpp +3 -11
@@ 7,11 7,9 @@
namespace cellular::service
{
- VolteCapabilityHandler::VolteCapabilityHandler(std::unique_ptr<ImsiParserInteface> imsiParser,
- std::unique_ptr<VolteAllowedListInterface> allowedList,
+ VolteCapabilityHandler::VolteCapabilityHandler(std::unique_ptr<VolteAllowedListInterface> allowedList,
std::unique_ptr<VolteCapabilityCellularInterface> cellularInterface)
- : imsiParser(std::move(imsiParser)), allowedList(std::move(allowedList)),
- cellularInterface(std::move(cellularInterface))
+ : allowedList(std::move(allowedList)), cellularInterface(std::move(cellularInterface))
{}
auto VolteCapabilityHandler::isVolteAllowed(at::BaseChannel &channel) -> bool
@@ 22,12 20,6 @@ namespace cellular::service
return false;
}
- const auto operatorInfo = imsiParser->parse(imsi.value());
- if (not operatorInfo.has_value()) {
- LOG_ERROR("[VoLTE] failed to parse IMSI - VoLTE not permitted");
- return false;
- }
-
- return allowedList->isVolteAllowed(operatorInfo.value());
+ return allowedList->isVolteAllowed(imsi.value());
}
} // namespace cellular::service
M module-services/service-cellular/src/volte/VolteCapabilityHandler.hpp => module-services/service-cellular/src/volte/VolteCapabilityHandler.hpp +1 -4
@@ 4,7 4,6 @@
#pragma once
#include "VolteCapabiltyHandlerCellularInterface.hpp"
-#include "ImsiParserInterface.hpp"
#include "VolteAllowedListInterface.hpp"
#include <memory>
@@ 14,8 13,7 @@ namespace cellular::service
class VolteCapabilityHandler
{
public:
- VolteCapabilityHandler(std::unique_ptr<ImsiParserInteface> imsiParser,
- std::unique_ptr<VolteAllowedListInterface> allowedList,
+ VolteCapabilityHandler(std::unique_ptr<VolteAllowedListInterface> allowedList,
std::unique_ptr<VolteCapabilityCellularInterface> cellularInterface);
/** Check if it is a possibility to enable VoLTE on current operator
* @return true when VoLTE is allowed, false when not
@@ 23,7 21,6 @@ namespace cellular::service
auto isVolteAllowed(at::BaseChannel &channel) -> bool;
private:
- std::unique_ptr<ImsiParserInteface> imsiParser;
std::unique_ptr<VolteAllowedListInterface> allowedList;
std::unique_ptr<VolteCapabilityCellularInterface> cellularInterface;
};
M module-services/service-cellular/tests/unittest_volteCapabilityHandler.cpp => module-services/service-cellular/tests/unittest_volteCapabilityHandler.cpp +6 -87
@@ 4,8 4,7 @@
#include <catch2/catch.hpp>
#include <module-services/service-cellular/src/volte/VolteCapabilityHandler.hpp>
-#include <module-services/service-cellular/src/volte/ImsiParserUS.hpp>
-#include <module-services/service-cellular/src/volte/VolteAllowedUSList.hpp>
+#include <module-services/service-cellular/src/volte/VolteAllowedList.hpp>
#include <module-services/service-cellular/src/volte/VolteCapabiltyHandlerCellularInterface.hpp>
#include <module-cellular/modem/BaseChannel.hpp>
@@ 43,80 42,6 @@ TEST_CASE("VoLTE Capability handler")
static BaseChannelStub baseChannelStub;
- SECTION("ImsiParserUS success - US IMSI")
- {
- using namespace cellular::service;
-
- cellular::service::ImsiParserUS parser;
- std::string imsi("3111231234567890");
-
- auto result = parser.parse(imsi);
-
- REQUIRE(result.has_value() == true);
- REQUIRE(result.value().MCC == "311");
- REQUIRE(result.value().MNC == "123");
- }
-
- SECTION("ImsiParserUS failure - non US IMSI")
- {
- using namespace cellular::service;
-
- cellular::service::ImsiParserUS parser;
- std::string imsi("2601231234567890");
-
- auto result = parser.parse(imsi);
-
- REQUIRE(result.has_value() == false);
- }
-
- SECTION("ImsiParserUS failure -too short IMSI")
- {
- using namespace cellular::service;
-
- cellular::service::ImsiParserUS parser;
- std::string imsi("2601");
-
- auto result = parser.parse(imsi);
-
- REQUIRE(result.has_value() == false);
- }
-
- SECTION("VolteAllowedUSList success - TMobileUS IMSI")
- {
- using namespace cellular::service;
-
- VolteAllowedUSList list;
- OperatorInfo operatorInfo{"310", "120"};
-
- auto result = list.isVolteAllowed(operatorInfo);
-
- REQUIRE(result == true);
- }
-
- SECTION("VolteAllowedUSList failure - non TMobileUS MCC")
- {
- using namespace cellular::service;
-
- VolteAllowedUSList list;
- OperatorInfo operatorInfo{"210", "120"};
-
- auto result = list.isVolteAllowed(operatorInfo);
-
- REQUIRE(result == false);
- }
-
- SECTION("VolteAllowedUSList failure - non TMobileUS MNC")
- {
- using namespace cellular::service;
-
- VolteAllowedUSList list;
- OperatorInfo operatorInfo{"310", "999"};
-
- auto result = list.isVolteAllowed(operatorInfo);
-
- REQUIRE(result == false);
- }
-
class MockTMobileUS : public cellular::service::VolteCapabilityCellularInterface
{
auto getImsi(at::BaseChannel &) -> std::optional<std::string> override
@@ 128,14 53,12 @@ TEST_CASE("VoLTE Capability handler")
SECTION("VolteCapabilityHandler succes = TMobileUS")
{
using namespace cellular::service;
- VolteCapabilityHandler handler{std::make_unique<ImsiParserUS>(),
- std::make_unique<VolteAllowedUSList>(),
- std::make_unique<MockTMobileUS>()};
+ VolteCapabilityHandler handler{std::make_unique<VolteAllowedList>(), std::make_unique<MockTMobileUS>()};
auto result = handler.isVolteAllowed(baseChannelStub);
REQUIRE(result == true);
}
- class MockNonTMobileUS : public cellular::service::VolteCapabilityCellularInterface
+ class MockNotAllowedIMSI : public cellular::service::VolteCapabilityCellularInterface
{
auto getImsi(at::BaseChannel &) -> std::optional<std::string>
{
@@ 143,12 66,10 @@ TEST_CASE("VoLTE Capability handler")
}
};
- SECTION("VolteCapabilityHandler failure = non TMobileUS")
+ SECTION("VolteCapabilityHandler failure = not allowed IMSI")
{
using namespace cellular::service;
- VolteCapabilityHandler handler{std::make_unique<ImsiParserUS>(),
- std::make_unique<VolteAllowedUSList>(),
- std::make_unique<MockNonTMobileUS>()};
+ VolteCapabilityHandler handler{std::make_unique<VolteAllowedList>(), std::make_unique<MockNotAllowedIMSI>()};
auto result = handler.isVolteAllowed(baseChannelStub);
REQUIRE(result == false);
}
@@ 164,9 85,7 @@ TEST_CASE("VoLTE Capability handler")
SECTION("VolteCapabilityHandler failure = failed to get imsi")
{
using namespace cellular::service;
- VolteCapabilityHandler handler{std::make_unique<ImsiParserUS>(),
- std::make_unique<VolteAllowedUSList>(),
- std::make_unique<MockFailedToGetImsi>()};
+ VolteCapabilityHandler handler{std::make_unique<VolteAllowedList>(), std::make_unique<MockFailedToGetImsi>()};
auto result = handler.isVolteAllowed(baseChannelStub);
REQUIRE(result == false);
}
M pure_changelog.md => pure_changelog.md +1 -0
@@ 5,6 5,7 @@
### Added
* Added input mode selection display timeout
* Added MMI/USSD code confirmation
+* Added VoLTE support in Poland, Germany, Denmark, United Kingdom, Netherlands, Canada and Austria
### Changed / Improved