次の方法で共有


IRTCClientProvisioning::EnableProfile (Windows Embedded CE 6.0)

1/6/2010

This method enables a profile for use in server registration and automatic profile selection.

Syntax

HRESULT EnableProfile(
  IRTCProfile* pProfile,
  long lRegisterFlags
);

Parameters

  • pProfile
    [in] Pointer to the profile object that is enabled.
  • lRegisterFlags
    [in] RTCRF_ constants used to specify the types of sessions that the profile should be registered for on the server.

    A value of zero will enable a profile without registering it.

    To disable registration, set this value to zero.

Return Value

This method can return an RTC_E_ constant.

The following table shows an additional possible return value.

Value Meaning

E_INVALIDARG

Invalid register flags.

Remarks

The application should have only one PC-to-PC profile if it is using presence.

The first enabled PC-to-PC profile is the default presence profile for operations involving the presence store, as well as the IRTCClientPresence::AddBuddy method.

When enabling the default profile, the RTCRF_REGISTER_PRESENCE flag must be used to allow incoming watchers to be routed to the client. After the profile is enabled, the IRTCClientPresence::EnablePresence method can be called to enable the presence store.

Enabled profiles show up in the profile list retrieved by IRTCClientProvisioning::EnumerateProfiles and IRTCClientProvisioning::Profiles. They are also available to be selected for use by IRTCClient::CreateSession and IRTCClientPresence::AddBuddy.

If lRegisterFlags specifies flags, and the profile contains information about a SIP registrar server, registration occurs.

To trigger deregistration, the profile can be disabled with IRTCClientProvisioning::DisableProfile or enabled again with the lRegisterFlags parameter set to zero.

The status of registration and deregistration is notified with RTCE_REGISTRATION_STATE_CHANGE events.

If a profile is enabled with the same key value as an existing enabled profile, the existing profile is disabled and replaced by the new profile.

For information about provisioning, see the RTC Client API XML Schema.

Ee499876.security(en-US,WinEmbedded.60).gifSecurity Note:
This method can send data over the network in unencrypted form. Therefore, someone eavesdropping on the network could read the data. Before using this method in an unencrypted session, consider the security risk of sending the data in clear text. An RTC session can be encrypted by specifying TLS in the profile used for the session. In addition, the application can use the RTCLM_NONE enumeration value of RTC_LISTEN_MODE to set the listen mode to disallow both static and dynamic.

Requirements

Header rtccore.h, rtccore.idl
Library uuid.lib
Windows Embedded CE Windows CE .NET 4.0 and later

See Also

Reference

IRTCClientProvisioning
RTC Client API XML Schema
IRTCClient::CreateSession
IRTCClientPresence::AddBuddy
IRTCClientPresence::EnablePresence
IRTCClientProvisioning::DisableProfile
IRTCClientProvisioning::EnumerateProfiles
IRTCClientProvisioning::Profiles
IRTCProfile