xrootd
XrdClientUrlInfo.hh
Go to the documentation of this file.
1 #ifndef _XRC_URLINFO_H
2 #define _XRC_URLINFO_H
3 /******************************************************************************/
4 /* */
5 /* X r d C l i e n t U r l I n f o . h h */
6 /* */
7 /* Author: Fabrizio Furano (INFN Padova, 2004) */
8 /* Adapted from TXNetFile (root.cern.ch) originally done by */
9 /* Alvise Dorigo, Fabrizio Furano, INFN Padova, 2003 */
10 /* Revised by G. Ganis, CERN, June 2005 */
11 /* */
12 /* This file is part of the XRootD software suite. */
13 /* */
14 /* XRootD is free software: you can redistribute it and/or modify it under */
15 /* the terms of the GNU Lesser General Public License as published by the */
16 /* Free Software Foundation, either version 3 of the License, or (at your */
17 /* option) any later version. */
18 /* */
19 /* XRootD is distributed in the hope that it will be useful, but WITHOUT */
20 /* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */
21 /* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public */
22 /* License for more details. */
23 /* */
24 /* You should have received a copy of the GNU Lesser General Public License */
25 /* along with XRootD in a file called COPYING.LESSER (LGPL license) and file */
26 /* COPYING (GPL license). If not, see <http://www.gnu.org/licenses/>. */
27 /* */
28 /* The copyright holder's institutional names and contributor's names may not */
29 /* be used to endorse or promote products derived from this software without */
30 /* specific prior written permission of the institution or contributor. */
31 /******************************************************************************/
32 
34 // //
35 // Class handling information about an url //
36 // The purpose of this class is to allow: //
37 // - parsing a string url into its components //
38 // - reading/writing the single components //
39 // - reading the modified full url //
40 // //
42 
43 #include "XrdOuc/XrdOucString.hh"
44 
45 //
46 // The information an url may contain
47 // Plus utilities for parsing and rebuilding an url
48 //
49 
51  public:
56  int Port;
60 
61  void Clear();
62  void TakeUrl(XrdOucString url);
64 
65  XrdClientUrlInfo(const char *url);
66  XrdClientUrlInfo(const XrdOucString &url);
69 
70  void SetAddrFromHost();
71 
72  inline bool IsValid() { return (Port >= 0); }
73 
76 };
77 #endif
void TakeUrl(XrdOucString url)
int Port
Definition: XrdClientUrlInfo.hh:56
XrdOucString HostWPort
Definition: XrdClientUrlInfo.hh:58
Definition: XrdClientUrlInfo.hh:50
bool IsValid()
Definition: XrdClientUrlInfo.hh:72
XrdOucString File
Definition: XrdClientUrlInfo.hh:59
XrdOucString Proto
Definition: XrdClientUrlInfo.hh:52
XrdOucString Passwd
Definition: XrdClientUrlInfo.hh:53
XrdOucString User
Definition: XrdClientUrlInfo.hh:54
XrdOucString GetUrl()
XrdClientUrlInfo & operator=(const XrdOucString &url)
void SetAddrFromHost()
Definition: XrdOucString.hh:254
XrdOucString Host
Definition: XrdClientUrlInfo.hh:55
XrdOucString HostAddr
Definition: XrdClientUrlInfo.hh:57