/*---------------------------------------------------------------------------*
Project: OLV
File: olv_Const.h
Copyright (C) 2009-2013 Nintendo. All rights reserved.
These coded instructions, statements, and computer programs contain
proprietary information of Nintendo of America Inc. and/or Nintendo
Company Ltd., and are protected by Federal copyright law. They may
not be disclosed to third parties or copied or duplicated in any form,
in whole or in part, without the prior written consent of Nintendo.
*---------------------------------------------------------------------------*/
//------------------------------------------------------------------------------
/** @file olv_Const.h
*
* @brief Defines data used by the Olive library (OLV).
*
*/
//------------------------------------------------------------------------------
#ifndef __OLV_CONST_H_
#define __OLV_CONST_H_
#define OLV_ERROR_CODE_BASE (1150000U)
#define OLV_ERROR_CODE_UNKNOWN (OLV_ERROR_CODE_BASE + 9999U)
/// nn
namespace nn {
/// olv
namespace olv {
/** @defgroup enum Enumerations
* @{
*/
/// Moods.
enum Feeling
{
FEELING_NORMAL, /*!< Not specified. */
FEELING_HAPPY, /*!< Fun. */
FEELING_LIKE, /*!< Cool. */
FEELING_SURPRISED, /*!< Surprised. */
FEELING_FRUSTRATED, /*!< Frustrated. */
FEELING_PUZZLED, /*!< Stuck. */
};
// Minimum working-memory size definitions.
static const int WORK_MIN_SIZE = 64 * 1024; /*!< Minimum work size required to initialize the OLV library. */
// Handwritten memo data size definitions.
static const int BODY_MEMO_WIDTH = 320; /*!< Handwritten memo data width. */
static const int BODY_MEMO_HEIGHT = 120; /*!< Handwritten memo data height. */
static const int BODY_MEMO_BPP = 4; /*!< Handwritten memo data bit size. */
// Image attachment definitions.
static const int EXTERNAL_IMAGE_DATA_WIDTH = 800; /*!< Width of images that can be specified as attachments. */
static const int EXTERNAL_IMAGE_DATA_HEIGHT = 450; /*!< Height of images that can be specified as attachments. */
// Defines maximum values in specifications.
static const int BODY_TEXT_MAX_LENGTH = 255; /*!< Maximum number of characters that can be included as text data (not including the terminating character). */
static const int BODY_MEMO_MAX_SIZE = BODY_MEMO_WIDTH * BODY_MEMO_HEIGHT * BODY_MEMO_BPP + 44; /*!< Size of the handwritten memo data that can be specified in a post. */
static const int COMPRESSED_BODY_MEMO_MAX_SIZE = 40 * 1024; /*!< Maximum handwritten memo data size (allowed by the library) after compression. */
static const int TOPIC_TAG_MAX_LENGTH = 50; /*!< Maximum number of characters that can be specified as a topic tag (not including the terminating character). */
static const int SEARCH_KEY_MAX_LENGTH = 50; /*!< Maximum number of characters that can be included in a search key (not including the terminating character). */
static const int SEARCH_KEY_MAX_NUM = 5; /*!< Maximum number of search keys that can be specified. */
static const int EXTERNAL_URL_MAX_LENGTH = 255; /*!< Maximum number of characters that can be included in an external URL (not including the terminating character). */
static const int MII_DATA_SIZE = 96; /*!< Mii character data size. */
static const int POST_ID_MAX_LENGTH = 22; /*!< Maximum number of characters for the post ID. */
static const int DIRECT_MESSAGE_ID_MAX_LENGTH = 22; /*!< Maximum number of characters for the direct message ID. */
static const int COMMENT_ID_MAX_LENGTH = 22; /*!< Maximum number of characters for the comment ID. */
static const int APP_DATA_MAX_SIZE = 1024; /*!< Maximum application data size. */
static const int APP_DATA_BY_POST_APP_MAX_SIZE = 1024; /*!< Maximum application data size (via the Miiverse service). */
static const int EXTERNAL_IMAGE_DATA_MAX_SIZE = 512 * 1024; /*!< Maximum size of images that can be specified as attachments. */
static const int EXTERNAL_THUMBNAIL_IMAGE_DATA_MAX_SIZE = 128 * 1024; /*!< The maximum size of an image that can be specified as thumbnail attachment data. */
static const int EXTERNAL_IMAGE_DATA_BY_POST_APP_MAX_SIZE = 512 * 1024; /*!< Maximum size of an image that can be specified as an attachment (via the Miiverse service). */
static const int EXTERNAL_THUMBNAIL_IMAGE_DATA_BY_POST_APP_MAX_SIZE = 128 * 1024; /*!< The maximum size of an image that can be specified as thumbnail attachment data (via the Miiverse service). */
static const int EXTERNAL_IMAGE_DATA_TOTAL_MAX_SIZE = 512 * 1024; /*!< The maximum total size of image attachment data and thumbnail attachment data. */
static const int EXTERNAL_BINARY_DATA_BY_POST_APP_MAX_SIZE = 1 * 1024 * 1024; /*!< Maximum size of binary data that can be specified as an attachment (via the Miiverse service). */
static const int DIRECT_MESSAGE_PID_MAX_NUM = 1; /*!< Maximum number of recipients of a direct message. */
static const int TITLE_TEXT_MAX_LENGTH = 127; /*!< Maximum number of characters that can be specified as a community data title name. */
static const int DESCRIPTION_TEXT_MAX_LENGTH = 255; /*!< Define the maximum number of characters that can be specified in a community description. */
static const int ICON_DATA_MAX_SIZE = 64 * 1024 + 44; /*!< Maximum size of the community icon. */
static const int COMMUNITY_CODE_LENGTH = 12; /*!< Size of the community code. */
static const int STAMP_DATA_MAX_NUM = 100; /*!< Maximum number of stamps that can be set. */
static const int STAMP_DATA_100_100_MAX_SIZE = 40044; /*!< Maximum size of stamp data (100x100). */
static const int STAMP_DATA_200_200_MAX_SIZE = 160044; /*!< Maximum size of stamp data (200x200). */
static const int POST_ID_MAX_NUM = 20; /*!< Maximum number of post IDs that can be set. */
static const int COMMUNITY_ID_MAX_NUM = 20; /*!< Define the maximum number of post IDs that can be set. */
static const int FAVORITE_COMMUNITY_MAX_NUM = 16; /*!< The maximum number of Favorite communities per title. */
static const int SELF_COMMUNITY_MAX_NUM = 4; /*!< The maximum number of communities that can be created per title. */
static const int UPLOADED_COMMON_DATA_MAX_SIZE = 4 * 1024; /*!< The maximum size of common data that can be retrieved from UploadedPostData. */
static const int YOUTUBE_MOVIE_DATA_MAX_NUM = 1; /*!< Maximum number of movies that can be set. */
// Define the required buffer sizes.
static const int BODY_TEXT_BUFF_LENGTH = 256; /*!< Text data storage buffer size. */
static const int COMPRESSED_BODY_MEMO_BUFF_SIZE = 40 * 1024; /*!< Maximum handwritten memo data size after compression. */
static const int TOPIC_TAG_BUFF_LENGTH = 151 + 1; /*!< Size of the buffer for storing topic tags. */
static const int SEARCH_KEY_BUFF_LENGTH = 151 + 1; /*!< Size of the buffer for storing search keys. */
static const int EXTERNAL_URL_BUFF_LENGTH = 256; /*!< Size of the buffer for storing URLs. */
static const int MII_NICKNAME_BUFF_LENGTH = 32; /*!< Size of the buffer for storing Mii character nicknames. */
static const int POST_ID_BUFF_LENGTH = 32; /*!< Size of the buffer for storing post IDs. */
static const int DIRECT_MESSAGE_ID_BUFF_LENGTH = 32; /*!< Size of the buffer for storing direct message IDs. */
static const int COMMENT_ID_BUFF_LENGTH = 32; /*!< Size of the buffer for storing comment IDs. */
static const int TITLE_TEXT_BUFF_LENGTH = 128; /*!< The maximum number of characters that can be specified as a community data title name. */
static const int DESCRIPTION_TEXT_BUFF_LENGTH = 256; /*!< Define the maximum number of characters that can be specified in a community description. */
static const int COMPRESSED_ICON_DATA_BUFF_SIZE = ICON_DATA_MAX_SIZE; /*!< Size of the buffer for storing community icons. */
static const int SEARCH_PID_BUFF_NUM = 12; /*!< Size of the buffer for storing principal ID searches. */
static const int URL_BUFF_LENGTH = 2048; /*!< URL buffer length. */
static const int USER_AGENT_BUFF_LENGTH = 64; /*!< USER AGENT buffer length. */
static const int PARAM_PACK_BUFF_LENGTH = 512; /*!< Parameter pack buffer length. */
static const int HOST_NAME_BUFF_LENGTH = 256; /*!< Host name buffer length.*/
static const int POST_APP_PARAM_WORK_BUFF_SIZE = 1 * 1024 * 1024; /*!< Work size for parameters used to upload posts via the post application. */
static const int COMMUNITY_ID_BUFF_NUM = 30; /*!< Define the buffer size for community IDs that can be set. */
// Other definitions.
static const unsigned int COMMUNITY_ID_ALL_OFFICIAL = 0xFFFFFFFF; /*!< IDs indicating all official communities. */
static const unsigned char LANGUAGE_ID_ALL = 0xFE; /*!< IDs representing all languages. */
/// Debug output control level.
enum ReportType
{
REPORT_TYPE_PUBLIC = (1<<0), /*!< All related processes. */
REPORT_TYPE_INIT = (1<<1), /*!< Initialization. */
REPORT_TYPE_DEBUG = (1<<2), /*!< Debugging. */
REPORT_TYPE_POST = (1<<3), /*!< Post. */
REPORT_TYPE_GET = (1<<4), /*!< Get. */
REPORT_TYPE_CONNECT = (1<<5), /*!< Connection-related action. */
REPORT_TYPE_FRIEND = (1<<6), /*!< Friend-related action. */
REPORT_TYPE_MEMORY = (1<<7), /*!< Memory-related action. */
REPORT_TYPE_TEST = (1<<8), /*!< Tests and test codes. */
REPORT_TYPE_XML_PARSER = (1<<9), /*!< Raw data. */
REPORT_TYPE_RESPONSE = (1<<10), /*!< Response data. */
REPORT_TYPE_ERROR = (1<<11), /*!< Error-related stuff. */
REPORT_TYPE_INFO = (1<<12), /*!< Information that is always output. */
REPORT_TYPE_ALL =
REPORT_TYPE_PUBLIC |
REPORT_TYPE_INIT |
REPORT_TYPE_DEBUG |
REPORT_TYPE_POST |
REPORT_TYPE_GET |
REPORT_TYPE_CONNECT |
REPORT_TYPE_FRIEND |
REPORT_TYPE_MEMORY |
REPORT_TYPE_TEST |
REPORT_TYPE_XML_PARSER |
REPORT_TYPE_RESPONSE |
REPORT_TYPE_ERROR |
REPORT_TYPE_INFO,
};
/// @cond
/*!< Type definition for data sent by a post application. */
enum
{
DATA_TYPE_STAMP = 0,
DATA_TYPE_YOUTUBE_MOVIE_DATA,
DATA_TYPE_INVALID_STAMP
};
/*!< Type definition for the result data obtained by the post application. */
enum
{
RESULT_COMMON_DATA_TYPE_YOUTUBE = 0
};
/// @endcond
/// @cond
// Definitions for the constants used in the OLV library (Note: do not use these constants directly in your application.)
static const unsigned int UPLOAD_FLAG_VALUE_SPOILER = (1<<0); /*!< Flag specified when the post includes spoilers. */
static const unsigned int UPLOAD_FLAG_VALUE_RESERVED1 = (1<<1); /*!< Reserved to maintain compatibility. */
static const unsigned int UPLOAD_FLAG_VALUE_RESERVED2 = (1<<2); /*!< Reserved to maintain compatibility. */
static const unsigned int UPLOAD_FLAG_VALUE_RESERVED3 = (1<<3); /*!< Reserved to maintain compatibility. */
static const unsigned int UPLOAD_FLAG_VALUE_APP_STARTABLE = (1<<4); /*!< Flag specified when an application can be started from the post. */
static const unsigned int UPLOAD_FLAG_VALUE_FREE_FORMAT = (1<<5); /*!< Flag specified for free format posts. */
static const unsigned int UPLOAD_FLAG_VALUE_DELETE = (1<<6); /*!< Flag specified when deleting a post. */
static const unsigned int UPLOAD_FLAG_VALUE_ONLY_BODY_TEXT = (1<<16); /*!< Flag for restricting posts to text data (for the post application only). */
static const unsigned int UPLOAD_FLAG_VALUE_ONLY_BODY_MEMO = (1<<17); /*!< Flag for restricting posts to handwritten memo data (for the post application only). */
static const unsigned int UPLOAD_FLAG_VALUE_RESERVED4 = (1<<18); /*!< Reserved to maintain compatibility (for the post application only). */
static const unsigned int DOWNLOAD_FLAG_VALUE_WITH_BODY_TEXT = (1<<0); /*!< Flag for checking whether a post includes body text. */
static const unsigned int DOWNLOAD_FLAG_VALUE_WITH_BODY_MEMO = (1<<1); /*!< Flag for checking whether a post includes handwritten memo data. */
static const unsigned int DOWNLOAD_FLAG_VALUE_WITH_EXTERNAL_IMAGE_DATA = (1<<2); /*!< Flag for checking whether a post has image attachments. */
static const unsigned int DOWNLOAD_FLAG_VALUE_WITH_EXTERNAL_BINARY_DATA = (1<<3); /*!< Flag for checking whether a post includes binary attachments. */
static const unsigned int DOWNLOAD_FLAG_VALUE_WITH_MII_DATA = (1<<4); /*!< Flag for checking whether a post includes Mii character data. */
static const unsigned int DOWNLOAD_FLAG_VALUE_WITH_EXTERNAL_URL = (1<<5); /*!< Flag for checking whether a post includes an external URL. */
static const unsigned int DOWNLOAD_FLAG_VALUE_WITH_APP_DATA = (1<<6); /*!< Flag for checking whether a post includes application data. */
static const unsigned int DOWNLOAD_FLAG_VALUE_EMPATHY_ADDED = (1<<7); /*!< Flag for checking whether the user has given a Yeah. */
static const unsigned int DOWNLOAD_FLAG_VALUE_RESERVED1 = (1<<8); /*!< Reserved to maintain compatibility. */
static const unsigned int DOWNLOAD_FLAG_VALUE_SPOILER = (1<<9); /*!< Flag for checking whether the post contains a spoiler. */
static const unsigned int DOWNLOAD_FLAG_VALUE_FREE_FORMAT = (1<<10); /*!< Flag for checking whether post data is free format. */
static const unsigned int UPLOADED_FLAG_VALUE_WITH_BODY_TEXT = (1<<0); /*!< Flag for checking whether a post includes body text. */
static const unsigned int UPLOADED_FLAG_VALUE_WITH_BODY_MEMO = (1<<1); /*!< Flag for checking whether a post includes handwritten memo data. */
static const unsigned int UPLOADED_FLAG_VALUE_WITH_APP_DATA = (1<<2); /*!< Flag for checking whether a post includes application data. */
static const unsigned int UPLOADED_FLAG_VALUE_SPOILER = (1<<3); /*!< Flag for checking whether the data contains a spoiler. */
static const unsigned int STAMP_FLAG_VALUE_NONE = 0; /*!< Flag that represents the normal stamp state. (If no flag is specified, the standard state is used.) */
static const unsigned int STAMP_FLAG_VALUE_INVALID = (1<<0); /*!< Flag that indicates that the stamp is invalid. (It cannot be selected.) */
/// @endcond
/// @cond
// These definitions were retained to maintain compatibility with earlier versions.
// Do not use them. They have been deprecated.
static const int TGA_HEADER_SIZE = 44; /*!< Size of the TGA header and footer. (Do not use.) */
static const int BODY_MEMO_SIZE = BODY_MEMO_WIDTH * BODY_MEMO_HEIGHT * BODY_MEMO_BPP + TGA_HEADER_SIZE; /*!< Size of the handwritten memo data that can be specified as the post body. (Use BODY_MEMO_MAX_SIZE instead.) */
/// @endcond
/** @} */
}
}
#endif