Merge pull request #12991 from german77/news2

service: news: Stub remaining functions
This commit is contained in:
liamwhite 2024-02-11 21:44:23 -05:00 committed by GitHub
commit b6b56f48b7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 54 additions and 13 deletions

View file

@ -12,7 +12,7 @@ INewlyArrivedEventHolder::INewlyArrivedEventHolder(Core::System& system_)
"INewlyArrivedEventHolder"} { "INewlyArrivedEventHolder"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, C<&INewlyArrivedEventHolder::Get>, "Get"}, {0, D<&INewlyArrivedEventHolder::Get>, "Get"},
}; };
// clang-format on // clang-format on

View file

@ -11,12 +11,12 @@ INewsDatabaseService::INewsDatabaseService(Core::System& system_)
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, nullptr, "GetListV1"}, {0, nullptr, "GetListV1"},
{1, C<&INewsDatabaseService::Count>, "Count"}, {1, D<&INewsDatabaseService::Count>, "Count"},
{2, nullptr, "CountWithKey"}, {2, nullptr, "CountWithKey"},
{3, nullptr, "UpdateIntegerValue"}, {3, nullptr, "UpdateIntegerValue"},
{4, nullptr, "UpdateIntegerValueWithAddition"}, {4, D<&INewsDatabaseService::UpdateIntegerValueWithAddition>, "UpdateIntegerValueWithAddition"},
{5, nullptr, "UpdateStringValue"}, {5, nullptr, "UpdateStringValue"},
{1000, nullptr, "GetList"}, {1000, D<&INewsDatabaseService::GetList>, "GetList"},
}; };
// clang-format on // clang-format on
@ -32,4 +32,22 @@ Result INewsDatabaseService::Count(Out<s32> out_count,
R_SUCCEED(); R_SUCCEED();
} }
Result INewsDatabaseService::UpdateIntegerValueWithAddition(
u32 value, InBuffer<BufferAttr_HipcPointer> buffer_data_1,
InBuffer<BufferAttr_HipcPointer> buffer_data_2) {
LOG_WARNING(Service_BCAT, "(STUBBED) called, value={}, buffer_size_1={}, buffer_data_2={}",
value, buffer_data_1.size(), buffer_data_2.size());
R_SUCCEED();
}
Result INewsDatabaseService::GetList(Out<s32> out_count, u32 value,
OutBuffer<BufferAttr_HipcMapAlias> out_buffer_data,
InBuffer<BufferAttr_HipcPointer> buffer_data_1,
InBuffer<BufferAttr_HipcPointer> buffer_data_2) {
LOG_WARNING(Service_BCAT, "(STUBBED) called, value={}, buffer_size_1={}, buffer_data_2={}",
value, buffer_data_1.size(), buffer_data_2.size());
*out_count = 0;
R_SUCCEED();
}
} // namespace Service::News } // namespace Service::News

View file

@ -19,6 +19,14 @@ public:
private: private:
Result Count(Out<s32> out_count, InBuffer<BufferAttr_HipcPointer> buffer_data); Result Count(Out<s32> out_count, InBuffer<BufferAttr_HipcPointer> buffer_data);
Result UpdateIntegerValueWithAddition(u32 value, InBuffer<BufferAttr_HipcPointer> buffer_data_1,
InBuffer<BufferAttr_HipcPointer> buffer_data_2);
Result GetList(Out<s32> out_count, u32 value,
OutBuffer<BufferAttr_HipcMapAlias> out_buffer_data,
InBuffer<BufferAttr_HipcPointer> buffer_data_1,
InBuffer<BufferAttr_HipcPointer> buffer_data_2);
}; };
} // namespace Service::News } // namespace Service::News

View file

