CTR Pia  4.11.3
Game Communication Engine
nn::pia::local::UdsSessionInfo Class Reference

Data class for local communication sessions. More...

+ Inheritance diagram for nn::pia::local::UdsSessionInfo:

Public Member Functions

virtual void Clear ()
 Clears session information.
 
void Copy (UdsSessionInfo &rhs)
 Copies session information. More...
 
virtual nn::Result GetApplicationDataBuf (void *pBuffer, size_t size)
 Gets the session's application-defined data. More...
 
virtual nn::Result GetApplicationDataSize (size_t *pSize)
 Gets the length of the session's application-defined data. More...
 
virtual nn::Result GetBssid (bit8 *pBssidBuffer) const
 Gets the BSSID (the host's MAC address). More...
 
virtual u32 GetCurrentParticipants () const
 Gets the number of people participating in a session. More...
 
virtual u32 GetGameMode () const
 Gets the session's game mode. More...
 
virtual u32 GetMaxParticipants () const
 Gets the maximum number of people who can participate in a session. More...
 
virtual u32 GetMinParticipants () const
 Gets the minimum number of people who can participate in a session. More...
 
virtual nn::Result GetRadioStrength (u8 *pRadioStrength) const
 Gets the session's signal strength. More...
 
virtual u32 GetSessionId () const
 Gets the session's ID. More...
 
virtual nn::Result GetSessionStationInfo (session::SessionStationInfo *pSessionStationInfo) const
 Gets the information for stations currently participating in sessions. More...
 
virtual bool IsOpened () const
 Gets whether a session is open for recruitment. More...
 
virtual void Trace (u64 flag)
 Prints information that is useful for debugging. More...
 

Detailed Description

Data class for local communication sessions.

Member Function Documentation

void nn::pia::local::UdsSessionInfo::Copy ( UdsSessionInfo rhs)

Copies session information.

Use this when you want the application to retain session information.

Parameters
[in]rhsSession information to copy.
virtual nn::Result nn::pia::local::UdsSessionInfo::GetApplicationDataBuf ( void *  pBuffer,
size_t  size 
)
virtual

Gets the session's application-defined data.

Gets the beacon data set by the application.

Parameters
[out]pBufferPointer to the buffer for copying the session's application-defined data.
[in]sizeSpecifies the size of the buffer required for copying the session's application-defined data.
Returns
Returns a Result value indicating success if information was successfully obtained.
Error Return Values:

ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Not in a state where data can be retrieved. Programming error. Fix your program so that this error is not returned.

ResultNoData There was no data to get. Handle appropriately in the application.

Implements nn::pia::local::LocalSessionInfo.

virtual nn::Result nn::pia::local::UdsSessionInfo::GetApplicationDataSize ( size_t *  pSize)
virtual

Gets the length of the session's application-defined data.

Parameters
[out]pSizePointer to the container for the length of the session's application-defined data.
Returns
Returns a Result value indicating success if information was successfully obtained.
Error Return Values:

ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Not in a state where data can be retrieved. Programming error. Fix your program so that this error is not returned.

Implements nn::pia::local::LocalSessionInfo.

virtual nn::Result nn::pia::local::UdsSessionInfo::GetBssid ( bit8 *  pBssidBuffer) const
virtual

Gets the BSSID (the host's MAC address).

The size of the BSSID is nn::uds::MAC_ADDRESS_SIZE bytes. Set a buffer of this size in the parameter.

Parameters
[out]pBssidBufferBuffer that stores the BSSID. The size must be nn::uds::MAC_ADDRESS_SIZE bytes.
Returns
Returns a Result value indicating success if information was successfully obtained.
Error Return Values:

ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Not in a state where data can be retrieved. Programming error. Fix your program so that this error is not returned.

Implements nn::pia::local::LocalSessionInfo.

virtual u32 nn::pia::local::UdsSessionInfo::GetCurrentParticipants ( ) const
virtual

Gets the number of people participating in a session.

Returns
Returns the number of people participating in a session.

Implements nn::pia::session::ISessionInfo.

virtual u32 nn::pia::local::UdsSessionInfo::GetGameMode ( ) const
virtual

Gets the session's game mode.

A communication mode ID is cast as a u32 argument and returned.

Returns
Returns the game mode.

Implements nn::pia::session::ISessionInfo.

virtual u32 nn::pia::local::UdsSessionInfo::GetMaxParticipants ( ) const
virtual

Gets the maximum number of people who can participate in a session.

Returns
Returns the maximum number of people who can participate in a session.

Implements nn::pia::session::ISessionInfo.

virtual u32 nn::pia::local::LocalSessionInfo::GetMinParticipants ( ) const
virtualinherited

Gets the minimum number of people who can participate in a session.

Returns
Returns the minimum number of people who can participate in a session.

Implements nn::pia::session::ISessionInfo.

virtual nn::Result nn::pia::local::LocalSessionInfo::GetRadioStrength ( u8 *  pRadioStrength) const
virtualinherited

Gets the session's signal strength.

Parameters
[out]pRadioStrengthPointer to the signal strength container.
Returns
Returns a Result value indicating success if information was successfully obtained.
Error Return Values:

ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Not in a state where data can be retrieved. Programming error. Fix your program so that this error is not returned.

virtual u32 nn::pia::local::UdsSessionInfo::GetSessionId ( ) const
virtual

Gets the session's ID.

Returns
Returns the session ID.

Implements nn::pia::session::ISessionInfo.

virtual nn::Result nn::pia::local::UdsSessionInfo::GetSessionStationInfo ( session::SessionStationInfo pSessionStationInfo) const
virtual

Gets the information for stations currently participating in sessions.

Parameters
[out]pSessionStationInfoSpecifies a pointer to the station information container.
Returns
Returns a Result value indicating success if information was successfully obtained.
Error Return Values:

ResultInvalidArgument Indicates that an argument is invalid. Programming error. Fix your program so that this error is not returned.

ResultInvalidState Not in a state where data can be retrieved. Programming error. Fix your program so that this error is not returned.

ResultNoData Indicates that information could not be obtained. Returned only during local communications. Handle appropriately in the application.

ResultInvalidConnection Indicates that the device entered wireless off mode. You must restart. Returned only during local communications. Perform cleanup.

Implements nn::pia::local::LocalSessionInfo.

virtual bool nn::pia::local::UdsSessionInfo::IsOpened ( ) const
virtual

Gets whether a session is open for recruitment.

Returns
Returns true if the session is open for recruitment, and returns false if it is closed.

Implements nn::pia::session::ISessionInfo.

virtual void nn::pia::local::UdsSessionInfo::Trace ( u64  flag)
virtual

Prints information that is useful for debugging.

Parameters
[in]flagSpecifies the bitwise OR of trace flags. For more information, see the TraceFlag API reference.

Implements nn::pia::session::ISessionInfo.