API:System.Tether.AppProfile.TTetheringAppProfile.Connect
Delphi
function Connect(const AProfile: TTetheringProfileInfo; const AProtocolType: TTetheringProtocolType = ''; const AnAdapterType: TTetheringAdapterType = ''): Boolean; override;
C++
virtual bool __fastcall Connect(const System::Tether::Manager::TTetheringProfileInfo &AProfile, const System::UnicodeString AProtocolType = System::UnicodeString(), const System::UnicodeString AnAdapterType = System::UnicodeString());
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
function | public | System.Tether.AppProfile.pas System.Tether.AppProfile.hpp |
System.Tether.AppProfile | TTetheringAppProfile |
Description
Etablit une connexion entre votre profil et le profil distant spécifié.
System.Tether.AppProfile.TTetheringAppProfile.Connect hérite de System.Tether.Manager.TTetheringProfile.Connect. Tout le contenu en-dessous de cette ligne se réfère à System.Tether.Manager.TTetheringProfile.Connect.
Etablit une connexion entre votre profil et le profil distant spécifié.
Vous pouvez spécifier un type spécifique de protocole (AProtocolType
) et d'adaptateur (AnAdapterType
) pour la connexion. Sinon, la connexion peut utiliser l'une des connexions permises de AProfile
.
Si la connexion fonctionne déjà, Connect la redémarre.
Implémentation de Connect
Connect est une méthode abstraite. Vous devez implémenter Connect dans les sous-classes de TTetheringProfile.
Les implémentations de Connect doivent renvoyer True
si la connexion réussit ou False
si la connexion échoue.
Si la connexion réussit, les implémentations de Connect doivent aussi ajouter AProfile
à la liste des profils distants connectés.
Voir aussi
- System.Tether.Manager.TTetheringProfileInfo
- System.Tether.Manager.TTetheringProfileInfo.AllowedConnections
- System.Tether.Manager.TTetheringProtocolType
- System.Tether.Manager.TTetheringAdapterType