1 /*---------------------------------------------------------------------------*
2 
3 Copyright (C) 2013-2014 Nintendo. All rights reserved.
4 
5 These coded instructions, statements, and computer programs contain
6 proprietary information of Nintendo of America Inc. and/or Nintendo
7 Company Ltd., and are protected by Federal copyright law.  They may
8 not be disclosed to third parties or copied or duplicated in any form,
9 in whole or in part, without the prior written consent of Nintendo.
10 
11  *---------------------------------------------------------------------------*/
12 
13 #ifndef NN_EC_OPTION_H_
14 #define NN_EC_OPTION_H_
15 
16 // Four Character Code
17 #define NN_EC_MAKE_FOURCC(ch1, ch2, ch3, ch4) (((ch1) << 0) | ((ch2) << 8) | ((ch3) << 16) | ((ch4) << 24))
18 
19 namespace nn { namespace ec {
20 
21 /*!
22 @brief Enumerates the options that are set in the EC library.
23 */
24 enum Option
25 {
26     /*!
27 @brief This option is for setting the number of simultaneous downloads for metadata.
28 
29 @li Variable type: <tt>u32</tt>
30 @li Range: 1 to 5.
31 @li Default: 5.
32 
33 The larger the value, the better the performance when multiple items are downloaded at the same time.
34     */
35     OPTION_DOWNLOAD_CONNECTIONS = NN_EC_MAKE_FOURCC('D', 'L', 'C', 'N'),
36 
37     /*!
38 @brief This option is for specifying the core of the download thread.
39 
40 @li Variable type: <tt>s32</tt>
41 @li Range:  -1 / 0 / 1 / 2.
42 @li Default: 2.
43 
44 Specify <tt>-1</tt> to run the download thread on the same core as the thread that called <tt>@ref Initialize</tt>.
45     */
46     OPTION_DOWNLOAD_THREAD_CORE = NN_EC_MAKE_FOURCC('D', 'L', 'T', 'C'),
47 
48     /*!
49 @brief This option is for specifying the core for the communication thread.
50 
51 @li Variable type: <tt>s32</tt>
52 @li Range:  -1 / 0 / 1 / 2.
53 @li Default: 2.
54 
55 Specify <tt>-1</tt> to run the communication thread on the same core as the thread that called the API.
56     */
57     OPTION_CONNECTION_THREAD_CORE = NN_EC_MAKE_FOURCC('C', 'N', 'T', 'C'),
58 
59     /*!
60 @brief This option is for setting the priority of the thread on which the EC library runs.
61 
62 @li Variable type: <tt>u32</tt>
63 @li Range: 0 to 31.
64 @li Default: 16.
65 
66 Note that operations may become unstable if you change the thread priority. @n
67 Use this option carefully.
68     */
69     OPTION_THREAD_PRIORITY = NN_EC_MAKE_FOURCC('T', 'H', 'P', 'R'),
70 
71     /*!
72 @brief This option enables or disables query logging.
73 
74 @li Variable type: <tt>u32</tt>
75 @li Range: FALSE(0) / TRUE(!=0)
76 @li Default: TRUE(1)
77     */
78     OPTION_QUERY_LOG_ENABLED = NN_EC_MAKE_FOURCC('Q', 'L', 'O', 'G'),
79 
80     OPTION_FORCE_S32 = 0x7FFFFFFF
81 };
82 
83 }} // namespace nn::ec
84 
85 #endif // NN_EC_OPTION_H_
86