IRTCClient2::put_AnswerMode

The put_AnswerMode method sets the answer mode for a session type. This controls if an incoming call will be automatically answered, automatically rejected, or if it will be notified to the application to make the decision. This method sets the answer mode that is retrieved by IRTCClient2::get_AnswerMode.

HRESULT put_AnswerMode(RTC_SESSION_TYPEenType,
RTC_ANSWER_MODEenMode);

Parameters

  • enType
    [in] An RTC_SESSION_TYPE enumeration specifying the session type for which to set the answer mode.
  • enMode
    [in] An RTC_ANSWER_MODE enumeration specifying the answer mode to set.

Return Values

RTC methods may return an RTC_E_ constant.

Value Meaning
RTC_CLIENT_NOT_INITIALIZED The client object has not been initialized.
RTC_E_NOT_ALLOWED The IRTCClient::put_ListenForIncomingSessions or IRTCClient::get_ListenForIncomingSessions method has already been called.
RTC_E_INVALID_SESSION_TYPE The session type is not valid for this operation.
E_INVALIDARG The enumeration value is not valid.

Remarks

The put_AnswerMode method should be called after calling IRTCClient2::put_AllowedPorts. If put_AnswerMode is called after the listen mode has been set by calling the IRTCClient::put_ListenForIncomingSessions method, or after calling IRTCClient::get_ListenForIncomingSessions, the RTC Client API will return an RTC_E_NOT_ALLOWED error.

Requirements

Redistributable: Requires Rtcdll.dll on Windows 2000, Windows XP, and Windows Server 2003.
Header: Declared in Rtccore.h.
Library: Included as a resource in Rtcdll.dll.
GUID: IID_IRTCClient2 is defined as 0C91D71D-1064-42da-BFA5-572BEB8EEA84.

See Also

IRTCClient2, IRTCClient, IRTCClient2::get_AnswerMode