#include <dwc.h>
BOOL DWC_CheckProfanityAsync(const u16 **words,
int wordsnum,
const char *reserved,
int timeout,
char *result,
int *badwordsnum);| words | Pointer to the string array to check.
|
| wordsnum | Number of elements in the string array specified by words (1 to 50). |
| reserved | Specifies NULL. |
| timeout | The time (in milliseconds) to server response timeout. (If 0 is specified here, the default value of 10000 is used.) |
| result | Pointer to the storage location for the check result (must be a region of wordsnum bytes). |
| badwordsnum | Pointer to the location of storage for the number of illegal characters included in the check result. |
| TRUE | The process of checking for illegal strings has started. |
| FALSE | The process of checking for illegal strings failed to start. |
Starts the process of checking for illegal strings. This function always returns FALSE if called during an ongoing illegal string check.
The illegal string check is performed by communicating with the authentication server. The checking process is the same as done by the DWC_LoginAsync function.
In addition to being able to check for individual illegal strings, this function can check multiple strings at once within the following limits:
After calling this function, progress the illegal string check process by calling the DWC_CheckProfanityProcess function approximately every game frame. When the illegal string check completes successfully, the results of the check are stored as an array in result.
DWC_CheckProfanityAsync function, the target market region is determined by the end of the game code in the ROM registry data. With the DWC_CheckProfanityExAsync function, it is also possible to forcibly set the target to all market regions by specifying A.The check results stored in result differ if A is specified for an all-market check.
When "A" is specified for an all-region check:
For each string, a value of "1" for illegal or "0" for all other check results is inserted in the bit field for each region in the same order the strings were assigned to words for checking. result is the logical sum of the following values.
DWC_PROF_REGION_JP |
0x01 Illegal in the Japanese market |
DWC_PROF_REGION_US |
0x02 Illegal in North American market |
DWC_PROF_REGION_EU |
0x04 Illegal in European market |
DWC_PROF_REGION_KR |
0x08 Illegal in Korean market |
DWC_PROF_REGION_CN |
0x10 Illegal in the Chinese market |
DWC_PROF_REGION_ALL |
0x80 Illegal in some markets. Note that this value may not always be equivalent to the logical sum of results for each region given above. Results are set even for cases where a string is deemed illegal in some region not yet defined in the library. This specification is designed to take into account the possibility of new regions being added in future on the authentication server side. This bit is also used for values assigned to the badwordsnum argument. |
Example:
words[4]={L"goodoword1",L"goodoword2",L"badword",L"goodoword3"}
If in the above group of strings only the third index ("badword") is an illegal string in all regions, the following will result:result[4]={0,0,0x9f,0}
badwordsnum=1
When "A" is not specified:
A value of "1" for illegal and "0" for all other check results is inserted in the result in the same order the strings were assigned to words for checking.
Example:
words[4]={L"goodoword1",L"goodoword2",L"badword",L"goodoword3"}
If in the above group of strings only the third index ("badword") is an illegal string, the following will result:result[4]={0,0,1,0}
badwordsnum=1
The following words are registered as illegal strings with the authentication server, in order to test that a string can be checked and determined to be illegal.
DWC_CheckProfanityProcess
DWC_LoginAsync
DWC_CheckProfanityExAsync
A is specified for all regions.For the change log before 5.1 PR2, click here.
CONFIDENTIAL