System.Tether.AppProfile.TTetheringAppProfile.Connect

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

function Connect(const AProfile: TTetheringProfileInfo; const AProtocolType: TTetheringProtocolType = '';
const AnAdapterType: TTetheringAdapterType = ''): Boolean; overload; override;
function Connect(const AProfile: TTetheringProfileInfo; ATimeout: Integer; const AProtocolType: TTetheringProtocolType = '';
const AnAdapterType: TTetheringAdapterType = ''): Boolean; overload; override;

C++

virtual bool __fastcall Connect(const System::Tether::Manager::TTetheringProfileInfo &AProfile, const System::UnicodeString AProtocolType = System::UnicodeString(), const System::UnicodeString AnAdapterType = System::UnicodeString())/* overload */;
virtual bool __fastcall Connect(const System::Tether::Manager::TTetheringProfileInfo &AProfile, int ATimeout, const System::UnicodeString AProtocolType = System::UnicodeString(), const System::UnicodeString AnAdapterType = System::UnicodeString())/* overload */;

Properties

Type Visibility Source Unit Parent
function public
System.Tether.AppProfile.pas
System.Tether.AppProfile.hpp
System.Tether.AppProfile TTetheringAppProfile

Description

Establishes a connection to the specified remote profile or restarts an existing connection.

Connect loads or updates the collections of Actions and Resources, and refreshes item subscriptions due to matching profile groups.

In addition to the remote profile to connect to (AProfile), you may optionally specify a type of protocol (AProtocolType) and a type of adapter (AnAdapterType) to use for the connection.

See Connecting to Remote Applications Using App Tethering.

Exceptions

A call to Connect may raise any of the following exceptions:

Exception Exception.Message Scenarios

ETetheringException

No available connections to <profile identifier>

You need to add a protocol and an adapter connecting to <profile identifier>

  • You specified a value for either AProtocolType or AProtocolAdapter, but not for both. You must either:
    • Leave both parameters undefined, so that Connect returns the first connection available regardless of its protocol type and adapter type.
    • Specify both AProtocolType and AProtocolAdapter to indicate a specific combination of protocol type and adapter type.

Can't find resource list for profile <profile identifier>

  • The serialized resource list from AProfile sent unexpected data. This may happen if the remote profile (AProfile) is not compatible with your local profile.

Can't connect to profile <profile identifier>

See Also