CTR Pia  4.11.3
Game Communication Engine
nn::pia::inet::NexUpdateSessionSetting Class Reference

Base class that manages information specific to updating session conditions. More...

+ Inheritance diagram for nn::pia::inet::NexUpdateSessionSetting:

Public Member Functions

 NexUpdateSessionSetting ()
 The default constructor.
 
virtual ~NexUpdateSessionSetting ()
 The destructor.
 
nn::Result GetApplicationData (u8 *pDataBuf, size_t *pDataSize, size_t dataBufSize) const
 Gets specified application-defined data. More...
 
u32 GetAttribute (u32 index) const
 Gets the specified attribute. More...
 
const wchar_t * GetDescription () const
 Gets the specified description string. More...
 
u16 GetMaxParticipants () const
 Gets the maximum number of participants. More...
 
u16 GetMinParticipants () const
 Gets the specified minimum number of participants. More...
 
SessionType GetSessionType () const
 Gets the specified session type. More...
 
nn::Result SetApplicationData (const u8 *pData, size_t size)
 Sets application-defined data. More...
 
void SetAttributes (u32 attributes[nn::pia::inet::ATTRIBUTE_MAX_SIZE])
 Sets attributes for the session. More...
 
void SetDescription (const wchar_t *description)
 Specifies the description string for the session. More...
 
void SetDisconnectionRate (u32 disconnectionRate)
 Updates the disconnection rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetMaxParticipants (u16 max)
 Sets the maximum number of participants for the session. More...
 
void SetMinParticipants (u16 min)
 Sets the minimum number of participants for the session. More...
 
void SetNintendoCountryCode (u32 countryCode)
 Updates the country code to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetOpenParticipation (bool isOpen)
 Sets whether participation in this session is possible. More...
 
void SetRatingValue (u32 ratingValue)
 Updates the rating value to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetSelectionPriority (u8 priority)
 Specifies the matchmaking priority when a session with the same requirements is found. More...
 
void SetSessionType (SessionType sessionType)
 Specifies the session type for the session. More...
 
void SetSessionUserPassword (const wchar_t *pUserPassword, size_t passwordLength)
 Sets the user password. More...
 
void SetUpdateGeoIp (bool b)
 Sets the IP address to use for getting a distance over the Internet during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 
void SetViolationRate (u32 violationRate)
 Updates the violation rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED. More...
 

Detailed Description

Base class that manages information specific to updating session conditions.

Only the settings of the value specified for the update are updated. No specification is needed for settings that are not being updated.


Revision History:

2015-03-20 Added APIs to set parameters for scored matchmaking.

2014-01-21 Initial version.

Member Function Documentation

nn::Result nn::pia::inet::NexUpdateSessionSetting::GetApplicationData ( u8 *  pDataBuf,
size_t *  pDataSize,
size_t  dataBufSize 
) const

Gets specified application-defined data.

Parameters
[in]pDataBufSpecifies a pointer to a buffer from which to copy the specified application-defined data.
[in]pDataSizeSpecifies the size of the data written to the copy buffer.
[in]dataBufSizeSpecifies the copy buffer size.
Returns
Returns a Result value indicating success if the application-defined data is acquired successfully.
Error Return Values:

nn::pia::ResultInvalidArgument Indicates that either the buffer pointer is NULL or the pointer returned by the copied size is NULL. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultInvalidState Indicates that no application-defined data is set. Programming error. Fix your program so that this error is not returned.

nn::pia::ResultBufferShortage Indicates that the set application-defined data cannot be copied because it is greater in size than the buffer. Programming error. Fix your program so that this error is not returned.

u32 nn::pia::inet::NexUpdateSessionSetting::GetAttribute ( u32  index) const

Gets the specified attribute.

Parameters
[in]indexSpecifies the index for the attribute to get.
Returns
Returns the specified attribute value.
const wchar_t* nn::pia::inet::NexUpdateSessionSetting::GetDescription ( ) const

Gets the specified description string.

Returns
Returns the specified description string.
u16 nn::pia::inet::NexUpdateSessionSetting::GetMaxParticipants ( ) const

Gets the maximum number of participants.

Returns
Returns the maximum number of participants.
u16 nn::pia::inet::NexUpdateSessionSetting::GetMinParticipants ( ) const

Gets the specified minimum number of participants.

Returns
Returns the minimum number of participants.
SessionType nn::pia::inet::NexUpdateSessionSetting::GetSessionType ( ) const

Gets the specified session type.

Returns
Returns the specified session type.
nn::Result nn::pia::inet::NexUpdateSessionSetting::SetApplicationData ( const u8 *  pData,
size_t  size 
)

