nn::cec::CTR::CecControl::StopScanning Member Function

Syntax

static nn::Result StopScanning(
     bool b_Immediate = false,
     bool b_Async = false
);

Parameters

Name Description
in b_Immediate When true is set, the saving of the data being transmitted is also cancelled and stopped.
in b_Async When true is set, returns immediately.

Return Values

nn::Result

Value Description
Result::IsSuccess Process succeeded.
ResultStateBusy The halt process occurred but did not enter the halted state.
A value other than the above. Process failed.

Description

Manually halts StreetPass (CEC) operations.

If communications are in progress, the communications are interrupted and changed to stopped (IDLE) status.
Be aware that background communication might be interrupted.
If this function is called when the state obtainable by GetCecState is DAEMON_STATE_COMMUNICATING or DAEMON_STATE_BUSY, the communication or save process may be interrupted.



To access a message box, communications must be in the stopped state. Because the MessageBox::OpenMessageBox function calls StopScanning(b_Immediate = true) you do not need to be aware of this issue when stopping. By calling StopScanning(b_Immediate = false) beforehand, however, you can wait for communication to stop without interrupting any in-progress data saves.

When b_Async is set to true, there is a possibility that it will not enter IDLE status after exiting this function, such as when this function is called multiple times and cancels are issued.
Be aware that even if MessageBox::WriteMessage or similar functions are called after this function is called, an error might be generated because it is in the BUSY state.

Revision History

2010/08/16
Initial version.

CONFIDENTIAL