System.Tether.AppProfile.TTetheringAppProfile.Connect
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 |
---|---|---|
No available connections to <profile identifier> |
| |
You need to add a protocol and an adapter connecting to <profile identifier> |
| |
Can't find resource list for profile <profile identifier> |
| |
Can't connect to profile <profile identifier> |
See Also
- System.Tether.Manager.TTetheringProfileInfo
- System.Tether.Manager.TTetheringProtocolType
- System.Tether.Manager.TTetheringAdapterType
- System.Tether.AppProfile.TTetheringAppProfile.Actions
- System.Tether.AppProfile.TTetheringAppProfile.Resources
- System.Tether.Manager.TTetheringProfile.Group
- MediaPlayer sample
- PhotoWall sample