1 /*---------------------------------------------------------------------------* 2 3 Copyright (C) Nintendo. All rights reserved. 4 5 These coded instructions, statements, and computer programs contain 6 proprietary information of Nintendo of America Inc. and/or Nintendo 7 Company Ltd., and are protected by Federal copyright law. They may 8 not be disclosed to third parties or copied or duplicated in any form, 9 in whole or in part, without the prior written consent of Nintendo. 10 11 *---------------------------------------------------------------------------*/ 12 13 #ifndef NN_TEMP_TEMP_API_EXPOSE_H_ 14 #define NN_TEMP_TEMP_API_EXPOSE_H_ 15 16 #include <nn/temp/temp_Types.h> 17 #include <cafe/fs.h> 18 19 #ifdef __cplusplus 20 extern "C" { 21 #endif 22 23 //! @addtogroup nn_temp_api 24 //! @{ 25 26 /*! 27 @brief Modifies the <tt>Others</tt> read permission so that other processes can access the temporary directory. 28 29 @param[in] pClient Pointer to the client buffer. 30 @param[in] pCmd The command block. 31 @param[in] dirID The <tt>TEMP</tt> directory ID. 32 @param[in] path The relative path from the root path of the temporary directory specified by the <tt>TEMP</tt> directory ID. 33 The length must be less than <tt>FS_MAX_ARGPATH_SIZE</tt>. 34 @param[in] mode The access mode. You can specify one of the following values for the permission. 35 <tt>FS_MODE_IROTH</tt>: Adds read permission. 36 <tt>0</tt>: Removes read permission. 37 @param[in] errHandling Flag for automatic error handling. Only reported errors are returned. 38 39 @return Returns the result of the function. 40 @retval TEMP_STATUS_OK The process ended normally. 41 @retval TEMP_STATUS_CANCELED The command was canceled. 42 @retval TEMP_STATUS_NOT_FOUND Target not found. 43 @retval TEMP_STATUS_PERMISSION_ERROR The caller does not have the appropriate access permissions. 44 @retval TEMP_STATUS_ALREADY_OPEN One or more files or directories in the source path or path to modify is already open. 45 @retval TEMP_STATUS_STORAGE_FULL Indicates that a data region for updating the directory tree cannot be allocated. 46 @retval TEMP_STATUS_JOURNAL_FULL The journaling region is full. A new journaling block cannot be allocated. 47 */ 48 TEMPStatus TEMPChangeOthersMode( 49 FSClient *pClient, 50 FSCmdBlock *pCmd, 51 TEMPDirID dirID, 52 const char *path, 53 FSMode mode, 54 FSRetFlag errHandling 55 ); 56 57 /*! 58 @brief Modifies the <tt>Others</tt> read permission so that other processes can access the temporary directory. 59 60 @param[in] pClient Pointer to the client buffer. 61 @param[in] pCmd The command block. 62 @param[in] dirID The <tt>TEMP</tt> directory ID. 63 @param[in] path The relative path from the root path of the temporary directory specified by the <tt>TEMP</tt> directory ID. 64 The length must be less than <tt>FS_MAX_ARGPATH_SIZE</tt>. 65 @param[in] mode The access mode. You can specify one of the following values for the permission. 66 <tt>FS_MODE_IROTH</tt>: Adds read permission. 67 <tt>0</tt>: Removes read permission. 68 @param[in] errHandling Flag for automatic error handling. Only reported errors are returned. 69 @param[in] pAsyncParams Notification parameters for asynchronous calls. 70 71 @return Returns the function execution result using a callback. 72 @retval TEMP_STATUS_OK The process ended normally. 73 @retval TEMP_STATUS_CANCELED The command was canceled. 74 @retval TEMP_STATUS_NOT_FOUND Target not found. 75 @retval TEMP_STATUS_PERMISSION_ERROR The caller does not have the appropriate access permissions. 76 @retval TEMP_STATUS_ALREADY_OPEN One or more files or directories in the source path or path to modify is already open. 77 @retval TEMP_STATUS_STORAGE_FULL Indicates that a data region for updating the directory tree cannot be allocated. 78 @retval TEMP_STATUS_JOURNAL_FULL The journaling region is full. A new journaling block cannot be allocated. 79 80 @return Immediate return values for asynchronous API functions. 81 @retval TEMP_STATUS_OK The request was issued normally. 82 @retval TEMP_STATUS_FATAL_ERROR Invalid parameter. 83 */ 84 TEMPStatus TEMPChangeOthersModeAsync( 85 FSClient *pClient, 86 FSCmdBlock *pCmd, 87 TEMPDirID dirID, 88 const char *path, 89 FSMode mode, 90 FSRetFlag errHandling, 91 const FSAsyncParams *pAsyncParams 92 ); 93 94 //! @} 95 96 #ifdef __cplusplus 97 } 98 #endif 99 100 #endif // NN_TEMP_TEMP_API_EXPOSE_H_ 101