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

Syntax

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

Arguments

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
ResultSuccess Process succeeded.
ResultStateBusy The halt process occurred but did not enter the halted state.
A value other than the above. 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.
To stop safely, first use GetCecState to confirm that the current state is not DAEMON_STATE_COMMUNICATING or DAEMON_STATE_BUSY, then stop communication.

In order 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, but by calling StopScanning(b_Immediate = false) beforehand, 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 stop status after exiting this function, such as when this function is called multiple times and cancels are issued.
Be aware that even if 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