CTR Pia  4.11.3
Game Communication Engine
nn::pia::local::LocalSessionInfo Class Referenceabstract

Data class for local communication sessions. More...

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

Public Member Functions

virtual void Clear ()
 Clears session information.
 
virtual nn::Result GetApplicationDataBuf (void *pBuffer, size_t size)=0
 Gets the session's application-defined data. More...
 
virtual nn::Result GetApplicationDataSize (size_t *pSize)=0
 Gets the length of the session's application-defined data. More...
 
virtual nn::Result GetBssid (bit8 *pBssidBuffer) const =0
 Gets the BSSID (the host's MAC address). More...
 
virtual u32 GetCurrentParticipants () const =0
 Gets the number of people participating in a session. More...
 
virtual u32 GetGameMode () const =0
 Gets the session's game mode. More...
 
virtual u32 GetMaxParticipants () const =0
 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 =0
 Gets the session's ID. More...
 
virtual nn::Result GetSessionStationInfo (session::SessionStationInfo *pSessionStationInfo) const =0
 Gets the information for stations currently participating in sessions. More...
 
virtual bool IsOpened () const =0
 Gets whether a session is open for recruitment. More...
 
virtual void Trace (u64 flag)=0
 Prints information that is useful for debugging. More...
 

Detailed Description

Data class for local communication sessions.

Member Function Documentation

virtual nn::Result nn::pia::local::LocalSessionInfo::GetApplicationDataBuf ( void *  pBuffer,
size_t  size 
)
pure 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.

Implemented in nn::pia::local::UdsSessionInfo.

virtual nn::Result nn::pia::local::LocalSessionInfo::GetApplicationDataSize ( size_t *  pSize)
pure 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.

Implemented in nn::pia::local::UdsSessionInfo.

virtual nn::Result nn::pia::local::LocalSessionInfo::GetBssid ( bit8 *  pBssidBuffer) const
pure 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.

Implemented in nn::pia::local::UdsSessionInfo.

virtual u32 nn::pia::session::ISessionInfo::GetCurrentParticipants ( ) const
pure virtualinherited

Gets the number of people participating in a session.

Returns
Returns the number of people participating in a session.

Implemented in nn::pia::local::UdsSessionInfo, and nn::pia::inet::NexSessionInfo.

virtual u32 nn::pia::session::ISessionInfo::GetGameMode ( ) const
pure virtualinherited

Gets the session's game mode.

Returns a game mode value when Internet communication is ongoing.
During local communications, a communication mode ID is cast as a u32 argument and returned.

Returns
Returns the session's game mode.

Implemented in nn::pia::local::UdsSessionInfo, and nn::pia::inet::NexSessionInfo.

virtual u32 nn::pia::session::ISessionInfo::GetMaxParticipants ( ) const
pure virtualinherited

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.

Implemented in nn::pia::local::UdsSessionInfo, and nn::pia::inet::NexSessionInfo.

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

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
virtual

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::session::ISessionInfo::GetSessionId ( ) const
pure virtualinherited

Gets the session's ID.

Returns
Returns the session ID.

Implemented in nn::pia::local::UdsSessionInfo, and nn::pia::inet::NexSessionInfo.

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

Gets the information for stations currently participating in sessions.

Succeeds only when local communication is ongoing.

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.

Implemented in nn::pia::local::UdsSessionInfo.

virtual bool nn::pia::session::ISessionInfo::IsOpened ( ) const
pure virtualinherited

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.

Implemented in nn::pia::local::UdsSessionInfo, and nn::pia::inet::NexSessionInfo.

virtual void nn::pia::session::ISessionInfo::Trace ( u64  flag)
pure virtualinherited

Prints information that is useful for debugging.

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

Implemented in nn::pia::inet::NexSessionInfo, and nn::pia::local::UdsSessionInfo.