Bad constants names in the C_API_Spec.book document (page 72)

2 views
Skip to first unread message

ldeveaux

unread,
Jun 4, 2010, 5:23:07 AM6/4/10
to XAM Developers Group
Hi,

I think there are some errors in the C_API_Spec.book document (page
72).
Indeed, in the description of the following function :

xam_status
XSystem_AccessXSet (const xsystem_handle inHandle,
const xam_xuid inXUID,
const xam_int inMode,
xam_boolean* const outIsAccessible);

The document specifies inMode as follow :

inMode: The value is the bitwise OR of the access ‘permissions’ to
be checked (R_OK for read
permission, WU_OK for write-user permission, WS_OK for write-
system permission, D_OK for
delete, H_OK for hold, RE_OK for retention event, J_OK for job and
JC_OK for job commit). In
addition, there are composite permissions W_OK (WU_OK|WS_OK),
RW_OK (R_OK|W_OK) and
ALL_OK (RW_OK|D_OK|H_OK|RE_OK|J_OK|JC_OK).

However, the xam_types.h source file specifies the following values :

/* Access bits */
static const xam_int XSET_ACCESS_READ_OK =
0x80000000L;
static const xam_int XSET_ACCESS_WRITE_APP_OK =
0x40000000L;
static const xam_int XSET_ACCESS_WRITE_SYSTEM_OK =
0x20000000L;
static const xam_int XSET_ACCESS_CREATE_OK =
0x10000000L;
static const xam_int XSET_ACCESS_DELETE_OK =
0x08000000L;
static const xam_int XSET_ACCESS_HOLD_OK =
0x04000000L;
static const xam_int XSET_ACCESS_RETENTION_EVENT_OK =
0x02000000L;
static const xam_int XSET_ACCESS_JOB_OK =
0x01000000L;
static const xam_int XSET_ACCESS_JOB_COMMIT_OK =
0x00800000L;

/* Access bit composites */
#define XSET_ACCESS_WRITE_OK (XSET_ACCESS_WRITE_APP_OK|
XSET_ACCESS_WRITE_SYSTEM_OK)
#define XSET_ACCESS_ALL_OK (XSET_ACCESS_READ_OK|
XSET_ACCESS_WRITE_OK|XSET_ACCESS_CREATE_OK|XSET_ACCESS_DELETE_OK)

Elsewhere, the applications don't work with the constants defined by
the C_API_Spec.book document.

Best regards,

Ludovic Deveaux
Reply all
Reply to author
Forward
0 new messages