diff options
author | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-12-08 15:10:31 +0100 |
---|---|---|
committer | Morph <39850852+Morph1984@users.noreply.github.com> | 2020-12-08 19:39:07 +0100 |
commit | 009bdb3558a1b4c0b08d532b61fc2b34076cc824 (patch) | |
tree | f7173e7d8d6fa578f3cb4349f25583f0c6b6dc2e | |
parent | Merge pull request #5156 from comex/xx-raws (diff) | |
download | yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar.gz yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar.bz2 yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar.lz yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar.xz yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.tar.zst yuzu-009bdb3558a1b4c0b08d532b61fc2b34076cc824.zip |
-rw-r--r-- | src/core/hle/service/aoc/aoc_u.cpp | 38 | ||||
-rw-r--r-- | src/core/hle/service/aoc/aoc_u.h | 2 |
2 files changed, 38 insertions, 2 deletions
diff --git a/src/core/hle/service/aoc/aoc_u.cpp b/src/core/hle/service/aoc/aoc_u.cpp index 6abac3f78..4e668d062 100644 --- a/src/core/hle/service/aoc/aoc_u.cpp +++ b/src/core/hle/service/aoc/aoc_u.cpp @@ -48,6 +48,24 @@ static std::vector<u64> AccumulateAOCTitleIDs(Core::System& system) { return add_on_content; } +class IPurchaseEventManager final : public ServiceFramework<IPurchaseEventManager> { +public: + explicit IPurchaseEventManager(Core::System& system_) + : ServiceFramework{system_, "IPurchaseEventManager"} { + // clang-format off + static const FunctionInfo functions[] = { + {0, nullptr, "SetDefaultDeliveryTarget"}, + {1, nullptr, "SetDeliveryTarget"}, + {2, nullptr, "GetPurchasedEventReadableHandle"}, + {3, nullptr, "PopPurchasedProductInfo"}, + {4, nullptr, "PopPurchasedProductInfoWithUid"}, + }; + // clang-format on + + RegisterHandlers(functions); + } +}; + AOC_U::AOC_U(Core::System& system_) : ServiceFramework{system_, "aoc:u"}, add_on_content{AccumulateAOCTitleIDs(system)} { // clang-format off @@ -62,8 +80,8 @@ AOC_U::AOC_U(Core::System& system_) {7, &AOC_U::PrepareAddOnContent, "PrepareAddOnContent"}, {8, &AOC_U::GetAddOnContentListChangedEvent, "GetAddOnContentListChangedEvent"}, {9, nullptr, "GetAddOnContentLostErrorCode"}, - {100, nullptr, "CreateEcPurchasedEventManager"}, - {101, nullptr, "CreatePermanentEcPurchasedEventManager"}, + {100, &AOC_U::CreateEcPurchasedEventManager, "CreateEcPurchasedEventManager"}, + {101, &AOC_U::CreatePermanentEcPurchasedEventManager, "CreatePermanentEcPurchasedEventManager"}, }; // clang-format on @@ -201,6 +219,22 @@ void AOC_U::GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx) { rb.PushCopyObjects(aoc_change_event.readable); } +void AOC_U::CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_AOC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface<IPurchaseEventManager>(system); +} + +void AOC_U::CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx) { + LOG_WARNING(Service_AOC, "(STUBBED) called"); + + IPC::ResponseBuilder rb{ctx, 2, 0, 1}; + rb.Push(RESULT_SUCCESS); + rb.PushIpcInterface<IPurchaseEventManager>(system); +} + void InstallInterfaces(SM::ServiceManager& service_manager, Core::System& system) { std::make_shared<AOC_U>(system)->InstallAsService(service_manager); } diff --git a/src/core/hle/service/aoc/aoc_u.h b/src/core/hle/service/aoc/aoc_u.h index 7628f4568..26ee51be0 100644 --- a/src/core/hle/service/aoc/aoc_u.h +++ b/src/core/hle/service/aoc/aoc_u.h @@ -27,6 +27,8 @@ private: void GetAddOnContentBaseId(Kernel::HLERequestContext& ctx); void PrepareAddOnContent(Kernel::HLERequestContext& ctx); void GetAddOnContentListChangedEvent(Kernel::HLERequestContext& ctx); + void CreateEcPurchasedEventManager(Kernel::HLERequestContext& ctx); + void CreatePermanentEcPurchasedEventManager(Kernel::HLERequestContext& ctx); std::vector<u64> add_on_content; Kernel::EventPair aoc_change_event; |