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

A class that stores the downloaded comment data. More...

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

Public Types

enum  {
  FLAG_NONE = 0,
  FLAG_WITH_BODY_TEXT = DOWNLOAD_FLAG_VALUE_WITH_BODY_TEXT,
  FLAG_WITH_BODY_MEMO = DOWNLOAD_FLAG_VALUE_WITH_BODY_MEMO,
  FLAG_WITH_EXTERNAL_IMAGE_DATA = DOWNLOAD_FLAG_VALUE_WITH_EXTERNAL_IMAGE_DATA,
  FLAG_WITH_MII_DATA = DOWNLOAD_FLAG_VALUE_WITH_MII_DATA,
  FLAG_WITH_APP_DATA = DOWNLOAD_FLAG_VALUE_WITH_APP_DATA,
  FLAG_FREE_FORMAT = DOWNLOAD_FLAG_VALUE_FREE_FORMAT,
  FLAG_SPOILER = DOWNLOAD_FLAG_VALUE_SPOILER
}
 Flags that can be specified in the TestFlags function. More...
 

Public Member Functions

 DownloadedCommentData ()
 Instantiates the object.
 
nn::olv::Result DownloadExternalImageData (void *externalImageData, u32 *externalImageDataSize, u32 externalImageDataMaxSize) const
 Downloads the attached image data. More...
 
void GetAppData (u8 *appData, u32 *appDataSize, u32 appDataMaxSize) const
 Gets application data. More...
 
u32 GetAppDataSize () const
 Gets the size of the application data. More...
 
void GetBodyMemo (u8 *bodyMemo, u32 *bodyMemoSize, u32 bodyMemoMaxSize) const
 Gets the handwritten memo data. More...
 
void GetBodyText (wchar_t *bodyText, u32 bodyTextMaxLength) const
 Gets text data. More...
 
void GetCommentId (char *commentId, u32 commentIdMaxLength) const
 Gets the comment ID. More...
 
u8 GetCountryId () const
 Gets the country ID. More...
 
u32 GetExternalImageDataSize () const
 Gets the size of the attached image data. More...
 
s8 GetFeeling () const
 Gets the mood. More...
 
u8 GetLanguageId () const
 Gets the language ID. More...
 
void GetMiiData (nn::mii::StoreData *storeData) const
 Gets the Mii data of the user. More...
 
void GetMiiNickname (wchar_t *miiNickname, u32 miiNicknameMaxLength) const
 Gets the nickname of the Mii character of the user. More...
 
u8 GetPlatformId () const
 Gets the platform ID. More...
 
nn::fnd::DateTime GetPostDate () const
 Gets the date the comment was made. More...
 
u32 GetRegionId () const
 Gets the region 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 downloaded comment data.

Member Enumeration Documentation

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_BODY_TEXT 

A flag indicating that the comment is a text comment.

FLAG_WITH_BODY_MEMO 

A flag indicating that the comment is a handwritten memo comment.

FLAG_WITH_EXTERNAL_IMAGE_DATA 

A flag indicating that the comment includes an attached image.

FLAG_WITH_MII_DATA 

A flag indicating that the comment includes attached Mii character data.

FLAG_WITH_APP_DATA 

A flag indicating that the comment includes application data.

FLAG_FREE_FORMAT 

A flag indicating that the comment is a free text comment.

FLAG_SPOILER 

A flag indicating that the comment includes spoilers.

Member Function Documentation

nn::olv::Result DownloadExternalImageData ( void *  externalImageData,
u32 *  externalImageDataSize,
u32  externalImageDataMaxSize 
) const

Downloads the attached image data.

This function can only be used when the return value from the TestFlags function is true when FLAG_WITH_EXTERNAL_IMAGE_DATA is specified.
This function causes Internet communication, during which time processing is blocked.
While this function is being called, you can call the nn::olv::Cancel function from another thread to cancel communication processes.
This function is thread safe. However, be careful not to call functions in the OLV library that are not thread safe from other threads while this function is being called.

Parameters
[out]externalImageDataThe buffer that stores the attached image data.
[out]externalImageDataSizeThe buffer that stores the size of the attached image data.
[in]externalImageDataMaxSizeThe size of the buffer that stores the attached image data.
Returns
Returns the result of the operation.
For information about how to handle the results, see the OLV library reference.
void GetAppData ( u8 *  appData,
u32 *  appDataSize,
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.
[out]appDataSizeThe buffer that stores the size of 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.
void GetBodyMemo ( u8 *  bodyMemo,
u32 *  bodyMemoSize,
u32  bodyMemoMaxSize 
) const

Gets the handwritten memo data.

This function can only be used when the TestFlags function is set to FLAG_WITH_BODY_MEMO and returns true.
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.

Parameters
[out]bodyMemoThe buffer that stores the handwritten memo data.
[out]bodyMemoSizeThe buffer that stores the size of the handwritten memo data.
[in]bodyMemoMaxSizeThe size of the buffer that stores the handwritten memo data.
Make sure that you specify a size of at least nn::olv::BODY_MEMO_BUFF_LENGTH.
void GetBodyText ( wchar_t *  bodyText,
u32  bodyTextMaxLength 
) const

Gets text data.

This function can only be used when the return value from the TestFlags function is true when FLAG_WITH_BODY_TEXT 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.

Parameters
[out]bodyTextThe buffer that stores the text data.
[in]bodyTextMaxLengthThe length of the buffer that stores the text data, including the terminating null character.
Make sure that you specify a size of at least nn::olv::BODY_TEXT_BUFF_LENGTH.
void GetCommentId ( char *  commentId,
u32  commentIdMaxLength 
) const

Gets the comment ID.

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 commentId argument.
  • If a value less than that of nn::olv::COMMENT_ID_BUFF_LENGTH is specified for the commentIdMaxLength argument.
Parameters
[out]commentIdThe buffer that stores the comment ID.
[in]commentIdMaxLengthThe length of the buffer that stores the comment ID, including the terminating null character.
Make sure that you specify a size of at least nn::olv::COMMENT_ID_BUFF_LENGTH.
u8 GetCountryId ( ) const

Gets the country ID.

See nn::cfg::CfgCountryCode for the country IDs.

Returns
Returns the country ID.
u32 GetExternalImageDataSize ( ) const

Gets the size of the attached image data.

Returns
Returns the size of the attached image data.
s8 GetFeeling ( ) const

Gets the mood.

Returns
Returns the mood.
u8 GetLanguageId ( ) const

Gets the language ID.

See nn::cfg::CfgLanguageCode for the language IDs.

Returns
Returns the language ID.
void GetMiiData ( nn::mii::StoreData *  storeData) const

Gets the Mii data of the user.

This function can only be used when the return value from the TestFlags function is true when FLAG_WITH_MII_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_MII_DATA specified yields a return value of false.
  • If NULL is specified for the storeData argument.
Parameters
[out]storeDataThe buffer that stores the Mii data.
void GetMiiNickname ( wchar_t *  miiNickname,
u32  miiNicknameMaxLength 
) const

Gets the nickname of the Mii character of the user.

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 miiNickname argument.
  • If a value less than that of nn::olv::MII_NICKNAME_BUFF_LENGTH is specified for the miiNicknameMaxLength argument.
Parameters
[out]miiNicknameThe buffer that stores the nickname of the Mii character.
[in]miiNicknameMaxLengthThe length of the buffer that stores the nickname of the Mii character, including the terminating null character.
Make sure that you specify a size of at least nn::olv::MII_NICKNAME_BUFF_LENGTH.
u8 GetPlatformId ( ) const

Gets the platform ID.

Returns
Returns the platform ID.
nn::fnd::DateTime GetPostDate ( ) const

Gets the date the comment was made.

The date returned reflects the difference in the time zone of the account.

Returns
Returns the date the comment was made.
u32 GetRegionId ( ) const

Gets the region ID.

Returns
Returns the region ID.
u32 GetUserPid ( ) const

Gets the principal ID of the 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: