mirror of
https://github.com/J-D-K/JKSV.git
synced 2026-08-20 09:25:02 -05:00
remote::Storage just barely working.
This commit is contained in:
@@ -21,31 +21,30 @@ namespace data
|
||||
|
||||
/// @brief Returns the application ID of the title.
|
||||
/// @return Title's application ID.
|
||||
uint64_t get_application_id(void) const;
|
||||
uint64_t get_application_id() const;
|
||||
|
||||
/// @brief Returns a pointer to the control data for the title.
|
||||
/// @return Pointer to control data.
|
||||
NsApplicationControlData *get_control_data(void);
|
||||
NsApplicationControlData *get_control_data();
|
||||
|
||||
/// @brief Returns whether or not the title has control data.
|
||||
/// @return Whether or not the title has control data.
|
||||
bool has_control_data(void) const;
|
||||
bool has_control_data() const;
|
||||
|
||||
/// @brief Returns the title of the title?
|
||||
/// @return Title directly from the NACP.
|
||||
const char *get_title(void);
|
||||
const char *get_title();
|
||||
|
||||
/// @brief Returns the path safe version of the title for file system usage.
|
||||
/// @return Path safe version of the title.
|
||||
const char *get_path_safe_title(void);
|
||||
const char *get_path_safe_title() const;
|
||||
|
||||
/// @brief Returns the publisher of the title.
|
||||
/// @return Publisher string from NACP.
|
||||
const char *get_publisher(void);
|
||||
const char *get_publisher();
|
||||
|
||||
/// @brief Returns the owner ID of the save data.
|
||||
/// @return Save data owner ID.
|
||||
uint64_t get_save_data_owner_id(void) const;
|
||||
uint64_t get_save_data_owner_id() const;
|
||||
|
||||
/// @brief Returns the save data container's base size.
|
||||
/// @param saveType Type of save data to return.
|
||||
@@ -70,11 +69,11 @@ namespace data
|
||||
/// @brief Returns if a title uses the save type passed.
|
||||
/// @param saveType Save type to check for.
|
||||
/// @return True on success. False on failure.
|
||||
bool has_save_data_type(uint8_t saveType);
|
||||
bool has_save_data_type(uint8_t saveType) const;
|
||||
|
||||
/// @brief Returns a pointer to the icon texture.
|
||||
/// @return Icon
|
||||
sdl::SharedTexture get_icon(void) const;
|
||||
sdl::SharedTexture get_icon() const;
|
||||
|
||||
/// @brief Allows the path safe title to be set to a new path.
|
||||
/// @param newPathSafe Buffer containing the new safe path to use.
|
||||
@@ -101,6 +100,6 @@ namespace data
|
||||
sdl::SharedTexture m_icon = nullptr;
|
||||
|
||||
/// @brief Private function to get/create the path safe title.
|
||||
void get_create_path_safe_title(void);
|
||||
void get_create_path_safe_title();
|
||||
};
|
||||
} // namespace data
|
||||
|
||||
@@ -39,34 +39,34 @@ namespace data
|
||||
void add_data(const FsSaveDataInfo *saveInfo, const PdmPlayStatistics *playStats);
|
||||
|
||||
/// @brief Clears the user save info vector.
|
||||
void clear_data_entries(void);
|
||||
void clear_data_entries();
|
||||
|
||||
/// @brief Erases data at index.
|
||||
/// @param index Index of save data info to erase.
|
||||
void erase_data(int index);
|
||||
|
||||
/// @brief Runs the sort algo on the vector.
|
||||
void sort_data(void);
|
||||
void sort_data();
|
||||
|
||||
/// @brief Returns the account ID of the user.
|
||||
/// @return AccountID
|
||||
AccountUid get_account_id(void) const;
|
||||
AccountUid get_account_id() const;
|
||||
|
||||
/// @brief Returns the save data type the account uses.
|
||||
/// @return Save data type of the account.
|
||||
FsSaveDataType get_account_save_type(void) const;
|
||||
FsSaveDataType get_account_save_type() const;
|
||||
|
||||
/// @brief Returns the account's nickname.
|
||||
/// @return Account nickname.
|
||||
const char *get_nickname(void) const;
|
||||
const char *get_nickname() const;
|
||||
|
||||
/// @brief Returns the path safe version of the nickname.
|
||||
/// @return Path safe nickname.
|
||||
const char *get_path_safe_nickname(void) const;
|
||||
const char *get_path_safe_nickname() const;
|
||||
|
||||
/// @brief Returns the total number of entries in the data vector.
|
||||
/// @return Total number of entries.
|
||||
size_t get_total_data_entries(void) const;
|
||||
size_t get_total_data_entries() const;
|
||||
|
||||
/// @brief Returns the application ID of the title at index.
|
||||
/// @param index Index of title.
|
||||
@@ -90,7 +90,7 @@ namespace data
|
||||
|
||||
/// @brief Returns a reference to the user save data info vector.
|
||||
/// @return Reference to the user save info vector.
|
||||
data::UserSaveInfoList &get_user_save_info_list(void);
|
||||
data::UserSaveInfoList &get_user_save_info_list();
|
||||
|
||||
/// @brief Returns a pointer to the play statistics of applicationID
|
||||
/// @param applicationID Application ID to search and fetch.
|
||||
@@ -99,18 +99,18 @@ namespace data
|
||||
|
||||
/// @brief Returns raw SDL_Texture pointer of icon.
|
||||
/// @return SDL_Texture of icon.
|
||||
SDL_Texture *get_icon(void);
|
||||
SDL_Texture *get_icon();
|
||||
|
||||
/// @brief Returns the shared texture of icon. Increasing reference count of it.
|
||||
/// @return Shared icon texture.
|
||||
sdl::SharedTexture get_shared_icon(void);
|
||||
sdl::SharedTexture get_shared_icon();
|
||||
|
||||
/// @brief Erases a UserDataEntry according to the application ID passed.
|
||||
/// @param applicationID ID of the save to erase.
|
||||
void erase_save_info_by_id(uint64_t applicationID);
|
||||
|
||||
/// @brief Loads the save data info and play statistics for the current user using the information passed to the constructor.
|
||||
void load_user_data(void);
|
||||
void load_user_data();
|
||||
|
||||
private:
|
||||
/// @brief Account's ID
|
||||
@@ -137,7 +137,7 @@ namespace data
|
||||
void load_account(AccountProfile &profile, AccountProfileBase &profileBase);
|
||||
|
||||
/// @brief Creates a placeholder since something went wrong.
|
||||
void create_account(void);
|
||||
void create_account();
|
||||
|
||||
/// @brief Opens a save data info reader according to the data passed to the user.
|
||||
/// @param spaceID The FsSaveDataSpaceId to use when opening the reader.
|
||||
|
||||
@@ -24,5 +24,6 @@ static inline bool operator==(AccountUid accountIDA, AccountUid accountIDB)
|
||||
/// @note I'm not 100% sure which uint64_t in the AccountUid struct comes first. I don't know if it's [0][1] or [1][0]. To do: Figure that out.
|
||||
static inline bool operator==(AccountUid accountIDA, u128 accountIDB)
|
||||
{
|
||||
return accountIDA.uid[0] == (accountIDB >> 64 & 0xFFFFFFFFFFFFFFFF) && accountIDA.uid[1] == (accountIDB & 0xFFFFFFFFFFFFFFFF);
|
||||
return accountIDA.uid[0] == (accountIDB >> 64 & 0xFFFFFFFFFFFFFFFF) &&
|
||||
accountIDA.uid[1] == (accountIDB & 0xFFFFFFFFFFFFFFFF);
|
||||
}
|
||||
|
||||
@@ -26,7 +26,7 @@ namespace data
|
||||
|
||||
/// @brief Returns a reference to the title info map.
|
||||
/// @return Reference to TitleInfoMap.
|
||||
std::unordered_map<uint64_t, data::TitleInfo> &get_title_info_map(void);
|
||||
std::unordered_map<uint64_t, data::TitleInfo> &get_title_info_map();
|
||||
|
||||
/// @brief Uses the application ID passed to add/load a title to the map.
|
||||
/// @param applicationID Application/System save data ID to add.
|
||||
|
||||
Reference in New Issue
Block a user