Nintendo 3DS Miiverse Library  1.3.2
(OLV/Olive)
olv_Const.h
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*
2 Project: OLV
3 File: olv_Const.h
4 
5 Copyright (C) 2009-2013 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  *---------------------------------------------------------------------------*/
14 #ifndef __OLV_CONST_H_
15 #define __OLV_CONST_H_
16 
17 /*! @file
18 @brief These are constant declarations for the OLV library.
19 */
20 
21 /// <span>nn</span>
22 namespace nn {
23 
24 /// <span>olv</span>
25 namespace olv {
26 
27 /** @defgroup enum Constants
28  * @{
29  */
30 
31 /*!
32 @brief Enumerates the moods.
33 */
34 enum Feeling
35 {
36  FEELING_NORMAL, //!< Not specified.
37  FEELING_HAPPY, //!< Fun.
38  FEELING_LIKE, //!< Cool.
39  FEELING_SURPRISED, //!< Surprised.
40  FEELING_FRUSTRATED, //!< Frustrated.
41  FEELING_PUZZLED //!< Stuck.
42 };
43 
44 /*!
45 @brief Enumerated type representing data types.
46 */
48 {
49  COMMON_DATA_TYPE_NONE = 0,
50  COMMON_DATA_TYPE_BODY_TEXT, //!< Text data.
51  COMMON_DATA_TYPE_BODY_TEXT_MAX_LENGTH, //!< The length of the text data.
52  COMMON_DATA_TYPE_BODY_MEMO, //!< Handwritten memo data.
54  COMMON_DATA_TYPE_APP_DATA, //!< Application data.
55  COMMON_DATA_TYPE_EXTERNAL_IMAGE, //!< Attached image data.
56  COMMON_DATA_TYPE_EXTERNAL_THUMBNAIL_IMAGE, //!< Attached thumbnail data.
57  COMMON_DATA_TYPE_STAMP, //!< Stamp data.
58  COMMON_DATA_TYPE_EXTERNAL_URL, //!< Attached URL.
59  COMMON_DATA_TYPE_TOPIC_TAG, //!< Topic data.
60  COMMON_DATA_TYPE_SEARCH_KEY, //!< Search key.
61  COMMON_DATA_TYPE_COMMUNITY_ID, //!< Community ID.
62  COMMON_DATA_TYPE_POST_ID, //!< Post ID.
63  COMMON_DATA_TYPE_COMMENT_ID, //!< Comment ID.
64  COMMON_DATA_TYPE_USER_PID, //!< Principal ID.
66 };
67 
68 static const int POST_ID_BUFF_LENGTH = 32; //!< The length of the buffer for the post ID, including the terminating null character.
69 static const int POST_ID_MAX_NUM = 20; //!< The maximum number of post IDs that can be specified when downloading posts.
70 static const int COMMENT_ID_BUFF_LENGTH = 32; //!< The length of the buffer for the comment ID, including the terminating null character.
71 static const int APP_DATA_BUFF_LENGTH = 1024; //!< The size of the buffer for the application data.
72 static const int BODY_TEXT_MAX_LENGTH = 255; //!< The maximum length of the text data, excluding the terminating null character.
73 static const int BODY_TEXT_BUFF_LENGTH = 256; //!< The length of the buffer for the text data, including the terminating null character.
74 static const int BODY_MEMO_WIDTH = 320; //!< The width of the handwritten memo data.
75 static const int BODY_MEMO_HEIGHT = 120; //!< The height of the handwritten memo data.
76 static const int BODY_MEMO_BUFF_LENGTH = 4864; //!< The buffer size of the handwritten memo data.
77 static const int COMPRESSED_BODY_MEMO_BUFF_LENGTH = BODY_MEMO_BUFF_LENGTH + 32; //!< The buffer size of the handwritten memo data after compression.
78 static const int TOPIC_TAG_MAX_LENGTH = 50; //!< The maximum length of the topic tag, excluding the terminating null character.
79 static const int TOPIC_TAG_BUFF_LENGTH = 151 + 1; //!< The length of the buffer for the topic tag, including the terminating null character.
80 static const int SEARCH_KEY_MAX_NUM = 5; //!< The maximum number of search keys that can be specified when uploading posts.
81 static const int SEARCH_KEY_MAX_LENGTH = 50; //!< The maximum length of the search key, excluding the terminating null character.
82 static const int SEARCH_KEY_BUFF_LENGTH = 151 + 1; //!< The length of the buffer for the search key, including the terminating null character.
83 static const int EXTERNAL_URL_BUFF_LENGTH = 256; //!< The length of the buffer for the attached URL, including the terminating null character.
84 static const int EXTERNAL_IMAGE_DATA_MAX_LENGTH = 512 * 1024; //!< The maximum size of the attached image data.
85 static const int EXTERNAL_THUMBNAIL_IMAGE_DATA_MAX_LENGTH = 128 * 1024; //!< The maximum size of the attached thumbnail image data.
86 static const int EXTERNAL_IMAGE_DATA_TOTAL_MAX_LENGTH = 512 * 1024; //!< The maximum combined size of the attached image data and the attached thumbnail image data.
87 static const int MII_NICKNAME_BUFF_LENGTH = 32; //!< The length of the buffer for the nickname of the Mii character, including the terminating null character.
88 static const int MII_DATA_BUFF_LENGTH = 96; //!< The size of the buffer for the Mii data.
89 static const int COMMUNITY_CODE_BUFF_LENGTH = 13; //!< The length of the buffer for the community code, including the terminating null character.
90 static const int COMMUNITY_ID_MAX_NUM = 30; //!< The maximum number of community IDs that can be specified when downloading community data.
91 static const u32 COMMUNITY_ID_ALL_OFFICIAL = 0xFFFFFFFF; //!< Community IDs representing all official communities.
92 static const u8 LANGUAGE_ID_ALL = 0xFE; //!< Language IDs representing all languages.
93 static const int TITLE_TEXT_BUFF_LENGTH = 128; //!< The length of the buffer for the community name, including the terminating null character.
94 static const int DESCRIPTION_TEXT_BUFF_LENGTH = 256; //!< The length of the buffer for the community description, including the terminating null character.
95 static const int ICON_DATA_BUFF_LENGTH = 9 * 1024 + 44; //!< The size of the buffer for the community icon data.
96 static const int COMPRESSED_ICON_DATA_BUFF_LENGTH = 9 * 1024 + 44; //!< The size of the buffer for the community icon data after compression.
97 static const int ICON_DATA_BUFF_LENGTH_WIIU = 64 * 1024 + 44; //!< The size of the buffer for the Wii U community icon data.
98 static const int COMPRESSED_ICON_DATA_BUFF_LENGTH_WIIU = 64 * 1024 + 44;//!< The size of the buffer for the compressed Wii U community icon data.
99 static const int BANNER_DATA_BUFF_LENGTH = 512 * 1024; //!< The size of the buffer for banner data.
100 static const int URL_BUFF_LENGTH = 2048; //!< The length of the buffer for the URL, including the terminating null character.
101 static const int USER_AGENT_BUFF_LENGTH = 64; //!< The length of the buffer for the user agent, including the terminating null character.
102 static const int PARAM_PACK_BUFF_LENGTH = 512; //!< The length of the buffer for the parameter pack, including the terminating null character.
103 static const int HOST_NAME_BUFF_LENGTH = 256; //!< The length of the buffer for the hostname, including the terminating null character.
104 static const int SYSTEM_ARGS_COMMON_STRING_BUFF_LENGTH = 512; //!< The length of the buffer for the system argument common strings, including the terminating null character.
105 static const u32 PORTAL_APP_APPLET_ID = 0x117; //!< The applet ID for the Miiverse application.
106 
107 /// @cond
108 // Definitions for the constants used in the OLV library (<b>Note:</b> do not use these constants directly in your application.)
109 static const u32 MODE_VALUE_START_COMMUNITY = 1; // The mode specified when showing a community.
110 static const u32 MODE_VALUE_START_POST = 2; // The mode specified when showing a post.
111 static const u32 MODE_VALUE_START_USER = 3; // The mode specified when showing a user.
112 static const u32 MODE_VALUE_UPLOAD_POST = 16; // The mode specified when making a post.
113 static const u32 MODE_VALUE_UPLOAD_COMMENT = 17; // The mode specified when making a comment.
114 static const u32 MODE_VALUE_UPLOAD_POST_RESULT = 18; // The mode specified after uploading a post.
115 static const u32 MODE_VALUE_UPLOAD_COMMENT_RESULT = 19; // The mode specified after uploading a comment.
116 static const u32 UPLOAD_FLAG_VALUE_SPOILER = (1<<0); // The flag to specify spoilers.
117 static const u32 UPLOAD_FLAG_VALUE_COMMUNITY_POST_TYPE_TEXT = (1<<16); // Flag specifying whether to allow only text for the body of post data.
118 static const u32 UPLOAD_FLAG_VALUE_COMMUNITY_POST_TYPE_MEMO = (1<<17); // Flag specifying whether to allow only handwritten memos for the body of post data.
119 static const u32 UPLOAD_FLAG_VALUE_COMMUNITY_COMMENT_TYPE_TEXT = (1<<18); // Flag specifying whether to allow only text for the body of comment data.
120 static const u32 UPLOAD_FLAG_VALUE_COMMUNITY_COMMENT_TYPE_MEMO = (1<<19); // Flag specifying whether to allow only handwritten memos for the body of comment data.
121 static const u32 UPLOAD_FLAG_VALUE_PERMISSION_POST = (1<<20); // Flag specifying whether to prohibit the uploading of posts.
122 static const u32 UPLOAD_FLAG_VALUE_PERMISSION_POST_AND_GET = (1<<21); // Flag specifying whether to prohibit both the uploading and the viewing of posts.
123 static const u32 UPLOAD_FLAG_VALUE_PERMISSION_RESTRICT_PLAYER = (1<<22); // Flag specifying whether to prohibit the uploading of posts, or both the uploading and the viewing of posts, by users who have not played the game.
124 static const u32 UPLOAD_FLAG_VALUE_PERMISSION_COMMENT = (1<<23); // Flag specifying whether to prohibit the uploading of comments under the same conditions if posting is prohibited.
125 static const u32 UPLOAD_FLAG_VALUE_APP_STARTABLE = (1<<4); // The flag to specify when an application is startable.
126 static const u32 UPLOAD_FLAG_VALUE_FREE_FORMAT = (1<<5); // The flag to specify for free text.
127 static const u32 UPLOAD_FLAG_VALUE_DELETE = (1<<6); // The flag to specify when deleting.
128 static const u32 DOWNLOAD_FLAG_VALUE_SPOILER = (1<<0); // The flag to specify spoilers.
129 static const u32 DOWNLOAD_FLAG_VALUE_FREE_FORMAT = (1<<5); // The flag to specify free text.
130 static const u32 DOWNLOAD_FLAG_VALUE_EMPATHY_ADDED = (1<<7); // The flag to specify when a Yeah has been given.
131 static const u32 DOWNLOAD_FLAG_VALUE_WITH_APP_DATA = (1<<16); // The flag to specify when application data is included.
132 static const u32 DOWNLOAD_FLAG_VALUE_WITH_MII_DATA = (1<<17); // The flag to specify when Mii data is included.
133 static const u32 DOWNLOAD_FLAG_VALUE_WITH_BODY_TEXT = (1<<18); // The flag to specify when body text data is included.
134 static const u32 DOWNLOAD_FLAG_VALUE_WITH_BODY_MEMO = (1<<19); // The flag to specify when body handwritten memo data is included.
135 static const u32 DOWNLOAD_FLAG_VALUE_WITH_EXTERNAL_IMAGE_DATA = (1<<20); // The flag to specify when attached image data is included.
136 static const u32 DOWNLOAD_FLAG_VALUE_WITH_EXTERNAL_URL = (1<<22); // The flag to specify when an external URL is included.
137 static const u32 DOWNLOAD_FLAG_VALUE_WITH_TITLE_TEXT = (1<<23); // The flag to specify when title text data is included.
138 static const u32 DOWNLOAD_FLAG_VALUE_WITH_DESCRIPTION_TEXT = (1<<24); // The flag to specify when description text data is included.
139 static const u32 DOWNLOAD_FLAG_VALUE_WITH_ICON_DATA = (1<<25); // The flag to specify when icon data is included.
140 /// @endcond
141 
142 /** @} */
143 
144 } // namespace olv
145 } // namespace nn
146 
147 #endif