1 /*---------------------------------------------------------------------------*
2   Project:  WiiConnect24
3   File:     NWC24Types.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: NWC24Types.h,v $
14   Revision 1.20  2008/04/11 11:19:04  hirose_kazuki
15   Merged changes of 1.17.8.1.
16 
17   Revision 1.17.8.1  2008/01/28 04:17:34  hirose_kazuki
18   Added Charset/AutoEncodingType definitions for CK support.
19 
20   Revision 1.19  2007/07/12 12:00:55  hirose_kazuki
21   Added type definition of NWC24SearchCompareMode.
22 
23   Revision 1.18  2007/06/30 02:00:07  hirose_kazuki
24   Deleted definition of NWC24_CHJP_OPTOUT_ENABLE.
25 
26   Revision 1.17  2007/06/04 12:52:55  hirose_kazuki
27   Added definition of NWC24CHJumpObj.
28 
29   Revision 1.16  2007/05/29 05:41:58  hirose_kazuki
30   Added definition of NWC24MBJumpHeader.
31   Deleted NWC24MIMEType definitions that were added recently.
32 
33   Revision 1.15  2007/05/24 02:00:40  hirose_kazuki
34   Added definition of NWC24_LED_*_DEFAULT.
35   Removed definition of NWC24_LED_PATTERN_DEFAULT instead.
36 
37   Revision 1.14  2007/05/03 09:57:44  hirose_kazuki
38   Added definition of NWC24_LED_PATTERN_DEFAULT.
39 
40   Revision 1.13  2007/04/24 12:33:16  hirose_kazuki
41   Added definition of NWC24_AUD_WII_SOUND.
42 
43   Revision 1.12  2007/04/18 02:51:13  hirose_kazuki
44   Added definition of NWC24_APP_WII_CHJUMP.
45 
46   Revision 1.11  2007/04/10 04:37:30  adachi_hiroaki
47   Supported Win32 platform.
48 
49   Revision 1.10  2006/11/08 00:54:30  torigoe_nobutaka
50   Added definition of NWC24_WINDOWS_1252.
51 
52   Revision 1.9  2006/10/30 05:48:01  hirose_kazuki
53   Added definition of NWC24_MUL_RELATED.
54 
55   Revision 1.8  2006/10/29 17:32:23  seiki_masashi
56   Added NWC24AutoEncodingType.
57 
58   Revision 1.7  2006/10/24 01:17:24  hirose_kazuki
59   Added definition of NWC24_TXT_HTML and NWC24_MUL_ALTERNATIVE.
60 
61   Revision 1.6  2006/10/09 10:34:04  hirose_kazuki
62   Added enum values for NWC24Charset.
63 
64   Revision 1.5  2006/09/21 02:34:14  hirose_kazuki
65   Rearrangement of message types.
66 
67   Revision 1.4  2006/09/20 12:55:31  hirose_kazuki
68   Added definition of NWC24_APP_WII_MINIDATA.
69   Redefined enums of NWC24MsgType.
70 
71   Revision 1.3  2006/09/02 04:25:02  hirose_kazuki
72   Updated NWC24MIMEType definitions to support message board data.
73 
74   Revision 1.2  2006/08/15 01:24:00  yasu
75   Added definitions of basic variables in IOP
76 
77   Revision 1.1  2006/08/07 05:57:05  hirose_kazuki
78   Separated from NWC24Msg.h.
79   Added new type NWC24_MSGTYPE_WII_HIDDEN to NWC24MsgType.
80 
81 
82  *---------------------------------------------------------------------------*/
83 
84 /*---------------------------------------------------------------------------*
85     NWC24 Message API
86  *---------------------------------------------------------------------------*/
87 #ifndef __NWC24TYPES_H__
88 #define __NWC24TYPES_H__
89 
90 #ifdef __MWERKS__
91 #pragma enumsalwaysint on
92 #endif // __MWERKS__
93 
94 #if defined(RVL_OS) || defined(WIN32)
95 #include <revolution/types.h>
96 #endif //RVL_OS
97 
98 /*---------------------------------------------------------------------------*
99     Type definitions
100  *---------------------------------------------------------------------------*/
101 
102 typedef enum NWC24MsgType
103 {
104     NWC24_MSGTYPE_RVL_MENU_SHARED = 0,
105     NWC24_MSGTYPE_WII_MENU_SHARED = 0,
106     NWC24_MSGTYPE_RVL_APP = 1,
107     NWC24_MSGTYPE_WII_APP = 1,
108     NWC24_MSGTYPE_RVL_MENU = 2,
109     NWC24_MSGTYPE_WII_MENU = 2,
110     NWC24_MSGTYPE_RVL_APP_HIDDEN = 3,
111     NWC24_MSGTYPE_WII_APP_HIDDEN = 3,
112 
113 #if 1
114     NWC24_MSGTYPE_RVL = 1,              // Obsoleted: for compatibility
115     NWC24_MSGTYPE_WII = 1,              // Obsoleted: for compatibility
116     NWC24_MSGTYPE_RVL_APP_ONLY = 1,     // Obsoleted: for compatibility
117     NWC24_MSGTYPE_WII_APP_ONLY = 1,     // Obsoleted: for compatibility
118     NWC24_MSGTYPE_RVL_MENU_ONLY = 2,    // Obsoleted: for compatibility
119     NWC24_MSGTYPE_WII_MENU_ONLY = 2,    // Obsoleted: for compatibility
120     NWC24_MSGTYPE_RVL_HIDDEN = 3,       // Obsoleted: for compatibility
121     NWC24_MSGTYPE_WII_HIDDEN = 3,       // Obsoleted: for compatibility
122 #endif
123 
124     NWC24_MSGTYPE_PUBLIC = 4
125 
126 } NWC24MsgType;
127 
128 typedef enum NWC24MsgBoxId
129 {
130     NWC24_SEND_BOX,
131     NWC24_RECV_BOX
132 
133 } NWC24MsgBoxId;
134 
135 typedef enum NWC24Charset
136 {
137     NWC24_US_ASCII          = 0x00000000,
138     NWC24_UTF_8             = 0x00010008,
139     NWC24_UTF_16            = 0x00010010,
140     NWC24_UTF_16BE          = 0x00010010,   // same
141     NWC24_UTF_32            = 0x00010020,
142     NWC24_UTF_32BE          = 0x00010020,   // same
143     NWC24_ISO_2022_JP       = 0x00020000,
144     NWC24_SHIFT_JIS         = 0x00020001,
145     NWC24_EUC_JP            = 0x00020002,
146     NWC24_EUC_KR            = 0x00030002,
147     NWC24_ISO_8859_1        = 0x00080001,
148     NWC24_ISO_8859_2        = 0x00080002,
149     NWC24_ISO_8859_3        = 0x00080003,
150     NWC24_ISO_8859_5        = 0x00080005,
151     NWC24_ISO_8859_7        = 0x00080007,
152     NWC24_ISO_8859_9        = 0x00080009,
153     NWC24_ISO_8859_10       = 0x0008000A,
154     NWC24_ISO_8859_15       = 0x0008000F,
155     NWC24_GB_2312           = 0x000B2312,
156     NWC24_WINDOWS_1252      = 0x000F1252,
157 
158     NWC24_CHARSET_UNKNOWN   = 0xFFFFFFFF
159 
160 } NWC24Charset;
161 
162 typedef enum NWC24Encoding
163 {
164     NWC24_ENC_7BIT,
165     NWC24_ENC_8BIT,
166     NWC24_ENC_BASE64,
167     NWC24_ENC_QUOTED_PRINTABLE,
168     NWC24_MAX_ENCODINGS
169 
170 } NWC24Encoding;
171 
172 typedef enum NWC24MIMEType
173 {
174     NWC24_VOID_MIMETYPE     = 0x00000000,
175     NWC24_TXT_PLAIN         = 0x00010000,
176     NWC24_TXT_HTML          = 0x00010001,
177     NWC24_IMG_JPEG          = 0x00020000,
178     NWC24_IMG_WII_PICTURE   = 0x00020001,
179     NWC24_APP_OCTET_STREAM  = 0x00030000,
180     NWC24_APP_WII_MSGBOARD  = 0x00030001,
181     NWC24_APP_WII_MINIDATA  = 0x00030002,
182     NWC24_MUL_MIXED         = 0x000F0000,
183     NWC24_MUL_ALTERNATIVE   = 0x000F0001,
184     NWC24_MUL_RELATED       = 0x000F0002
185 
186 } NWC24MIMEType;
187 
188 typedef enum NWC24AutoEncodingType
189 {
190     NWC24_AUTOENCODING_JP        = 0,
191     NWC24_AUTOENCODING_US        = 1,
192     NWC24_AUTOENCODING_EU        = 2,
193     NWC24_AUTOENCODING_KR        = 3,
194     NWC24_AUTOENCODING_CN        = 4
195 
196 } NWC24AutoEncodingType;
197 
198 typedef enum NWC24SearchCompareMode
199 {
200     NWC24_SEARCH_CMP_NEQUAL     = 0,
201     NWC24_SEARCH_CMP_EQUAL      = 1,
202     NWC24_SEARCH_CMP_LEQUAL     = 2,
203     NWC24_SEARCH_CMP_GEQUAL     = 3,
204     NWC24_SEARCH_CMP_BITMASK    = 4
205 } NWC24SearchCompareMode;
206 
207 typedef u64 NWC24UserId;
208 
209 
210 typedef struct NWC24MsgObj
211 {
212     // 256 bytes
213     u32             data[64];
214 
215 } NWC24MsgObj;
216 
217 
218 #define NWC24_CHJP_DATA_MAX         (512+64)
219 #define NWC24_CHJP_NUMBLOCKS_MAX    8
220 
221 typedef struct NWC24CHJumpHeader
222 {
223     u32             magic;
224     u32             totalSize;
225     u32             numBlocks;
226     u32             options;
227     u64             titleId;
228 
229 } NWC24CHJumpHeader;
230 
231 typedef struct NWC24CHJumpObj
232 {
233     NWC24CHJumpHeader   header;
234     char                data[NWC24_CHJP_DATA_MAX];
235 
236 } NWC24CHJumpObj;
237 
238 
239 #define NWC24_LED_APP_DEFAULT       0x00002019U
240 #define NWC24_LED_SYSMENU_DEFAULT   0x00004001U
241 
242 /*---------------------------------------------------------------------------*/
243 /*---------------------------------------------------------------------------*/
244 
245 #endif  // __NWC24TYPES_H__
246 
247