/*---------------------------------------------------------------------------* Copyright (C) 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. *---------------------------------------------------------------------------*/ #ifndef NN_BOSS_BOSS_DATASTORECONST_H_ #define NN_BOSS_BOSS_DATASTORECONST_H_ #ifdef __cplusplus namespace nn { namespace boss { /*! @addtogroup nn_boss @{ @defgroup nn_boss_datastoreconst SpotPass (BOSS) DataStore_Constant Definitions @brief This list contains constant definitions related to the SpotPass (BOSS) library DataStore task feature. @{ */ /*! @brief Namespace for DataStore-related definitions. */ namespace datastore { static const u32 ACCESS_KEY_MAX_WCHAR_LENGTH_WITH_NULL = 16; //!< Maximum access key character length including the NULL terminator (all wchar_t characters). static const u32 DESTINATION_PRINCIPAL_ID_MAX_COUNT = 100; //!< Maximum number of destination principal IDs for a single DataStore upload task. static const u32 CHECK_TOKEN_SIZE = 352; //!< Size of the DataStore check token. static const u32 TAG_MAX_CHARACTER_COUNT = 24; //!< Maximum length of a DataStore task tag value. static const u32 TAG_MAX_CHAR_LENGTH_WITH_NULL = 577; //!< Maximum length of a DataStore task tag value, including the terminating null character. A tag can be specified as both an ASCII or a UTF-8 byte string using \\x hexadecimal notation, so the maximum length is 6 (maximum bytes of a single UTF-8 glyph) * 4 (number of bytes in \\x hexadecimal notation) * TAG_MAX_CHARACTER_COUNT + 1. static const u32 TAG_MAX_COUNT = 16; //!< Maximum number of tag values in a DataStore task. static const u32 METABINARY_MAX_SIZE = 1024; //!< Maximum size of metabinary data. static const u32 MAX_COUNT_OF_PRINCIPAL_ID_WITH_UPDATE_PERMISSION = 100; //!< Maximum number of users (principal IDs) that can be specified as having update permissions for uploaded data when registering a DataStore upload task. static const u32 DOWNLOAD_DATA_MAX_COUNT = 1024; //!< Maximum pieces of data that can be stored in a single DataStore download task. /*! @brief Constants that represent DataStore data recipient types. These are also used for setting update permissions. (For more information, see the documentation in the NEX library.) (The numeric value of each enumerator is shown at the start of its description.) */ enum DestinationKind { DSTKIND_PUBLIC = 0, //!< 0: All users. DSTKIND_FRIEND = 1, //!< 1: All friends. DSTKIND_SPECIFIED = 2, //!< 2: Specified users. DSTKIND_PRIVATE = 3, //!< 3: Sender. DSTKIND_SPECIFIED_FRIEND = 4, //!< 4: Friends and specified others. }; /*! @brief Constants that represent the result of DataStore task options. Passed as an argument to the optionKind parameter of @ref nn::boss::Task::GetOptionResult. (The numeric value of each enumerator is shown at the start of its description.) */ enum OptionResultKind { UPLOAD_DATA_ID = 0, //!< 0: Data ID of the uploaded data. }; /*! @brief Definitions of the option values (bit flag) that control the handling of a DataStore upload task. Use @ref DataStoreUploadSetting::SetOption to specify these options. */ static const u32 DATASTORE_UPLOAD_OPTION_DISABLE_NOTIFICATION_FOR_POST = 0x00000001; //!< Disables the notification when uploading new data. When this option is specified, the DataStore upload task does not set the nn::nex::DataStoreConstants::DATA_FLAG_USE_NOTIFICATION_ON_POST flag in the NEX library. This makes it so that the data uploaded by the task is not downloaded from DataStore download tasks. (This affects new uploads. Any future updates will be downloaded.) static const u32 DATASTORE_UPLOAD_OPTION_DISABLE_NOTIFICATION_FOR_UPDATE = 0x00000002; //!< Disables the notification when updating data that has already been uploaded. When this option is specified, the DataStore upload task does not set the nn::nex::DataStoreConstants::DATA_FLAG_USE_NOTIFICATION_ON_UPDATE flag in the NEX library. This makes it so that even if the data uploaded by the task is updated by a different DataStore upload task, it is not downloaded from DataStore download tasks. (This affects updates. New uploads will be downloaded.) } // end of namespace datastore /*! @} @} */ } // end of namespace boss } // end of namespace nn #endif /*__cplusplus*/ #endif /* NN_BOSS_BOSS_DATASTORECONST_H_ */