nn::friends::CTR::Login Function

Syntax

Result Login(
     os::Event * pEvent
);

Arguments

Name Description
in pEvent Specifies a pointer to nn::os::Event, which signals that asynchronous processing is complete. Initialize this ahead of time using the nn::os::Event::Initialize function.

Return Values

Returns the result of the operation.

Value Description
Result::IsSuccess Successfully started asynchronous processing.
ResultAcNotConnected No connection request has been sent to ac.
ResultInvalidPointer Invalid pointer passed as argument.
ResultInvalidHandle Invalid nn::os::Event handle passed as argument.
ResultNotInitialized The friend presence library is not initialized.
Other Another result may be returned, depending on the internal state of the daemon and other factors.

Description

Requests a login to the server.

If this function returns successfully asynchronous processing begins. The event nn::os::Event specified in the argument is signaled when asynchronous processing completes. Call the nn::friends::CTR::GetLastResponseResult function to get the result of the asynchronous operation. If this function fails, no asynchronous processing occurs.

You must call nn::ac::Connect or nn::ac::ConnectAsyncbefore calling this function to establish a connection with an access point. This function returns a value of nn::friends::ResultAcNotConnected if it is called while a connection has not been established with an access point.

This function also succeeds if it is called when the local host is already logged in. In such cases, the asynchronous processing instantly completes successfully.

The local host is definitely online when the asynchronous processing succeeds.

Revision History

2011/03/22
Removed the description of results that are no longer returned because of code reorganization for version 2.1.
2011/03/11
Added the ConnectAsync function to AC.
Added specific examples of return values.
2010/08/16
Initial version.

CONFIDENTIAL