@ -11,10 +11,10 @@ INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "I
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{10100, nullptr, "PostLocalNews"}, {10100, nullptr, "PostLocalNews"},
{20100, nullptr, "SetPassphrase"}, {20100, nullptr, "SetPassphrase"},
{30100, C<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"}, {30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"},
{30101, nullptr, "GetTopicList"}, {30101, nullptr, "GetTopicList"},
{30110, nullptr, "Unknown30110"}, {30110, nullptr, "Unknown30110"},
{30200, nullptr, "IsSystemUpdateRequired"}, {30200, D<&INewsService::IsSystemUpdateRequired>, "IsSystemUpdateRequired"},
{30201, nullptr, "Unknown30201"}, {30201, nullptr, "Unknown30201"},
{30210, nullptr, "Unknown30210"}, {30210, nullptr, "Unknown30210"},
{30300, nullptr, "RequestImmediateReception"}, {30300, nullptr, "RequestImmediateReception"},
@ -24,7 +24,7 @@ INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "I
{30901, nullptr, "Unknown30901"}, {30901, nullptr, "Unknown30901"},
{30902, nullptr, "Unknown30902"}, {30902, nullptr, "Unknown30902"},
{40100, nullptr, "SetSubscriptionStatus"}, {40100, nullptr, "SetSubscriptionStatus"},
{40101, nullptr, "RequestAutoSubscription"}, {40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"},
{40200, nullptr, "ClearStorage"}, {40200, nullptr, "ClearStorage"},
{40201, nullptr, "ClearSubscriptionStatusAll"}, {40201, nullptr, "ClearSubscriptionStatusAll"},
{90100, nullptr, "GetNewsDatabaseDump"}, {90100, nullptr, "GetNewsDatabaseDump"},
@ -43,4 +43,15 @@ Result INewsService::GetSubscriptionStatus(Out<u32> out_status,
R_SUCCEED(); R_SUCCEED();
} }
Result INewsService::IsSystemUpdateRequired(Out<bool> out_is_system_update_required) {
LOG_WARNING(Service_BCAT, "(STUBBED) called");
*out_is_system_update_required = false;
R_SUCCEED();
}
Result INewsService::RequestAutoSubscription(u64 value) {
LOG_WARNING(Service_BCAT, "(STUBBED) called");
R_SUCCEED();
}
} // namespace Service::News } // namespace Service::News

View file

@ -19,6 +19,10 @@ public:
private: private:
Result GetSubscriptionStatus(Out<u32> out_status, InBuffer<BufferAttr_HipcPointer> buffer_data); Result GetSubscriptionStatus(Out<u32> out_status, InBuffer<BufferAttr_HipcPointer> buffer_data);
Result IsSystemUpdateRequired(Out<bool> out_is_system_update_required);
Result RequestAutoSubscription(u64 value);
}; };
} // namespace Service::News } // namespace Service::News

View file

@ -11,7 +11,7 @@ IOverwriteEventHolder::IOverwriteEventHolder(Core::System& system_)
"IOverwriteEventHolder"} { "IOverwriteEventHolder"} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, C<&IOverwriteEventHolder::Get>, "Get"}, {0, D<&IOverwriteEventHolder::Get>, "Get"},
}; };
// clang-format on // clang-format on

View file

@ -15,11 +15,11 @@ IServiceCreator::IServiceCreator(Core::System& system_, u32 permissions_, const
: ServiceFramework{system_, name_}, permissions{permissions_} { : ServiceFramework{system_, name_}, permissions{permissions_} {
// clang-format off // clang-format off
static const FunctionInfo functions[] = { static const FunctionInfo functions[] = {
{0, C<&IServiceCreator::CreateNewsService>, "CreateNewsService"}, {0, D<&IServiceCreator::CreateNewsService>, "CreateNewsService"},
{1, C<&IServiceCreator::CreateNewlyArrivedEventHolder>, "CreateNewlyArrivedEventHolder"}, {1, D<&IServiceCreator::CreateNewlyArrivedEventHolder>, "CreateNewlyArrivedEventHolder"},
{2, C<&IServiceCreator::CreateNewsDataService>, "CreateNewsDataService"}, {2, D<&IServiceCreator::CreateNewsDataService>, "CreateNewsDataService"},
{3, C<&IServiceCreator::CreateNewsDatabaseService>, "CreateNewsDatabaseService"}, {3, D<&IServiceCreator::CreateNewsDatabaseService>, "CreateNewsDatabaseService"},
{4, C<&IServiceCreator::CreateOverwriteEventHolder>, "CreateOverwriteEventHolder"}, {4, D<&IServiceCreator::CreateOverwriteEventHolder>, "CreateOverwriteEventHolder"},
}; };
// clang-format on // clang-format on