Nintendo 3DS Miiverse Library  1.3.2
(OLV/Olive)
ResumedData Class Reference

A class that stores the recovery results. More...

#include <CTR_SDK/include/nn/olv/olv_TypesResume.h>

Public Types

enum  {
  MODE_NONE = 0,
  MODE_START_COMMUNITY = MODE_VALUE_START_COMMUNITY,
  MODE_START_POST = MODE_VALUE_START_POST,
  MODE_START_USER = MODE_VALUE_START_USER
}
 The modes that can be obtained using the GetMode function. More...
 
enum  {
  FLAG_NONE = 0,
  FLAG_WITH_APP_DATA = DOWNLOAD_FLAG_VALUE_WITH_APP_DATA
}
 Flags that can be specified in the TestFlags function. More...
 

Public Member Functions

 ResumedData ()
 Instantiates the object.
 
void GetAppData (u8 *appData, u32 appDataMaxSize) const
 Gets application data. More...
 
u32 GetAppDataSize () const
 Gets the size of the application data. More...
 
u32 GetCommunityId () const
 Gets the community ID. More...
 
u32 GetMode () const
 Gets the mode. More...
 
void GetPostId (char *postId, u32 postIdMaxLength) const
 Gets the post ID. More...
 
u32 GetUserPid () const
 Gets the principal ID of the user. More...
 
void Reset ()
 Reverts parameters to their initial state.
 
bool TestFlags (u32 flags) const
 Tests flags. More...
 

Detailed Description

A class that stores the recovery results.

Member Enumeration Documentation

anonymous enum

The modes that can be obtained using the GetMode function.

Enumerator
MODE_NONE 

The default mode.

MODE_START_COMMUNITY 

The mode specified when the process is started from the community page.

MODE_START_POST 

The mode specified when the process is started from the post page.

MODE_START_USER 

The mode specified when the process is started from the user page.

anonymous enum

Flags that can be specified in the TestFlags function.

Enumerator
FLAG_NONE 

This is the state when no flags are specified.

FLAG_WITH_APP_DATA 

Flag indicating that application data is included.

Member Function Documentation

void GetAppData ( u8 *  appData,
u32  appDataMaxSize 
) const

Gets application data.

This function can only be used when the return value from the TestFlags function is true when FLAG_WITH_APP_DATA is specified. Note that if you call this function in one of the following invalid states, it will stop on an assertion in the debug/development versions, and return without doing anything in the release version.

  • If calling the TestFlags function with FLAG_WITH_APP_DATA specified yields a return value of false.
  • If NULL is specified for the appData argument.
  • If a value less than that returned by the GetAppDataSize function is specified for the appDataMaxSize argument.
Parameters
[out]appDataThe buffer that stores the application data.
[in]appDataMaxSizeThe size of the buffer that stores the application data.
Make sure that you specify a value of at least that returned by the GetAppDataSize function.
u32 GetAppDataSize ( ) const

Gets the size of the application data.

Returns
Returns the size of the application data.
u32 GetCommunityId ( ) const

Gets the community ID.

This function only can be used when the GetMode function returns MODE_START_COMMUNITY.

Returns
Returns the community ID.
u32 GetMode ( ) const

Gets the mode.

Returns
Returns the mode (MODE_*).
void GetPostId ( char *  postId,
u32  postIdMaxLength 
) const

Gets the post ID.

This function only can be used when the GetMode function returns MODE_START_POST.
Note that if you call this function in one of the following invalid states, it will stop on an assertion in the debug/development versions, and return without doing anything in the release version.

  • If NULL is specified for the postId argument.
  • If a value less than that of nn::olv::POST_ID_BUFF_LENGTH is specified for the postIdMaxLength argument.
Parameters
[out]postIdThe buffer that stores the post ID.
[in]postIdMaxLengthThe length of the buffer that stores the post ID, including the terminating null character.
Make sure that you specify a size of at least nn::olv::POST_ID_BUFF_LENGTH.
u32 GetUserPid ( ) const

Gets the principal ID of the user.

This function only can be used when the GetMode function returns MODE_START_USER.

Returns
Returns the principal ID of the user.
bool TestFlags ( u32  flags) const

Tests flags.

Parameters
[in]flagsFlags (FLAG_*).
Returns
Returns true if any of the flags are set; returns false otherwise.

The documentation for this class was generated from the following file: