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

The class for storing the results when community data is created or uploaded. More...

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

Public Types

enum  Flags {
  FLAG_NONE = 0,
  FLAG_WITH_TITLE_TEXT = DOWNLOAD_FLAG_VALUE_WITH_TITLE_TEXT,
  FLAG_WITH_DESCRIPTION_TEXT = DOWNLOAD_FLAG_VALUE_WITH_DESCRIPTION_TEXT,
  FLAG_WITH_APP_DATA = DOWNLOAD_FLAG_VALUE_WITH_APP_DATA,
  FLAG_WITH_ICON_DATA = DOWNLOAD_FLAG_VALUE_WITH_ICON_DATA
}
 Flags that can be specified in the TestFlags function. More...
 

Public Member Functions

 UploadedCommunityData ()
 Instantiates the object.
 
void GetAppData (u8 *appData, u32 *appDataSize, u32 appDataMaxSize) const
 Gets application data. More...
 
u32 GetAppDataSize (void) const
 Gets the size of the application data. More...
 
void GetCommunityCode (char *communityCode, u32 communityCodeMaxLength) const
 Gets the community code. More...
 
u32 GetCommunityId () const
 Gets the community ID. More...
 
void GetDescriptionText (wchar_t *descriptionText, u32 descriptionTextMaxLength) const
 Gets the community description. More...
 
nn::olv::Result GetIconData (u8 *iconData, u32 *iconDataSize, u32 iconDataMaxSize) const
 Gets icon data. More...
 
u32 GetOwnerPid () const
 Gets the principal ID of the user who created the community. More...
 
void GetTitleText (wchar_t *titleText, u32 titleTextMaxLength) const
 Gets the community name. More...
 
void Reset ()
 Reverts parameters to their initial state.
 
bool TestFlags (u32 flags) const
 Tests flags. More...
 

Detailed Description

The class for storing the results when community data is created or uploaded.

Member Enumeration Documentation

enum Flags

Flags that can be specified in the TestFlags function.

Enumerator
FLAG_NONE 

This is the state when no flags are specified.

FLAG_WITH_TITLE_TEXT 

A flag indicating that the community name is included in the community data.

FLAG_WITH_DESCRIPTION_TEXT 

A flag indicating that the community description is included in the community data.

FLAG_WITH_APP_DATA 

A flag indicating that application data is included in the community data.

FLAG_WITH_ICON_DATA 

A flag indicating that icon data is included in the community data.

Member Function Documentation

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 GetAppData 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 GetAppData function.
u32 GetAppDataSize ( void  ) const

Gets the size of the application data.

Returns
Returns the size of the application data.
void GetCommunityCode ( char *  communityCode,
u32  communityCodeMaxLength 
) const

Gets the community code.

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]communityCodeThe buffer for storing the community code.
[in]communityCodeMaxLengthThe length of the buffer that stores the community code, including the terminating null character.
Make sure that you specify a size of at least nn::olv::COMMUNITY_CODE_BUFF_LENGTH.
u32 GetCommunityId ( ) const

Gets the community ID.

Returns
Returns the community ID.
void GetDescriptionText ( wchar_t *  descriptionText,
u32  descriptionTextMaxLength 
) const

Gets the community description.

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

  • If calling the TestFlags function with FLAG_WITH_DESCRIPTION_TEXT specified yields a return value of false.
  • If NULL is specified for the <span class="argument>descriptionText</span> argument. - If a value less than that of <tt>@ref nn::olv::DESCRIPTION_TEXT_BUFF_LENGTH</tt> is specified for the <span class="argument">descriptionTextMaxLength argument.
Parameters
[out]descriptionTextThe buffer for storing the community description.
[in]descriptionTextMaxLengthThe length of the buffer that stores the community description, including the terminating null character.
Make sure that you specify a size of at least nn::olv::DESCRIPTION_TEXT_BUFF_LENGTH.
nn::olv::Result GetIconData ( u8 *  iconData,
u32 *  iconDataSize,
u32  iconDataMaxSize 
) const

Gets icon data.

This function can only be used when the return value from the TestFlags function is true when FLAG_WITH_ICON_DATA is specified.

Parameters
[out]iconDataThe buffer that stores the icon data.
[out]iconDataSizeThe buffer that stores the size of the icon data.
[in]iconDataMaxSizeThe size of the buffer that stores the icon data.
Make sure that you specify a size of at least nn::olv::ICON_DATA_BUFF_LENGTH.
Returns
Returns the result of the operation.
For information about how to handle the results, see the OLV library reference.
u32 GetOwnerPid ( ) const

Gets the principal ID of the user who created the community.

Returns
Returns the principal ID of the user who created the community.
void GetTitleText ( wchar_t *  titleText,
u32  titleTextMaxLength 
) const

Gets the community name.

This function can only be used when the return value from the TestFlags function is true when FLAG_WITH_TITLE_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]titleTextThe buffer for storing the community name.
[in]titleTextMaxLengthThe length of the buffer that stores the community name, including the terminating null character.
Make sure that you specify a size of at least nn::olv::TITLE_TEXT_BUFF_LENGTH.
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: