1 /*---------------------------------------------------------------------------* 2 3 Copyright (C) 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_BOSS_BOSS_DATASTORECONST_H_ 14 #define NN_BOSS_BOSS_DATASTORECONST_H_ 15 16 #ifdef __cplusplus 17 18 namespace nn { 19 namespace boss { 20 21 /*! 22 @addtogroup nn_boss 23 @{ 24 25 @defgroup nn_boss_datastoreconst SpotPass (BOSS) DataStore_Constant Definitions 26 @brief This list contains constant definitions related to the SpotPass (BOSS) library <tt>DataStore</tt> task feature. 27 @{ 28 */ 29 30 31 /*! 32 @brief Namespace for <tt>DataStore</tt>-related definitions. 33 */ 34 namespace datastore 35 { 36 static const u32 ACCESS_KEY_MAX_WCHAR_LENGTH_WITH_NULL = 16; //!< Maximum access key character length including the <tt>NULL</tt> terminator (all <tt>wchar_t</tt> characters). 37 static const u32 DESTINATION_PRINCIPAL_ID_MAX_COUNT = 100; //!< Maximum number of destination principal IDs for a single <tt>DataStore</tt> upload task. 38 static const u32 CHECK_TOKEN_SIZE = 352; //!< Size of the <tt>DataStore</tt> check token. 39 static const u32 TAG_MAX_CHARACTER_COUNT = 24; //!< Maximum length of a <tt>DataStore</tt> task tag value. 40 static const u32 TAG_MAX_CHAR_LENGTH_WITH_NULL = 577; //!< Maximum length of a <tt>DataStore</tt> task tag value, including the terminating null character. A tag can be specified as both an ASCII or a UTF-8 byte string using <tt>\\x</tt> hexadecimal notation, so the maximum length is <tt>6</tt> (maximum bytes of a single UTF-8 glyph) <tt>* 4</tt> (number of bytes in <tt>\\x</tt> hexadecimal notation) <tt>* TAG_MAX_CHARACTER_COUNT + 1</tt>. 41 static const u32 TAG_MAX_COUNT = 16; //!< Maximum number of tag values in a <tt>DataStore</tt> task. 42 static const u32 METABINARY_MAX_SIZE = 1024; //!< Maximum size of metabinary data. 43 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 <tt>DataStore</tt> upload task. 44 45 static const u32 DOWNLOAD_DATA_MAX_COUNT = 1024; //!< Maximum pieces of data that can be stored in a single <tt>DataStore</tt> download task. 46 47 /*! 48 @brief Constants that represent <tt>DataStore</tt> data recipient types. These are also used for setting update permissions. 49 (For more information, see the documentation in the NEX library.) 50 (The numeric value of each enumerator is shown at the start of its description.) 51 */ 52 enum DestinationKind 53 { 54 DSTKIND_PUBLIC = 0, //!< <tt>0</tt>: All users. 55 DSTKIND_FRIEND = 1, //!< <tt>1</tt>: All friends. 56 DSTKIND_SPECIFIED = 2, //!< <tt>2</tt>: Specified users. 57 DSTKIND_PRIVATE = 3, //!< <tt>3</tt>: Sender. 58 DSTKIND_SPECIFIED_FRIEND = 4, //!< <tt>4</tt>: Friends and specified others. 59 }; 60 61 /*! 62 @brief Constants that represent the result of <tt>DataStore</tt> task options. Passed as an argument to the <var>optionKind</var> parameter of <tt>@ref nn::boss::Task::GetOptionResult</tt>. 63 (The numeric value of each enumerator is shown at the start of its description.) 64 */ 65 enum OptionResultKind 66 { 67 UPLOAD_DATA_ID = 0, //!< <tt>0</tt>: Data ID of the uploaded data. 68 }; 69 70 /*! 71 @brief Definitions of the option values (bit flag) that control the handling of a DataStore upload task. Use <tt>@ref DataStoreUploadSetting::SetOption</tt> to specify these options. 72 */ 73 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 <tt>nn::nex::DataStoreConstants::DATA_FLAG_USE_NOTIFICATION_ON_POST</tt> 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.) 74 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 <tt>nn::nex::DataStoreConstants::DATA_FLAG_USE_NOTIFICATION_ON_UPDATE</tt> 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.) 75 76 } // end of namespace datastore 77 78 79 /*! 80 @} 81 @} 82 */ 83 84 } // end of namespace boss 85 } // end of namespace nn 86 87 88 #endif /*__cplusplus*/ 89 90 #endif /* NN_BOSS_BOSS_DATASTORECONST_H_ */ 91