System.Net.URLClient.TURI
Delphi
TURI = record
C++
struct DECLSPEC_DRECORD TURI
{
private:
enum class DECLSPEC_DENUM TEncType : unsigned char { URLEnc, FormEnc };
typedef void __fastcall (__closure *TSchemeDecomposeProc)(const System::UnicodeString AURIStr, int Pos, int Limit, int SlashCount);
private:
System::UnicodeString FScheme;
System::UnicodeString FUsername;
System::UnicodeString FPassword;
System::UnicodeString FHost;
int FPort;
System::UnicodeString FPath;
System::UnicodeString FQuery;
#ifndef _WIN64
System::DynamicArray<TNameValuePair> FParams;
#else /* _WIN64 */
System::TArray__1<TNameValuePair> FParams;
#endif /* _WIN64 */
System::UnicodeString FFragment;
void __fastcall DecomposeBaseScheme(const System::UnicodeString AURIStr, int Pos, int Limit, int SlashCount);
void __fastcall DecomposeNoAuthorityScheme(const System::UnicodeString AURIStr, int Pos, int Limit, int SlashCount);
bool __fastcall IsMailtoScheme();
bool __fastcall IsSchemeNoAuthority();
bool __fastcall IsValidPort();
int __fastcall GetDefaultPort(const System::UnicodeString AScheme);
void __fastcall ParseParams(bool Encode = false);
int __fastcall FindParameterIndex(const System::UnicodeString AName);
TNameValuePair __fastcall GetParameter(const int I);
System::UnicodeString __fastcall GetParameterByName(const System::UnicodeString AName);
void __fastcall SetParameter(const int I, const TNameValuePair &Value);
void __fastcall SetParameterByName(const System::UnicodeString AName, const System::UnicodeString Value);
System::UnicodeString __fastcall GetQuery();
void __fastcall DecomposeURI(const System::UnicodeString AURIStr, bool ARaiseNoSchema);
void __fastcall SetScheme(const System::UnicodeString Value);
void __fastcall SetUserName(const System::UnicodeString Value);
void __fastcall SetPassword(const System::UnicodeString Value);
void __fastcall SetHost(const System::UnicodeString Value);
void __fastcall SetPath(const System::UnicodeString Value);
void __fastcall SetQuery(const System::UnicodeString Value);
#ifndef _WIN64
void __fastcall SetParams(const System::DynamicArray<TNameValuePair> Value);
#else /* _WIN64 */
void __fastcall SetParams(const System::TArray__1<TNameValuePair> Value);
#endif /* _WIN64 */
public:
#define TURI_SCHEME_HTTP L"http"
#define TURI_SCHEME_HTTPS L"https"
#define TURI_SCHEME_MAILTO L"mailto"
#define TURI_SCHEME_NEWS L"news"
#define TURI_SCHEME_TEL L"tel"
#define TURI_SCHEME_URN L"urn"
__fastcall TURI(const System::UnicodeString AURIStr);
System::UnicodeString __fastcall ToString();
#ifndef _WIN64
void __fastcall ComposeURI(const System::UnicodeString AScheme, const System::UnicodeString AUsername, const System::UnicodeString APassword, const System::UnicodeString AHostname, int APort, const System::UnicodeString APath, const System::DynamicArray<TNameValuePair> AParams, const System::UnicodeString AFragment);
#else /* _WIN64 */
void __fastcall ComposeURI(const System::UnicodeString AScheme, const System::UnicodeString AUsername, const System::UnicodeString APassword, const System::UnicodeString AHostname, int APort, const System::UnicodeString APath, const System::TArray__1<TNameValuePair> AParams, const System::UnicodeString AFragment);
#endif /* _WIN64 */
void __fastcall AddParameter(const System::UnicodeString AName, const System::UnicodeString AValue)/* overload */;
void __fastcall AddParameter(const TNameValuePair &AParameter)/* overload */;
void __fastcall DeleteParameter(int AIndex)/* overload */;
void __fastcall DeleteParameter(const System::UnicodeString AName)/* overload */;
static System::UnicodeString __fastcall URLEncode _DEPRECATED_ATTRIBUTE1("Use TNetEncoding.URL.Encode") (const System::UnicodeString AValue, bool SpacesAsPlus = false);
static System::UnicodeString __fastcall URLDecode _DEPRECATED_ATTRIBUTE1("Use TNetEncoding.URL.Decode") (const System::UnicodeString AValue, bool PlusAsSpaces = false);
System::UnicodeString __fastcall Encode();
static System::UnicodeString __fastcall UnicodeToIDNA(const System::UnicodeString AHostName);
static System::UnicodeString __fastcall IDNAToUnicode(const System::UnicodeString AHostName);
static System::UnicodeString __fastcall PathRelativeToAbs(const System::UnicodeString RelPath, const TURI &Base);
static System::UnicodeString __fastcall FixupForREST(const System::UnicodeString AURL);
__property TNameValuePair Parameter[const int I] = {read=GetParameter, write=SetParameter};
__property System::UnicodeString ParameterByName[const System::UnicodeString AName] = {read=GetParameterByName, write=SetParameterByName};
__property System::UnicodeString Scheme = {read=FScheme, write=SetScheme};
__property System::UnicodeString Username = {read=FUsername, write=SetUserName};
__property System::UnicodeString Password = {read=FPassword, write=SetPassword};
__property System::UnicodeString Host = {read=FHost, write=SetHost};
__property int Port = {read=FPort, write=FPort};
__property System::UnicodeString Path = {read=FPath, write=SetPath};
__property System::UnicodeString Query = {read=FQuery, write=SetQuery};
#ifndef _WIN64
__property System::DynamicArray<TNameValuePair> Params = {read=FParams, write=SetParams};
#else /* _WIN64 */
__property System::TArray__1<TNameValuePair> Params = {read=FParams, write=SetParams};
#endif /* _WIN64 */
__property System::UnicodeString Fragment = {read=FFragment, write=FFragment};
TURI() {}
};
Propriétés
Type | Visibilité | Source | Unité | Parent |
---|---|---|---|---|
record struct |
public | System.Net.URLClient.pas System.Net.URLClient.hpp |
System.Net.URLClient | System.Net.URLClient |
Description
Type d'enregistrement pour la composition/décomposition d'un URI à partir de ses différentes parties.
TURI est un type d'enregistrement pour la composition/décomposition d'un URI à partir de ses différentes parties.