Logo ROOT   6.10/09
Reference Guide
TGHtmlUri.h
Go to the documentation of this file.
1 // @(#)root/guihtml:$Id: TObject.h 20877 2007-11-19 11:17:07Z rdm $
2 // Author: Valeriy Onuchin 03/05/2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2001, Rene Brun, Fons Rademakers and Reiner Rohlfs *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 /**************************************************************************
13 
14  HTML widget for xclass. Based on tkhtml 1.28
15  Copyright (C) 1997-2000 D. Richard Hipp <drh@acm.org>
16  Copyright (C) 2002-2003 Hector Peraza.
17 
18  This library is free software; you can redistribute it and/or
19  modify it under the terms of the GNU Library General Public
20  License as published by the Free Software Foundation; either
21  version 2 of the License, or (at your option) any later version.
22 
23  This library is distributed in the hope that it will be useful,
24  but WITHOUT ANY WARRANTY; without even the implied warranty of
25  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
26  Library General Public License for more details.
27 
28  You should have received a copy of the GNU Library General Public
29  License along with this library; if not, write to the Free
30  Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
31 
32 **************************************************************************/
33 
34 #ifndef ROOT_TGHtmlUri
35 #define ROOT_TGHtmlUri
36 
37 #include "TObject.h"
38 
39 #define URI_SCHEME_MASK (1<<0)
40 #define URI_AUTH_MASK (1<<1)
41 #define URI_PATH_MASK (1<<2)
42 #define URI_QUERY_MASK (1<<3)
43 #define URI_FRAGMENT_MASK (1<<4)
44 
45 #define URI_FULL_MASK (URI_SCHEME_MASK | URI_AUTH_MASK | \
46  URI_PATH_MASK | URI_QUERY_MASK | \
47  URI_FRAGMENT_MASK)
48 
49 //----------------------------------------------------------------------
50 // A parsed URI is held in an instance of the following class.
51 //
52 // The examples are from the URI
53 // http://192.168.1.1:8080/cgi-bin/printenv?name=xyzzy&addr=none#frag
54 
55 class TGHtmlUri : public TObject {
56 private:
57  TGHtmlUri(const TGHtmlUri&); // Not implemented.
58  TGHtmlUri &operator=(const TGHtmlUri&); // Not implemented.
59 
60 public:
61  TGHtmlUri(const char *zUri = 0);
62  TGHtmlUri(const TGHtmlUri *uri);
63  virtual ~TGHtmlUri();
64 
65  char *BuildUri();
66  int EqualsUri(const TGHtmlUri *uri, int field_mask = URI_FULL_MASK);
67 
68 public:
69  int ComponentLength(const char *z, const char *zInit, const char *zTerm);
70 
71  char *fZScheme; // Ex: "http"
72  char *fZAuthority; // Ex: "192.168.1.1:8080"
73  char *fZPath; // Ex: "cgi-bin/printenv"
74  char *fZQuery; // Ex: "name=xyzzy&addr=none"
75  char *fZFragment; // Ex: "frag"
76 };
77 
78 #endif // ROOT_TGHtmlUri
int EqualsUri(const TGHtmlUri *uri, int field_mask=URI_FULL_MASK)
Compare another uri with given field mask.
Definition: TGHtmlUri.cxx:120
char * fZPath
Definition: TGHtmlUri.h:73
#define URI_FULL_MASK
Definition: TGHtmlUri.h:45
char * fZQuery
Definition: TGHtmlUri.h:74
char * fZFragment
Definition: TGHtmlUri.h:75
char * fZScheme
Definition: TGHtmlUri.h:71
int ComponentLength(const char *z, const char *zInit, const char *zTerm)
Return the length of the next component of the URL in z[] given that the component starts at z[0]...
Definition: TGHtmlUri.cxx:183
char * fZAuthority
Definition: TGHtmlUri.h:72
Mother of all ROOT objects.
Definition: TObject.h:37
you should not use this method at all Int_t Int_t z
Definition: TRolke.cxx:630
char * BuildUri()
Create a string to hold the given URI.
Definition: TGHtmlUri.cxx:204
virtual ~TGHtmlUri()
Html uri destructor.
Definition: TGHtmlUri.cxx:108
TGHtmlUri & operator=(const TGHtmlUri &)
TGHtmlUri(const TGHtmlUri &)