summaryrefslogtreecommitdiffstats
path: root/src/core/hle/service/bcat
diff options
context:
space:
mode:
authorZach Hilman <zachhilman@gmail.com>2019-04-29 01:00:36 +0200
committerZach Hilman <zachhilman@gmail.com>2019-09-30 23:23:26 +0200
commit102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c (patch)
treea8d974d37843f274cca1284a114b23b59edf669a /src/core/hle/service/bcat
parentbcat: Implement cmd 30100 SetPassphrase (diff)
downloadyuzu-102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c.tar
yuzu-102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c.tar.gz
yuzu-102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c.tar.bz2
yuzu-102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c.tar.lz
yuzu-102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c.tar.xz
yuzu-102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c.tar.zst
yuzu-102db206e0cf8c0332e6ec0c2c6f4fa8c7d4f05c.zip
Diffstat (limited to 'src/core/hle/service/bcat')
-rw-r--r--src/core/hle/service/bcat/module.cpp24
1 files changed, 23 insertions, 1 deletions
diff --git a/src/core/hle/service/bcat/module.cpp b/src/core/hle/service/bcat/module.cpp
index cbda8e0d3..9244c265a 100644
--- a/src/core/hle/service/bcat/module.cpp
+++ b/src/core/hle/service/bcat/module.cpp
@@ -157,7 +157,7 @@ public:
{30203, nullptr, "UnblockDeliveryTask"},
{90100, nullptr, "EnumerateBackgroundDeliveryTask"},
{90200, nullptr, "GetDeliveryList"},
- {90201, nullptr, "ClearDeliveryCacheStorage"},
+ {90201, &IBcatService::ClearDeliveryCacheStorage, "ClearDeliveryCacheStorage"},
{90300, nullptr, "GetPushNotificationLog"},
};
// clang-format on
@@ -252,6 +252,28 @@ private:
rb.Push(RESULT_SUCCESS);
}
+ void ClearDeliveryCacheStorage(Kernel::HLERequestContext& ctx) {
+ IPC::RequestParser rp{ctx};
+ const auto title_id = rp.PopRaw<u64>();
+
+ LOG_DEBUG(Service_BCAT, "called, title_id={:016X}", title_id);
+
+ if (title_id == 0) {
+ LOG_ERROR(Service_BCAT, "Invalid title ID!");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ERROR_INVALID_ARGUMENT);
+ return;
+ }
+
+ if (!backend.Clear(title_id)) {
+ LOG_ERROR(Service_BCAT, "Could not clear the directory successfully!");
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(ERROR_FAILED_CLEAR_CACHE);
+ return;
+ }
+
+ IPC::ResponseBuilder rb{ctx, 2};
+ rb.Push(RESULT_SUCCESS);
}
Backend& backend;