Warning, file /include/root/TUri.h was not indexed
or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TUri
0013 #define ROOT_TUri
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027 #include "TObject.h"
0028 #include "TString.h"
0029
0030
0031 class TUri;
0032 Bool_t operator==(const TUri &u1, const TUri &u2);
0033
0034
0035 class TUri : public TObject {
0036
0037 friend Bool_t operator==(const TUri &u1, const TUri &u2);
0038
0039 private:
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055 TString fScheme;
0056 TString fUserinfo;
0057 TString fHost;
0058 TString fPort;
0059 TString fPath;
0060 TString fQuery;
0061 TString fFragment;
0062
0063 Bool_t fHasScheme;
0064 Bool_t fHasUserinfo;
0065 Bool_t fHasHost;
0066 Bool_t fHasPort;
0067 Bool_t fHasPath;
0068 Bool_t fHasQuery;
0069 Bool_t fHasFragment;
0070
0071 public:
0072 TUri(const TUri &uri);
0073 TUri() { Reset(); }
0074 TUri(const TString &uri);
0075 TUri(const char *uri);
0076 TUri &operator=(const TUri &rhs);
0077 virtual ~TUri() { }
0078
0079 const TString GetUri() const;
0080 const TString GetScheme() const { return fScheme; }
0081 const TString GetHierPart() const;
0082 const TString GetRelativePart() const;
0083 const TString GetAuthority() const;
0084 const TString GetUserInfo() const { return fUserinfo; }
0085 const TString GetHost() const { return fHost; }
0086 const TString GetPort() const { return fPort; }
0087 const TString GetPath() const { return fPath; }
0088 const TString GetQuery() const { return fQuery; }
0089 const TString GetFragment() const { return fFragment; }
0090
0091 Bool_t HasScheme() const { return fHasScheme; }
0092 Bool_t HasHierPart() const { return IsHierPart(GetHierPart()); }
0093 Bool_t HasAuthority() const { return fHasHost; }
0094 Bool_t HasUserInfo() const { return fHasUserinfo; }
0095 Bool_t HasHost() const { return fHasHost; }
0096 Bool_t HasPort() const { return fHasPort; }
0097 Bool_t HasPath() const { return fHasPath; }
0098 Bool_t HasQuery() const { return fHasQuery; }
0099 Bool_t HasFragment() const { return fHasFragment; }
0100 Bool_t HasRelativePart() const { return IsRelativePart(GetRelativePart()); }
0101
0102 Bool_t SetUri(const TString &uri);
0103 Bool_t SetScheme(const TString &scheme);
0104 Bool_t SetHierPart(const TString &hier);
0105 Bool_t SetAuthority(const TString &authority);
0106 Bool_t SetUserInfo(const TString &userinfo);
0107 Bool_t SetHost(const TString &host);
0108 Bool_t SetPort(const TString &port);
0109 Bool_t SetPath(const TString &path);
0110 Bool_t SetQuery(const TString &path);
0111 Bool_t SetFragment(const TString &fragment);
0112
0113 Bool_t SetRelativePart(const TString&);
0114
0115 void Print(Option_t *option = "") const override;
0116 Bool_t IsSortable() const override { return kTRUE; }
0117
0118 void Normalise();
0119 void Reset();
0120
0121 Bool_t IsAbsolute() const;
0122 Bool_t IsRelative() const;
0123 Bool_t IsUri() const;
0124 Bool_t IsReference() const;
0125
0126 static Bool_t IsUnreserved(const TString &string);
0127
0128 static const TString PctEncode(const TString &source);
0129 static const TString PctDecode(const TString &source);
0130 static const TString PctDecodeUnreserved(const TString &source);
0131 static const TString PctNormalise(const TString &source);
0132
0133 static Bool_t IsScheme(const TString&);
0134 static Bool_t IsHierPart(const TString&);
0135 static Bool_t IsAuthority(const TString&);
0136 static Bool_t IsUserInfo(const TString&);
0137 static Bool_t IsHost(const TString&);
0138 static Bool_t IsIpv4(const TString&);
0139 static Bool_t IsRegName(const TString&);
0140 static Bool_t IsPort(const TString&);
0141 static Bool_t IsPath(const TString&);
0142 static Bool_t IsPathAbsolute(const TString&);
0143 static Bool_t IsPathAbempty(const TString&);
0144 static Bool_t IsPathNoscheme(const TString&);
0145 static Bool_t IsPathRootless(const TString&);
0146 static Bool_t IsPathEmpty(const TString&);
0147 static Bool_t IsQuery(const TString&);
0148 static Bool_t IsFragment(const TString&);
0149
0150 static Bool_t IsRelativePart(const TString&);
0151
0152 static const TString RemoveDotSegments(const TString&);
0153
0154 static TUri Transform(const TUri &reference, const TUri &base);
0155 static const TString MergePaths(const TUri &reference, const TUri &base);
0156
0157 ClassDefOverride(TUri, 1)
0158 };
0159
0160 #endif