CHANS reference
(Redirected from CHANS Reference)
Jump to navigation
Jump to search
This page describes the CHANS functions, objects, and types/enums that can be used by CHANS scripts. For information on using CHANS, for filenames and locations etc, see WiiConnect24. To access object functions etc, use: objname.property, where objname is the object name, and property is the function name etc.
General
This section is for info on functions etc that is used in both KD and sysmenu VMs.
KD
This section is for info on functions etc that can only be used by KD scripts for processing mail. See WiiConnect24 for info on mail headers.
Imported objects:
- NWC24
NWC24
Type | Name | Number of parameters for function | Return value for function | Possible values for enums | Description |
---|---|---|---|---|---|
Function | getStorage | 0 | 0 for failure, FILE fd otherwise | Opens storage.bin in title's wc24scr.vff under data directory. | |
Function | getReceivedMsg | 0 | Mail object on success | Gets a mail object for the received mail being processed. | |
Function | getReplyMsg | 0 | Mail object on success | Gets a mail object for replying to the mail being processed. | |
Function | isFailed | 0 | 1 for failure, zero for success | Checks for the success for the previous NWC24 and mail object function call. | |
Enum | MSGTYPE | MSGTYPE_PUBLIC, MSGTYPE_WII_MENU | Message types, unknown what mail header makes mail "public" and "normal". |
This is the mail object returned by NWC24.getReceivedMsg and NWC24.getReplyMsg.
Type | Name | Number of parameters for function | Return value for function | Possible values for enums | Description |
---|---|---|---|---|---|
Function | init | 1 | none | Initializes a mail object, needed for mail objects returned by NWC24.getReplyMsg. The input parameter is NWC24.MSGTYPE. | |
Function | commit | 1 | none | Saves the mail to wc24send.mbx for reply mail, to be sent later. | |
Function | getType | 0 | NWC24.MSGTYPE | Gets the mail type. | |
Function | setToId | 1 | none | Sets the X-Wii-Id header to input parameter? The input parameter used is usually the NWC24.getMyUserId() retval. | |
Function | setAltName | 1 | none | Sets the X-Wii-AltName header to input parameter? | |
Function | setMBNoReply | 1 | none | Sets the X-Wii-MB-NoReply header to input parameter?(Input can be value 1.) | |
Function | readSubject | 0 | Mail subject | Gets the mail subject? | |
Function | setText | 1 | none | Sets the mail text body to input parameter? | |
Function | getTag | 0 | X-Wii-Tag header? | Gets the X-Wii-Tag header? | |
Function | setTag | 1 | none | Sets the X-Wii-Tag header to input parameter? | |
Function | setLedPattern | 1 | none | Disc drive LED related? Example input parameter: 8217. |
This section is for info on functions etc that can only be used by system menu banner scripts. Fill me in!
This article is a stub. You can help WiiBrew by expanding it. |