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_DATASTOREDATA_H_ 14 #define NN_BOSS_BOSS_DATASTOREDATA_H_ 15 16 #include <nn/boss/boss_Types.h> 17 #include <nn/boss/boss_NsData.h> 18 #include <nn/boss/boss_Storage.h> 19 #include <nn/boss/boss_DataStoreTypes.h> 20 21 #ifdef __cplusplus 22 23 namespace nn { 24 namespace boss { 25 26 /*! 27 @addtogroup nn_boss_api 28 @{ 29 */ 30 31 namespace datastore { 32 33 /*! 34 @brief Class that represents <tt>DataStore</tt> data in BOSS storage. 35 36 Used for accessing and deleting data and for retrieving and updating attribute values. 37 */ 38 class DataStoreData : public NsData 39 { 40 public: 41 42 /*! 43 @brief Instantiates an object. 44 */ 45 explicit DataStoreData( void ); 46 47 /*! 48 @brief Instantiates an object and calls <tt>@ref Initialize</tt>. 49 50 @param[in] storage Specifies the BOSS storage where the data is stored. 51 @param[in] dataName Specifies the data name. 52 */ 53 explicit DataStoreData( const Storage& storage, const char* dataName ); 54 55 /*! 56 @brief Destroys the object. 57 */ 58 virtual ~DataStoreData( void ); 59 60 /*! 61 @brief Initializes an instance. 62 63 @param[in] storage Specifies the BOSS storage where the data is stored. 64 @param[in] dataName Specifies the data name. 65 @return Returns the execution result of the function. Returns one of the following <tt>Result</tt> values. 66 @retval Result::IsSuccess Indicates that initialization succeeded. 67 @retval ResultInvalidParameter Indicates that the task name is invalid. 68 */ 69 nn::Result Initialize(const Storage& storage, const char* dataName ); 70 71 72 /*! 73 @brief Gets the attribute values of <tt>DataStore</tt> data. 74 75 @param[out] pOut Specifies a pointer to the buffer that stores the retrieved attribute values. 76 @return Returns the execution result of the function. Returns one of the following <tt>Result</tt> values. 77 @retval Result::IsSuccess Indicates that initialization succeeded. 78 @retval ResultNotExist Indicates that the specified data does not exist. <br /> 79 To get a more detailed grasp of the cause, check whether it matches the <tt>ResultNotExist</tt> subresult. The subresults have the following meanings. <br /> 80 <tt>ResultFileNotExist</tt> - Indicates that the data does not exist. <br /> 81 <tt>ResultBossStorageNotExist</tt> - Indicates that the BOSS storage does not exist. <br /> 82 <tt>ResultDbNotExist</tt> - Indicates that the database file managing the information for the data does not exist. (This result can occur only if the BOSS storage data of the <tt>BSKIND_NBDL</tt> type is the target. ) <br /> 83 <tt>ResultRecordNotExist</tt> - Indicates that the data does not exist. (The meaning is the same as for <tt>ResultFileNotExist</tt>, but this error is returned in some cases when the BOSS storage data is of the <tt>BSKIND_NBDL</tt> type. ) 84 @retval Other Indicates an unexpected error. (For more information, see <tt>@ref nn_boss_result</tt>.) 85 86 87 */ 88 nn::Result GetAttributes(DataAttributes* pOut) const; 89 }; // end of namespace class 90 91 } // end of namespace datastore 92 93 //! @} 94 95 } // end of namespace boss 96 } // end of namespace nn 97 98 #endif // __cplusplus 99 100 #endif /* NN_BOSS_BOSS_DATASTOREDATA_H_ */ 101