/*---------------------------------------------------------------------------* 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_DATASTOREDATA_H_ #define NN_BOSS_BOSS_DATASTOREDATA_H_ #include #include #include #include #ifdef __cplusplus namespace nn { namespace boss { /*! @addtogroup nn_boss_api @{ */ namespace datastore { /*! @brief Class that represents DataStore data in BOSS storage. Used for accessing and deleting data and for retrieving and updating attribute values. */ class DataStoreData : public NsData { public: /*! @brief Instantiates an object. */ explicit DataStoreData( void ); /*! @brief Instantiates an object and calls @ref Initialize. @param[in] storage Specifies the BOSS storage where the data is stored. @param[in] dataName Specifies the data name. */ explicit DataStoreData( const Storage& storage, const char* dataName ); /*! @brief Destroys the object. */ virtual ~DataStoreData( void ); /*! @brief Initializes an instance. @param[in] storage Specifies the BOSS storage where the data is stored. @param[in] dataName Specifies the data name. @return Returns the execution result of the function. Returns one of the following Result values. @retval Result::IsSuccess Indicates that initialization succeeded. @retval ResultInvalidParameter Indicates that the task name is invalid. */ nn::Result Initialize(const Storage& storage, const char* dataName ); /*! @brief Gets the attribute values of DataStore data. @param[out] pOut Specifies a pointer to the buffer that stores the retrieved attribute values. @return Returns the execution result of the function. Returns one of the following Result values. @retval Result::IsSuccess Indicates that initialization succeeded. @retval ResultNotExist Indicates that the specified data does not exist.
To get a more detailed grasp of the cause, check whether it matches the ResultNotExist subresult. The subresults have the following meanings.
ResultFileNotExist - Indicates that the data does not exist.
ResultBossStorageNotExist - Indicates that the BOSS storage does not exist.
ResultDbNotExist - 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 BSKIND_NBDL type is the target. )
ResultRecordNotExist - Indicates that the data does not exist. (The meaning is the same as for ResultFileNotExist, but this error is returned in some cases when the BOSS storage data is of the BSKIND_NBDL type. ) @retval Other Indicates an unexpected error. (For more information, see @ref nn_boss_result.) */ nn::Result GetAttributes(DataAttributes* pOut) const; }; // end of namespace class } // end of namespace datastore //! @} } // end of namespace boss } // end of namespace nn #endif // __cplusplus #endif /* NN_BOSS_BOSS_DATASTOREDATA_H_ */