1 /*---------------------------------------------------------------------------*
2   Project:      APIs for title status
3   File:         OSTitle.h
4 
5   Copyright (C) 2006 Nintendo.  All rights reserved.
6 
7   These coded instructions, statements, and computer programs contain
8   proprietary information of Nintendo of America Inc. and/or Nintendo
9   Company Ltd., and are protected by Federal copyright law.  They may
10   not be disclosed to third parties or copied or duplicated in any form,
11   in whole or in part, without the prior written consent of Nintendo.
12 
13   $Log: OSTitle.h,v $
14   Revision 1.1  2009/10/05 02:31:04  iwai_yuma
15   Changed storage path.
16 
17   Revision 1.2  2007/07/23 04:11:28  ooizumi
18   Moved OSGet[Launch|Return]Code from OSLaunchTitle.h ot OSTitle.h.
19 
20   Revision 1.1  2007/07/19 02:25:06  wada_jumpei
21   Initial check in.
22 
23  *---------------------------------------------------------------------------*/
24 
25 #ifndef __OSTITLE_H__
26 #define __OSTITLE_H__
27 
28 #include <revolution/types.h>
29 
30 #ifdef __cplusplus
31 extern "C" {
32 #endif
33 
34 typedef u64 OSTitleId;
35 
36 // Title status
37 #define OSTITLE_STATUS_UNKNOWN      0
38 #define OSTITLE_STATUS_INSTALLED    1
39 #define OSTITLE_STATUS_NOEXISTS     2
40 #define OSTITLE_STATUS_DELETED      3
41 #define OSTITLE_STATUS_SAVEONLY     4
42 #define OSTITLE_STATUS_NORIGHTS     5
43 #define OSTITLE_STATUS_PARTIAL      6
44 #define OSTITLE_STATUS_FATAL        7
45 
46 // Error status
47 #define OSTITLE_RESULT_OK               0
48 #define OSTITLE_RESULT_OPERATION      (-1)
49 #define OSTITLE_RESULT_ALLOC_FAILED   (-2)
50 
51 // For OSIsTitleInstalled
52 #define OSTITLE_STACK_SIZE  2048
53 
54 s32  OSGetTitleStatus(OSTitleId titleId, u32* status, void* tmpBuffer, u32* bufSize);
55 BOOL OSIsTitleInstalled(OSTitleId titleId);
56 
57 u32  OSGetLaunchCode(void);
58 u32  OSGetReturnCode(void);
59 
60 #ifdef __cplusplus
61 }
62 #endif
63 
64 #endif // __OSTITLE_H__