/*---------------------------------------------------------------------------* Copyright 2010-2014 Nintendo. All rights reserved. These coded instructions, statements, and computer programs contain proprietary information of Nintendo of America Inc. and/or Nintendo Company Ltd., and are protected by Federal copyright law. They may not be disclosed to third parties or copied or duplicated in any form, in whole or in part, without the prior written consent of Nintendo. *---------------------------------------------------------------------------*/ // sciPublicApi.h // // Interface #ifndef _CAFE_SCI_PUBLIC_API_H_ #define _CAFE_SCI_PUBLIC_API_H_ #ifdef __cplusplus extern "C" { #endif // __cplusplus // ------------------------- // // For Console Information // // ------------------------- /// \brief Get Platform Region (Product Area) of console /// /// \param region Pointer to get platform region /// \return status /// \retval SCI_STATUS_SUCCESS Success. /// \retval SCI_STATUS_FAIL Failed to get the region bit. /// \retval SCI_STATUS_READ_ERROR Error reading system product information. /// SCIStatus SCIGetPlatformRegion(SCIPlatformRegion *region); // ------------------------- // // For Cafe Config Setting // // ------------------------- /// \brief Get Current Cafe Language ID from System Config Setting /// /// \param language Pointer to get language id /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// SCIStatus SCIGetCafeLanguage(SCICafeLanguage *language); /// \brief Get Current Cafe Country ID from System Config Setting /// /// \param country Pointer to get country id /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system config file. /// \retval SCI_STATUS_FILE_NOT_FOUND System config file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system config file. /// SCIStatus SCIGetCafeCountry(u32 *country); /// \brief Get Language Code as String /// /// \param language Langhage id /// \return Language Code String /// const char* SCIGetLanguageCodeA2(SCICafeLanguage language); /// \brief Get Country Code as String /// /// \param country Country id /// \return Country Code String /// const char* SCIGetCountryCodeA2(u32 country); #ifdef __ghs__ /// \brief Get Country Name as utf-8 String /// /// \param name Buffer to get country name /// \param size Size of buffer. Should be over SCI_CAFE_COUNTRY_NAME_SIZE_MAX. /// \param country Country id /// \param type Language type for string /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get string. /// \retval SCI_STATUS_INVALID_SIZE Invalid buffer size. /// \retval SCI_STATUS_INVALID_PARAM Invalid input parameter. /// \retval SCI_STATUS_READ_ERROR Error reading database file. /// \retval SCI_STATUS_FILE_NOT_FOUND Database file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in database. /// SCIStatus SCIGetCountryName(char *name, u32 size, u32 country, SCICafeLanguage type); /// \brief Get Country Name as utf-16 String /// /// \param name Buffer to get country name /// \param size Size of buffer. Should be over SCI_CAFE_COUNTRY_NAME_SIZE_MAX. /// \param country Country id /// \param type Language type for string /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get string. /// \retval SCI_STATUS_INVALID_SIZE Invalid buffer size. /// \retval SCI_STATUS_INVALID_PARAM Invalid input parameter. /// \retval SCI_STATUS_READ_ERROR Error reading database file. /// \retval SCI_STATUS_FILE_NOT_FOUND Database file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in database. /// SCIStatus SCIGetCountryNameUtf16(wchar_t *name, u32 size, u32 country, SCICafeLanguage type); /// \brief Get Country Name List as utf-8 String /// /// \param countryNameList Buffer to get country name /// \param type Language type for string /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get string. /// \retval SCI_STATUS_INVALID_SIZE Invalid buffer size. /// \retval SCI_STATUS_INVALID_PARAM Invalid input parameter. /// \retval SCI_STATUS_READ_ERROR Error reading database file. /// \retval SCI_STATUS_FILE_NOT_FOUND Database file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in database. /// SCIStatus SCIGetCountryNameList(char countryNameList[SCI_CAFE_COUNTRY_MAX][SCI_CAFE_COUNTRY_NAME_SIZE_MAX], SCICafeLanguage type); /// \brief Get Country Name List as utf-8 String /// /// \param countryNameList Buffer to get country name /// \param type Language type for string /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_INVALID_PARAM Invalid input parameter. /// \retval SCI_STATUS_READ_ERROR Error reading database file. /// \retval SCI_STATUS_FILE_NOT_FOUND Database file is not found. /// SCIStatus SCIGetCountryNameListUtf16(wchar_t countryNameList[SCI_CAFE_COUNTRY_MAX][SCI_CAFE_COUNTRY_NAME_SIZE_MAX], SCICafeLanguage type); /// \brief Get Area Info with Name as utf-8 String /// /// \param areaInfo Buffer to get SCICafeAreaInfo /// \param simpleAddressId Simple Address ID /// \param type Language type for string /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get string. /// \retval SCI_STATUS_INVALID_SIZE Invalid buffer size. /// \retval SCI_STATUS_INVALID_PARAM Invalid input parameter. /// \retval SCI_STATUS_READ_ERROR Error reading database file. /// \retval SCI_STATUS_FILE_NOT_FOUND Database file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in database. /// SCIStatus SCIGetAreaInfo(SCICafeAreaInfo *areaInfo, u32 simpleAddressId, SCICafeLanguage type); /// \brief Get Area Info with Name as utf-16 String /// /// \param areaInfo Buffer to get SCICafeAreaInfoUtf16 /// \param simpleAddressId Simple Address ID /// \param type Language type for string /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get string. /// \retval SCI_STATUS_INVALID_SIZE Invalid buffer size. /// \retval SCI_STATUS_INVALID_PARAM Invalid input parameter. /// \retval SCI_STATUS_READ_ERROR Error reading database file. /// \retval SCI_STATUS_FILE_NOT_FOUND Database file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in database. /// SCIStatus SCIGetAreaInfoUtf16(SCICafeAreaInfoUtf16 *areaInfo, u32 simpleAddressId, SCICafeLanguage type); #endif // ----------------------------- // // For Parental Control Settings // // ----------------------------- /// \brief Get status of "Use Parental Control" from System Config Setting /// /// \param country Pointer to get staus /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// SCIStatus SCIGetParentalEnable(SCIBoolean *enable); /// \brief Check the input parental pin code as utf-8 String with pin code in System Config Setting /// /// \param pin_code pin_code string as utf-8 to check /// \return result /// SCIBoolean SCICheckParentalPinCode(const char* pin_code); /// \brief Check the input parental pin code as utf-16 String with pin code in System Config Setting /// /// \param pin_code pin_code string as utf-16 to check /// \return result /// SCIBoolean SCICheckParentalPinCodeUtf16(const wchar_t* pin_code); // ------------------------------ // // For Parental Account Settings // // ------------------------------ // NOTE: // // It is necessary to initialize act library before using following apis. // slot_no is an account slot number prepared by act library. // Be carefull slot_no does not equal to the number of parental account system config file. // The association of those numbers is managed by SCI internally. /// \brief Get Parental Account permission status of "Wii U Shopping Services" from System Config Setting /// /// \param eshop_purchase Pointer to get staus /// \param slot_no Account slot number. /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// \retval SCI_STATUS_ACCOUNT_NOT_FOUND Account for the slot is not created. /// SCIStatus SCIGetParentalAccountEShopPurchase(SCIBoolean *eshop_purchase, u8 slot_no); /// \brief Get Parental Account permission status of "Friend Registration" from System Config Setting /// /// \param friend_reg Pointer to get staus /// \param slot_no Account slot number. /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// \retval SCI_STATUS_ACCOUNT_NOT_FOUND Account for the slot is not created. /// SCIStatus SCIGetParentalAccountFriendReg(SCIBoolean *friend_reg, u8 slot_no); /// \brief Get Parental Account permission status of "Entertainment Excluding Games" from System Config Setting /// /// \param int_movie Pointer to get staus /// \param slot_no Account slot number. /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// \retval SCI_STATUS_ACCOUNT_NOT_FOUND Account for the slot is not created. /// SCIStatus SCIGetParentalAccountIntMovie(SCIBoolean *int_movie, u8 slot_no); /// \brief Get Parental Account permission status of "Internet Browser" from System Config Setting /// /// \param int_browser Pointer to get staus /// \param slot_no Account slot number. /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// \retval SCI_STATUS_ACCOUNT_NOT_FOUND Account for the slot is not created. /// SCIStatus SCIGetParentalAccountIntBrowser(SCIBoolean *int_browser, u8 slot_no); /// \brief Get Parental Account permission status of "Online Interaction in Game (e.g: chat, data transfer) " from System Config Setting /// /// \param net_communication_on_game Pointer to get staus /// \param slot_no Account slot number. /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// \retval SCI_STATUS_ACCOUNT_NOT_FOUND Account for the slot is not created. /// SCIStatus SCIGetParentalAccountNetCommunicationOnGame(SCIBoolean *net_communication_on_game, u8 slot_no); /// \brief Get Parental Account restriction level of "Miiverse" from System Config Setting /// /// \param restriction_level Pointer to get restriction level /// \param slot_no Account slot number. /// \return status /// \retval SCI_STATUS_SUCCESS Successfully done. /// \retval SCI_STATUS_FAIL Failed to get value. /// \retval SCI_STATUS_READ_ERROR Error reading the system configuration file. /// \retval SCI_STATUS_FILE_NOT_FOUND System configuration file is not found. /// \retval SCI_STATUS_ITEM_NOT_FOUND Item is not found in the system configuration file. /// \retval SCI_STATUS_ACCOUNT_NOT_FOUND Account for the slot is not created. /// SCIStatus SCIGetParentalAccountNetworkLauncher(SCIRestrictionLevel *restriction_level, u8 slot_no); // ------------------------------ // // For Error Log // // ------------------------------ /// \brief Get Error Log /// /// \param buffer Pointer to buffer where log will be copied /// \param buffer_length Length in bytes of the buffer. /// \param log_index Index to system crash log. /// \return result /// u32 SCIGetErrorLog(char* buffer, u32 buffer_length, u32 log_index); #ifdef __cplusplus } #endif // __cplusplus #endif // _CAFE_SCI_PUBLIC_API_H_