ctr_firmware/trunk/firmware/include/firm/nfs/revolution/wfsPerm.h
(no author) 080e5d5613 (shirait) nfs(wiifs)ライブラリ追加
git-svn-id: file:///Volumes/Transfer/gigaleak_20231201/2020-09-30%20-%20paladin.7z/paladin/ctr_firmware@283 b871894f-2f95-9b40-918c-086798483c85
2009-02-13 00:26:03 +00:00

463 lines
31 KiB
C
Raw Permalink Blame History

/*---------------------------------------------------------------------------*
Project: Revolution WFS library
File: wfsperm.h
Copyright 2008 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.
$Log: wfsPerm.h,v $
Revision 1.20 2008/09/18 10:26:24 nakanose_jin
fix comments
Revision 1.19 2008/08/29 02:24:46 nakanose_jin
add comments
Revision 1.18 2008/08/06 04:12:45 nakanose_jin
add PERMISSION_CL,ACL_ENTRY_NOT_FOUND,ACL_FULL comment
Revision 1.17 2008/07/18 00:33:03 paul
Added descriptions of functions. Rename WFSDeletePermissions() -> WFSDeleteAccessListEntry().
Revision 1.16 2008/07/17 05:07:02 kondo_masahiro
inline -> static inline
Revision 1.15 2008/07/15 08:28:47 nakanose_jin
change define value
Revision 1.14 2008/07/14 07:22:51 ueno
Renamed WFSSetAccessList() by WFSSetAccessListEntry().
Revision 1.13 2008/07/11 09:46:03 ueno
Added async functions.
Revision 1.12 2008/07/11 09:19:36 ueno
Fixed a typo.
Revision 1.11 2008/07/10 07:03:18 nakanose_jin
add permissions API
Revision 1.10 2008/07/02 06:52:43 nakanose_jin
bye inheritance & dev_full error
Revision 1.9 2008/06/23 02:58:31 nakanose_jin
separate relative from absolute
Revision 1.8 2008/06/16 18:23:50 ueno
Removed WFSCreateAccessList().
Revision 1.7 2008/06/05 14:08:06 ueno
Revised permission APIs.
Revision 1.6 2008/05/08 11:41:02 nakanose_jin
move WFSDebugSetTitleID wfsPerm.h => wfs_Debug.h
Revision 1.5 2008/05/07 13:26:55 nakanose_jin
fix ambiguous definision
Revision 1.4 2008/04/29 01:14:52 ueno
Removed WFS_DEBUG_SYSTEM_PROCESS_ID.
Added WFS_ROOT_ID and WFS_EVERYONE_ID.
Revision 1.3 2008/04/23 09:21:24 ueno
Revised directory permission (change -> add).
Revision 1.2 2008/04/18 07:54:12 nakanose_jin
merging acl
Revision 1.1 2008/04/08 18:27:19 paul
Moved permissions related declarations from wfs.h to this header file. Changed permissions API to support access lists.
*---------------------------------------------------------------------------*/
#ifndef __WFS_PERM_H__
#define __WFS_PERM_H__
// Permission Flags Which apply to Files only:
#include <revolution/wfstypes.h>
#ifdef __cplusplus
extern "C" {
#endif
// permissions
#define WFS_PERM_CHANGE_SIZE 0x0001
#define WFS_PERM_WRITE 0x0002
#define WFS_PERM_READ 0x0004
#define WFS_PERM_ADD_OR_DELETE_FILE 0x0008
#define WFS_PERM_ADD_OR_DELETE_SUBDIR 0x0010
#define WFS_PERM_LIST 0x0020
#define WFS_PERM_DELETE_OR_MOVE 0x0040
// reserved
#define WFS_PERM_RESERVED0 0x0080
#define WFS_PERM_RESERVED1 0x0100
#define WFS_PERM_RESERVED2 0x0200
#define WFS_PERM_RESERVED3 0x0400
#define WFS_PERM_RESERVED4 0x0800
// control level
/* <20>Â<EFBFBD><C382><EFBFBD><EFBFBD>`
#define WFS_PERM_CL0 0x0000 // 0
#define WFS_PERM_CL_MINUS_1 0x7000 // -1
#define WFS_PERM_CL_MINUS_2 0x6000 // -2
#define WFS_PERM_CL_MINUS_3 0x5000 // -3
#define WFS_PERM_CL_MINUS_4 0x4000 // -4
#define WFS_PERM_CL_MASK 0x7000
*/
#define WFS_PERM_CL_MINUS_0 0xE000 // 0
#define WFS_PERM_CL_MINUS_1 0xC000 // -1
#define WFS_PERM_CL_MINUS_2 0xA000 // -2
#define WFS_PERM_CL_MINUS_3 0x8000 // -3
#define WFS_PERM_CL_0 0x0000 // 0 (absolute)
#define WFS_PERM_CL_1 0x2000 // 1 (absolute)
#define WFS_PERM_CL_2 0x4000 // 2 (absolute)
#define WFS_PERM_CL_3 0x6000 // 3 (absolute)
#define WFS_PERM_CL_MASK 0xE000
#define WFS_PERM_CL_SHIFT 13
#define WFS_PERM_CL_RELATIVE_BIT 0x8000
static inline u32 WFS_PERM_GET_CL_ABSOLUTE(u32 perm)
{
// ASSERT( 0 == (WFS_PERM_CL_RELATIVE_BIT & perm) );
return ((perm & WFS_PERM_CL_MASK) >> WFS_PERM_CL_SHIFT);
}
static inline u32 WFS_PERM_SET_CL_ABSOLUTE(u32 perm , s32 cl)
{
// ASSERT( (cl >= 0) && (cl <= 3) );
perm = (perm & ~WFS_PERM_CL_MASK) | (cl << WFS_PERM_CL_SHIFT);
return perm;
}
static inline u32 WFS_PERM_SET_CL_RELATIVE(u32 perm , s32 cl)
{
// ASSERT( (cl <= 0) && (cl >= -3) );
perm = (perm & ~WFS_PERM_CL_MASK) | ((7 + cl) << WFS_PERM_CL_SHIFT);
return perm;
}
#define WFS_PERM_DIR_FULL (WFS_PERM_CHANGE_SIZE | WFS_PERM_WRITE | WFS_PERM_READ | \
WFS_PERM_ADD_OR_DELETE_FILE | WFS_PERM_ADD_OR_DELETE_SUBDIR | \
WFS_PERM_LIST | WFS_PERM_DELETE_OR_MOVE)
#define WFS_PERM_FILE_FULL (WFS_PERM_CHANGE_SIZE | WFS_PERM_WRITE | WFS_PERM_READ | WFS_PERM_DELETE_OR_MOVE)
#define WFS_PERM_FULL 0xFFFF // this is special keyword. it will be converted to a appropriate value in internal
typedef u32 WFSTitleId;
typedef u32 WFSGroupId;
#define WFS_ROOT_ID 0UL
#define WFS_EVERYONE_ID 0x80000000
typedef struct WFSAccessListEntry {
u32 titleId;
u32 entryCreatorId;
u32 permissions;
} WFSAccessListEntry;
#define WFS_ACL_ENTRY_NET_SIZE (sizeof(u32) + sizeof(u32) + sizeof(u16)) // smaller than sizeof(WFSKrnAccessListEntry).
#define WFS_ACL_MAX_ENTRIES (WFS_MAX_FILE_NAME_SIZE - sizeof(u32)*2)/(WFS_ACL_ENTRY_NET_SIZE*2)
//--------------------------------------------------------------------------------------------------------------
// WFSChangePermissions, WFSChangePermissionsAsync
//--------------------------------------------------------------------------------------------------------------
WFSResult WFSChangePermissions (const utf8 *sPathName, u32 nFlags, u32 nMask);
WFSResult WFSChangePermissionsAsync(const utf8 *sPathName, u32 nFlags, u32 nMask, void *pUserData, WFSResultCallback cb);
// Arguments:
// ----------
// sPathName .. Absolute or relative path name of the file or directory whose permissions are to be changed.
// See "WFS Path Names" for rules about path names.
// nFlags .. The new permissions flags that are to be set. Should be a combination of the permission flags: WFS_PERM_*
// nMask .. The mask determines which flags will be changed. NewAttributes = (OldAttributes & ~nMask) | (nFlags & nMask)
// NOTE: The mask bits for bits which are never allowed to be changed, such as WFS_FLAG_IS_A_DIRECTORY are automatically set to 0.
// pUserData .. Arbitrary user data that is passed to the callback function.
// cb .. Pointer to a callback function to receive the result of WFSChangePermissionsAsync.
//
// Return Values:
// --------------
// Possible return values for WFSChangePermissions:
// WFS_RESULT_OK .. The permissions were updated successfully.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name is too long, Path is too deep.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card).
// WFS_RESULT_PERMISSION .. The requested change was not allowed due to the existing permissions settings.
// WFS_RESULT_PERMISSION_CL .. You cant set the requested permission because you dont have a appropriate control level.
// WFS_RESULT_ACL_FULL .. You cant set the requested permission because the target access list is full.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_NOT_FOUND .. The specified file or directory does not exist.
// WFS_RESULT_RESOURCE_LIMIT_EXCEEDED .. Too much accesslist variations generated , so quota resource are drained.
// Possible immediate return values for WFSChangePermissionsAsync:
// WFS_RESULT_OK .. Change permissions request was dispatched successfully. The callback will be called in this case only.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_OUT_OF_MEMORY .. The library does not have enough memory to dispatch the request. (May be due to too many outstanding aysnc calls).
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name is too long, Path is too deep.
// Possible values of nResult passed to WFSChangePermissionsAsync callback:
// WFS_RESULT_OK .. The permissions were updated successfully.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card).
// WFS_RESULT_PERMISSION .. Only the owner of a file or directory can change its permission flags.
// WFS_RESULT_PERMISSION_CL .. You cant set the requested permission because you dont have a appropriate control level.
// WFS_RESULT_ACL_FULL .. You cant set the requested permission because the target access list is full.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_NOT_FOUND .. The specified file or directory does not exist.
// WFS_RESULT_RESOURCE_LIMIT_EXCEEDED .. Too much accesslist variations generated , so quota resource are drained.
//
// Description:
// ------------
// These functions can be used to change one's own permissions to access a specified file or directory.
// However the permissions can only be set within the bounds granted by superior users.
// (The purpose is to allow a user to specify a file as read-only, which is common in existing file systems).
//--------------------------------------------------------------------------------------------------------------
// WFSSetPermissionsForUser, WFSSetPermissionsForUserAsync
//--------------------------------------------------------------------------------------------------------------
WFSResult WFSSetPermissionsForUser (const utf8 *sPathName, u32 nFlags, u32 nMask, WFSTitleId titleId);
WFSResult WFSSetPermissionsForUserAsync(const utf8 *sPathName, u32 nFlags, u32 nMask, WFSTitleId titleId, void *pUserData, WFSResultCallback cb);
// Arguments:
// ----------
// sPathName .. Absolute or relative path name of the file or directory whose permissions are to be changed.
// See "WFS Path Names" for rules about path names.
// nFlags .. The new permissions flags that are to be set. Should be a combination of the permission flags: WFS_PERM_*
// nMask .. The mask determines which flags will be changed. NewAttributes = (OldAttributes & ~nMask) | (nFlags & nMask)
// titleId .. The title id of the application for which permissions are being set.
// pUserData .. Arbitrary user data that is passed to the callback function.
// cb .. Pointer to a callback function to receive the result of WFSSetPermissionsForUserAsync.
//
// Return Values:
// --------------
// Possible return values for WFSSetPermissionsForUser:
// WFS_RESULT_OK .. The permissions were updated successfully.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name is too long, Path is too deep.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card).
// WFS_RESULT_PERMISSION .. The requested change was not allowed due to the existing permissions settings.
// WFS_RESULT_PERMISSION_CL .. You cant set the requested permission because you dont have a appropriate control level.
// WFS_RESULT_ACL_FULL .. You cant set the requested permission because the target access list is full.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_DIRECTORY_QUOTA .. This operation would cause one of the ancestor directories to exceed its quota.
// WFS_RESULT_NOT_FOUND .. The specified file or directory does not exist.
// WFS_RESULT_RESOURCE_LIMIT_EXCEEDED .. Too much accesslist variations generated , so quota resource are drained.
// Possible immediate return values for WFSSetPermissionsForUserAsync:
// WFS_RESULT_OK .. Change permissions request was dispatched successfully. The callback will be called in this case only.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_OUT_OF_MEMORY .. The library does not have enough memory to dispatch the request. (May be due to too many outstanding aysnc calls).
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name is too long, Path is too deep.
// Possible values of nResult passed to WFSSetPermissionsForUserAsync callback:
// WFS_RESULT_OK .. The permissions were updated successfully.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card).
// WFS_RESULT_PERMISSION .. Only the owner of a file or directory can change its permission flags.
// WFS_RESULT_PERMISSION_CL .. You cant set the requested permission because you dont have a appropriate control level.
// WFS_RESULT_ACL_FULL .. You cant set the requested permission because the target access list is full.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_DIRECTORY_QUOTA .. This operation would cause one of the ancestor directories to exceed its quota.
// WFS_RESULT_NOT_FOUND .. The specified file or directory does not exist.
// WFS_RESULT_RESOURCE_LIMIT_EXCEEDED .. Too much accesslist variations generated , so quota resource are drained.
//
// Description:
// ------------
// Use these functions to specify or change the permissions that a particular title id will have to access or modify the specified file or directory.
// NOTE: The permissions are specified as absolute values. However these are represented on access lists as permissions relative to the granter.
// This function operates in such a way as to only create access list entries when necessary, and remove them if possible.
WFSResult WFSGetPermissionsForUser (const utf8 *sPathName, u32 *pFlags, WFSTitleId titleId);
WFSResult WFSGetPermissionsForUserAsync(const utf8 *sPathName, WFSTitleId titleId, void *pUserData, WFSGetPermissionsForUserCallback cb);
// Arguments:
// ----------
// sPathName .. Absolute or relative path name of a file or directory.
// See "WFS Path Names" for rules about path names.
// pFlags .. A pointer to a u32 which will be overwritten with the permissions the specified title id has to
// access or modify the specified file or directory.
// titleId .. The title id of the application for which permissions are being set.
// pUserData .. Arbitrary user data that is passed to the callback function.
// cb .. Pointer to a callback function to receive the result of WFSGetPermissionsForUserAsync.
//
// Return Values:
// --------------
// Possible return values for WFSGetPermissionsForUser:
// WFS_RESULT_OK .. The specified file or directory was found. The permissions were calculated and copied to *pFlags.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION .. Permission flags of the target or its parent directory do not permit requested access from this application.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
// Possible immediate return values for WFSGetPermissionsForUserAsync:
// WFS_RESULT_OK .. The request was dispatched successfully. The callback will be called in this case only.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_OUT_OF_MEMORY .. The library does not have enough memory to dispatch the request. (May be due to too many outstanding aysnc calls).
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// Possible values of nResult passed to WFSGetPermissionsForUserAsync callback:
// WFS_RESULT_OK .. The specified file or directory was found and its permissions were calculated and passed as the nFlags parameter.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION .. Permission flags of the target or its parent directory do not permit requested access from this application.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
//
// Description:
// ------------
// Use these functions to read the permissions of a file or directory for a particular user (title id).
// The permissions values returned are absolute values resulting from inheritance and permissions granted by superior users.
s32 WFSGetAccessList (const utf8 *sPathName, WFSAccessListEntry *pAccessList, u32 nMaxEntries);
WFSResult WFSGetAccessListAsync(const utf8 *sPathName, WFSAccessListEntry *pAccessList, u32 nMaxEntries, void *pUserData, WFSGetAccessListCallback cb);
// Arguments:
// ----------
// sPathName .. Absolute or relative path name of a file or directory.
// See "WFS Path Names" for rules about path names.
// pAccessList .. A pointer to an array of WFSAccessListEntry structs which will be overwritten with the access list entries.
// nMaxEntries .. The maximum number of access list entries that the array can hold.
// pUserData .. Arbitrary user data that is passed to the callback function.
// cb .. Pointer to a callback function to receive the result of WFSGetAccessListAsync.
//
// Return Values:
// --------------
// Possible return values for WFSGetAccessList:
// >= 0 .. The number of access list entries that were successfully copied to the specified array.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION .. Permission flags of the target or its parent directory do not permit requested access from this application.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_DIRECTORY_QUOTA .. This operation would cause one of the ancestor directories to exceed its quota.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
// Possible immediate return values for WFSGetAccessListAsync:
// WFS_RESULT_OK .. The request was dispatched successfully. The callback will be called in this case only.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_OUT_OF_MEMORY .. The library does not have enough memory to dispatch the request. (May be due to too many outstanding aysnc calls).
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// Possible values of nResult passed to WFSGetAccessListAsync callback:
// >= 0 .. The number of access list entries that were successfully copied to the specified array.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION .. Permission flags of the target or its parent directory do not permit requested access from this application.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_DIRECTORY_QUOTA .. This operation would cause one of the ancestor directories to exceed its quota.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
//
// Description:
// ------------
// Use these functions to read the raw access list for a file or directory.
// The raw access list contains only relative values of permissions and control level. (relative to the permission granter)
// The actual permission to access files and directories depends on the absolute values of permissions and control level,
// which are calculated by following inheritance and the permission-granting links back to root.
WFSResult WFSSetAccessListEntry (const utf8 *sPathName, u32 nFlags, u32 nMask, WFSTitleId titleId);
WFSResult WFSSetAccessListEntryAsync(const utf8 *sPathName, u32 nFlags, u32 nMask, WFSTitleId titleId, void *pUserData, WFSResultCallback cb);
// Arguments:
// ----------
// sPathName .. Absolute or relative path name of a file or directory.
// See "WFS Path Names" for rules about path names.
// titleId .. The title id of the application for which permissions are being set.
// nFlags .. The new permissions flags that are to be set. Should be a combination of the permission flags: WFS_PERM_*
// pUserData .. Arbitrary user data that is passed to the callback function.
// cb .. Pointer to a callback function to receive the result of WFSSetAccessListEntryAsync.
//
// Return Values:
// --------------
// Possible return values for WFSSetAccessListEntry:
// WFS_RESULT_OK .. The specified file or directory was found, and the specified access list entry was created or updated.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION_CL .. You cant set the requested permission because you dont have a appropriate control level.
// WFS_RESULT_ACL_FULL .. You cant set the requested permission because the target access list is full.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_DIRECTORY_QUOTA .. This operation would cause one of the ancestor directories to exceed its quota.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
// WFS_RESULT_RESOURCE_LIMIT_EXCEEDED .. Too much accesslist variations generated , so quota resource are drained.
// Possible immediate return values for WFSSetAccessListEntryAsync:
// WFS_RESULT_OK .. The request was dispatched successfully. The callback will be called in this case only.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_OUT_OF_MEMORY .. The library does not have enough memory to dispatch the request. (May be due to too many outstanding aysnc calls).
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// Possible values of nResult passed to WFSSetAccessListEntryAsync callback:
// WFS_RESULT_OK .. The specified file or directory was found, and the specified access list entry was created or updated.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION .. Permission flags of the target or its parent directory do not permit requested access from this application.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_DIRECTORY_QUOTA .. This operation would cause one of the ancestor directories to exceed its quota.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
//
// Description:
// ------------
// Use these functions to create or update a raw access list entry.
// Raw access list entries contain only relative values of permissions and control level. (relative to the permission granter)
// The actual permission to access files and directories depends on the absolute values of permissions and control level,
// which are calculated by following inheritance and the permission-granting links back to root.
// NOTE: SetPermissionsForUser() can be used to specify permissions using absolute values.
WFSResult WFSDeleteAccessListEntry (const utf8 *sPathName, WFSTitleId titleId , WFSTitleId entryCreatorId);
WFSResult WFSDeleteAccessListEntryAsync(const utf8 *sPathName, WFSTitleId titleId , WFSTitleId entryCreatorId, void *pUserData, WFSResultCallback cb);
// Arguments:
// ----------
// sPathName .. Absolute or relative path name of a file or directory.
// See "WFS Path Names" for rules about path names.
// titleId .. The title id of the application for which permissions are being removed.
// entryCreatorId .. The title id of the application which created the access list entry (the permission granter).
// pUserData .. Arbitrary user data that is passed to the callback function.
// cb .. Pointer to a callback function to receive the result of WFSDeletePermissionsAsync.
//
// Return Values:
// --------------
// Possible return values for WFSDeletePermissions:
// WFS_RESULT_OK .. The specified file or directory was found. The permissions were calculated and copied to *pFlags.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION .. Permission flags of the target or its parent directory do not permit requested access from this application.
// WFS_RESULT_ACL_ENTRY_NOT_FOUND .. the target access list entry does not exist.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
// Possible immediate return values for WFSDeletePermissionsAsync:
// WFS_RESULT_OK .. The request was dispatched successfully. The callback will be called in this case only.
// WFS_RESULT_BUSY .. Too many requests, try waiting then calling again.
// WFS_RESULT_OUT_OF_MEMORY .. The library does not have enough memory to dispatch the request. (May be due to too many outstanding aysnc calls).
// WFS_RESULT_INVALID .. The function parameters were invalid, e.g. File name too long, Path is too deep.
// Possible values of nResult passed to WFSDeletePermissionsAsync callback:
// WFS_RESULT_OK .. The specified file or directory was found and its permissions were calculated and passed as the nFlags parameter.
// WFS_RESULT_MEDIA_ERROR .. The device or media is not attached, or was removed before the requested operation could be completed.
// WFS_RESULT_WRITE_PROTECTED .. Device is physically write protected (e.g. USB Flash memory, SD Card. Note: Write errors can occur even for read operations).
// WFS_RESULT_PERMISSION .. Permission flags of the target or its parent directory do not permit requested access from this application.
// WFS_RESULT_CORRUPTION .. A corrupted block was encountered which prevented the operation from being completed.
// WFS_RESULT_NOT_FOUND .. The specified file or directory was not found.
//
// Description:
// ------------
// Use these functions to delete a specified access list entry.
#ifdef __cplusplus
} /* extern "C" */
#endif
#endif //define __WFS_PERM_H__