Skip to content

Commit

Permalink
stub
Browse files Browse the repository at this point in the history
  • Loading branch information
YGOmod committed Jun 27, 2024
1 parent 9b7d754 commit ad4a871
Show file tree
Hide file tree
Showing 7 changed files with 53 additions and 17 deletions.
9 changes: 1 addition & 8 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,9 @@ jobs:
mv app/build/outputs/apk/mainline/release/app-mainline-release.apk ${{ github.workspace }}/suyu-android-mainline-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
ccache -sv
- name: Release Suyu Android (Suyu-Android)
uses: softprops/action-gh-release@v2
with:
name: Suyu Android ${{ steps.version.outputs.date }}
tag_name: suyu-android
files: ${{ github.workspace }}/suyu-android-mainline-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk

- name: Release Suyu Android ${{ steps.version.outputs.date }}
uses: softprops/action-gh-release@v2
with:
name: ${{ steps.version.outputs.date }}
tag_name: ${{ steps.version.outputs.date }}
files: ${{ github.workspace }}/suyu-android-mainline-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
files: ${{ github.workspace }}/suyu-android-mainline-${{ steps.version.outputs.date }}-${{ steps.version.outputs.version }}.apk
28 changes: 23 additions & 5 deletions src/core/hle/service/bcat/news/news_service.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ namespace Service::News {
INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "INewsService"} {
// clang-format off
static const FunctionInfo functions[] = {
{10100, nullptr, "PostLocalNews"},
{20100, nullptr, "SetPassphrase"},
{10100, D<&INewsService::PostLocalNews>, "PostLocalNews"},
{20100, D<&INewsService::SetPassphrase>, "SetPassphrase"},
{30100, D<&INewsService::GetSubscriptionStatus>, "GetSubscriptionStatus"},
{30101, nullptr, "GetTopicList"},,
{30200, D<&INewsService::IsSystemUpdateRequired>, "IsSystemUpdateRequired"},
{30300, nullptr, "RequestImmediateReception"},
{30400, nullptr, "DecodeArchiveFile"},
{40100, nullptr, "SetSubscriptionStatus"},
{40100, D<&INewsService::SetSubscriptionStatus>, "SetSubscriptionStatus"},
{40101, D<&INewsService::RequestAutoSubscription>, "RequestAutoSubscription"},
{40200, nullptr, "ClearStorage"},
{40201, nullptr, "ClearSubscriptionStatusAll"},
{40201, D<&INewsService::ClearSubscriptionStatusAll>, "ClearSubscriptionStatusAll"},
{90100, nullptr, "GetNewsDatabaseDump"},
};
// clang-format on
Expand All @@ -29,6 +29,16 @@ INewsService::INewsService(Core::System& system_) : ServiceFramework{system_, "I

INewsService::~INewsService() = default;

Result INewsService::PostLocalNews() {
LOG_WARNING(Service_BCAT, "(STUBBED) called.");
R_SUCCEED();
}

Result INewsService::SetPassphrase() {
LOG_WARNING(Service_BCAT, "(STUBBED) called.");
R_SUCCEED();
}

Result INewsService::GetSubscriptionStatus(Out<u32> out_status,
InBuffer<BufferAttr_HipcPointer> buffer_data) {
LOG_WARNING(Service_BCAT, "(STUBBED) called, buffer_size={}", buffer_data.size());
Expand All @@ -41,10 +51,18 @@ Result INewsService::IsSystemUpdateRequired(Out<bool> out_is_system_update_requi
*out_is_system_update_required = false;
R_SUCCEED();
}

Result INewsService::SetSubscriptionStaus() {
LOG_WARNING(Service_BCAT, "(STUBBED) called.");
R_SUCCEED();
}
Result INewsService::RequestAutoSubscription(u64 value) {
LOG_WARNING(Service_BCAT, "(STUBBED) called");
R_SUCCEED();
}

Result INewsService::ClearSubscriptionStatusAll() {
LOG_WARNING(Service_BCAT, "(STUBBED) called.");
R_SUCCEED();
}

} // namespace Service::News
8 changes: 8 additions & 0 deletions src/core/hle/service/bcat/news/news_service.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ class INewsService final : public ServiceFramework<INewsService> {
~INewsService() override;

private:
Result PostLocalNews();

Result SetPassphrase();

Result GetSubscriptionStatus(Out<u32> out_status, InBuffer<BufferAttr_HipcPointer> buffer_data);

Result IsSystemUpdateRequired(Out<bool> out_is_system_update_required);

Result SetSubscriptionStatus();

Result RequestAutoSubscription(u64 value);

Result ClearSubscriptionStatusAll();
};

} // namespace Service::News
9 changes: 8 additions & 1 deletion src/core/hle/service/nifm/nifm.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -360,6 +360,13 @@ void IGeneralService::CreateRequest(HLERequestContext& ctx) {
rb.PushIpcInterface<IRequest>(system);
}

void IGeneralService::EnumerateNetworkInterfaces(HLERequestContext& ctx) {
LOG_WARNING(Service_NIFM, "called");

IPC::ResponseBuilder rb{ctx, 3};
rb.Push(ResultSuccess);
rb.Push<u8>(1); //needs at least one interface
}
void IGeneralService::GetCurrentNetworkProfile(HLERequestContext& ctx) {
LOG_WARNING(Service_NIFM, "(STUBBED) called");

Expand Down Expand Up @@ -573,7 +580,7 @@ IGeneralService::IGeneralService(Core::System& system_)
{2, &IGeneralService::CreateScanRequest, "CreateScanRequest"},
{4, &IGeneralService::CreateRequest, "CreateRequest"},
{5, &IGeneralService::GetCurrentNetworkProfile, "GetCurrentNetworkProfile"},
{6, nullptr, "EnumerateNetworkInterfaces"},
{6, &IGeneralService::EnumerateNetworkInterfaces, "EnumerateNetworkInterfaces"},
{7, nullptr, "EnumerateNetworkProfiles"},
{8, nullptr, "GetNetworkProfile"},
{9, nullptr, "SetNetworkProfile"},
Expand Down
1 change: 1 addition & 0 deletions src/core/hle/service/nifm/nifm.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class IGeneralService final : public ServiceFramework<IGeneralService> {
void GetClientId(HLERequestContext& ctx);
void CreateScanRequest(HLERequestContext& ctx);
void CreateRequest(HLERequestContext& ctx);
void EnumerateNetworkInterfaces(HLERequestContext& ctx);
void GetCurrentNetworkProfile(HLERequestContext& ctx);
void RemoveNetworkProfile(HLERequestContext& ctx);
void GetCurrentIpAddress(HLERequestContext& ctx);
Expand Down
3 changes: 1 addition & 2 deletions src/core/hle/service/nim/nim.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,8 +307,7 @@ class IEnsureNetworkClockAvailabilityService final
service_context{system_, "IEnsureNetworkClockAvailabilityService"} {
static const FunctionInfo functions[] = {
{0, &IEnsureNetworkClockAvailabilityService::StartTask, "StartTask"},
{1, &IEnsureNetworkClockAvailabilityService::GetFinishNotificationEvent,
"GetFinishNotificationEvent"},
{1, &IEnsureNetworkClockAvailabilityService::GetFinishNotificationEvent, "GetFinishNotificationEvent"},
{2, &IEnsureNetworkClockAvailabilityService::GetResult, "GetResult"},
{3, &IEnsureNetworkClockAvailabilityService::Cancel, "Cancel"},
{4, &IEnsureNetworkClockAvailabilityService::IsProcessing, "IsProcessing"},
Expand Down
12 changes: 11 additions & 1 deletion src/core/hle/service/npns/npns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class INpnsSystem final : public ServiceFramework<INpnsSystem> {
{4, nullptr, "ReceiveRaw"},
{5, C<&INpnsSystem::GetReceiveEvent>, "GetReceiveEvent"},
{6, nullptr, "ListenUndelivered"},
{7, nullptr, "GetStateChangeEvent"},
{7, C<&INpnsSystem::GetStateChangeEvent>, "GetStateChangeEvent"},
{8, nullptr, "ListenToByName"}, // 18.0.0+
{11, nullptr, "SubscribeTopic"},
{12, nullptr, "UnsubscribeTopic"},
Expand Down Expand Up @@ -90,10 +90,12 @@ class INpnsSystem final : public ServiceFramework<INpnsSystem> {
RegisterHandlers(functions);

get_receive_event = service_context.CreateEvent("npns:s:GetReceiveEvent");
get_state_change_event = service_context.CreateEvent("npns:s:GetStateChangeEvent");
}

~INpnsSystem() override {
service_context.CloseEvent(get_receive_event);
service_context.CloseEvent(get_state_change_event);
}

private:
Expand All @@ -108,9 +110,17 @@ class INpnsSystem final : public ServiceFramework<INpnsSystem> {
*out_event = &get_receive_event->GetReadableEvent();
R_SUCCEED();
}

Result GetStateChangeEvent(OutCopyHandle<Kernel::KReadableEvent> out_event) {
LOG_WARNING(Service_AM, "(STUBBED) called");

*out_event = &get_stage_change_event->GetReadableEvent();
R_SUCCEED();
}

KernelHelpers::ServiceContext service_context;
Kernel::KEvent* get_receive_event;
Kernel::KEvent* get_state_change_event;
};

class INpnsUser final : public ServiceFramework<INpnsUser> {
Expand Down

0 comments on commit ad4a871

Please sign in to comment.