skyline/app/src/main/cpp/skyline/services/settings/ISettingsServer.h
PixelyIon fe5061a8e0 Address CR Comments (#132) + Change Core Migration API
This addresses all CR comments including more codebase-wide changes arising from certain review comments like proper usage of its/it's and consistent contraction of it is into it's. 

An overhaul was made to the presentation and formatting of `KThread.h` and `LoadBalance` works has been superseded by `GetOptimalCoreForThread` which can be used alongside `InsertThread` or `MigrateToCore`. It makes the API far more atomic and neater. This was a major point of contention for the design prior, it's simplified some code and potentially improved performance.
2021-03-05 14:55:34 +05:30

46 lines
1.8 KiB
C++

// SPDX-License-Identifier: MPL-2.0
// Copyright © 2020 Skyline Team and Contributors (https://github.com/skyline-emu/)
#pragma once
#include <services/serviceman.h>
namespace skyline::service {
namespace constant {
constexpr size_t OldLanguageCodeListSize{15}; //!< The size of the pre 4.0.0 language code list
constexpr size_t NewLanguageCodeListSize{17}; //!< The size of the post 4.0.0 language code list
}
namespace settings {
/**
* @brief ISettingsServer or 'set' provides access to user settings
* @url https://switchbrew.org/wiki/Settings_services#set
*/
class ISettingsServer : public BaseService {
public:
ISettingsServer(const DeviceState &state, ServiceManager &manager);
/**
* @brief Reads the available language codes that an application can use (pre 4.0.0)
*/
Result GetAvailableLanguageCodes(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Converts a language code list index to its corresponding language code
*/
Result MakeLanguageCode(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
/**
* @brief Reads the available language codes that an application can use (post 4.0.0)
*/
Result GetAvailableLanguageCodes2(type::KSession &session, ipc::IpcRequest &request, ipc::IpcResponse &response);
SERVICE_DECL(
SFUNC(0x1, ISettingsServer, GetAvailableLanguageCodes),
SFUNC(0x2, ISettingsServer, MakeLanguageCode),
SFUNC(0x5, ISettingsServer, GetAvailableLanguageCodes2)
)
};
}
}