Sets application-defined data.

Specify a size that does not exceed inet::APPLICATION_DATA_BUFFER_MAX_SIZE.

Parameters
[in]pDataSpecifies a pointer to the buffer for the application-defined data for the session.
[in]sizeSpecifies the size of the application-defined data for the session.
Returns
Returns a Result value indicating success if the application-defined data is set successfully.
Error Return Values:
nn::pia::ResultInvalidArgument Indicates that either the buffer pointer was NULL or the specified data size was too big. Programming error. Fix your program so that this error is not returned.
void nn::pia::inet::NexUpdateSessionSetting::SetAttributes ( u32  attributes[nn::pia::inet::ATTRIBUTE_MAX_SIZE])

Sets attributes for the session.

Parameters
[in]attributesSpecifies an array of attributes.
void nn::pia::inet::NexUpdateSessionSetting::SetDescription ( const wchar_t *  description)

Specifies the description string for the session.

Parameters
[in]descriptionThe description string.
void nn::pia::inet::NexUpdateSessionSetting::SetDisconnectionRate ( u32  disconnectionRate)

Updates the disconnection rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

We recommend using NEX's MatchmakeReferee feature.

Parameters
[in]disconnectionRateSpecifies the disconnection rate.
void nn::pia::inet::NexUpdateSessionSetting::SetMaxParticipants ( u16  max)

Sets the maximum number of participants for the session.

Parameters
[in]maxSpecifies the maximum number of participants for the new session.
void nn::pia::inet::NexUpdateSessionSetting::SetMinParticipants ( u16  min)

Sets the minimum number of participants for the session.

Parameters
[in]minSpecifies the minimum number of participants for the new session.
void nn::pia::inet::NexUpdateSessionSetting::SetNintendoCountryCode ( u32  countryCode)

Updates the country code to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

Sets the country code to use when you have configured to not use location information with UseGeoIP() or when you have configured to use that location information but it was not available. The specified country code is not used when location information is available. When a country code is not set, and when you have configured to not use location information with UseGeoIP() or when you have configured to use that location information but it was not available, the default value is used as the score for comparing country codes.

Parameters
[in]countryCodeSpecifies the country code.
void nn::pia::inet::NexUpdateSessionSetting::SetOpenParticipation ( bool  isOpen)

Sets whether participation in this session is possible.

Specifies whether the session can be joined.

Parameters
[in]isOpenSpecifies whether the session updated by this NexUpdateSessionSetting function is joinable. Set to true to enable.
void nn::pia::inet::NexUpdateSessionSetting::SetRatingValue ( u32  ratingValue)

Updates the rating value to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

Parameters
[in]ratingValueSpecifies the rating value.
void nn::pia::inet::NexUpdateSessionSetting::SetSelectionPriority ( u8  priority)

Specifies the matchmaking priority when a session with the same requirements is found.

Specifies the matchmaking priority for the new session. Enabled only when searches are performed with nn::pia::inet::SELECTION_METHOD_BROADEN_RANGE_WITH_SELECTION_PRIORITY and nn::pia::inet::SELECTION_METHOD_SCORE_BASED. If a value that exceeds nn::pia::inet::SESSION_MAX_SELECTION_PRIORITY is provided as an argument, nn::pia::inet::SESSION_MAX_SELECTION_PRIORITY is set instead.

Parameters
[in]prioritySpecifies the matchmaking priority.
void nn::pia::inet::NexUpdateSessionSetting::SetSessionType ( SessionType  sessionType)

Specifies the session type for the session.

Updates are only possible from inet::SESSION_TYPE_FRIEND to inet::SESSION_TYPE_ANYBODY.

Parameters
[in]sessionTypeSpecifies the session type.
void nn::pia::inet::NexUpdateSessionSetting::SetSessionUserPassword ( const wchar_t *  pUserPassword,
size_t  passwordLength 
)

Sets the user password.

Specifies the session's user password for the session.

Parameters
[in]pUserPasswordSpecifies the user password.
[in]passwordLengthSpecifies the string length of the user password.
void nn::pia::inet::NexUpdateSessionSetting::SetUpdateGeoIp ( bool  b)

Sets the IP address to use for getting a distance over the Internet during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

Parameters
[in]bSpecifies whether to update GeoIp.
void nn::pia::inet::NexUpdateSessionSetting::SetViolationRate ( u32  violationRate)

Updates the violation rate to use for comparison during nn::pia::inet::SELECTION_METHOD_SCORE_BASED.

We recommend using NEX's MatchmakeReferee feature.

Parameters
[in]violationRateSpecifies the violation rate.