ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 #ifndef ROOT_TObject
38 #include "TObject.h"
39 #endif
40 
41 #define URI_SCHEME_MASK (1<<0)
42 #define URI_AUTH_MASK (1<<1)
43 #define URI_PATH_MASK (1<<2)
44 #define URI_QUERY_MASK (1<<3)
45 #define URI_FRAGMENT_MASK (1<<4)
46 
47 #define URI_FULL_MASK (URI_SCHEME_MASK | URI_AUTH_MASK | \
48  URI_PATH_MASK | URI_QUERY_MASK | \
49  URI_FRAGMENT_MASK)
50 
51 //----------------------------------------------------------------------
52 // A parsed URI is held in an instance of the following class.
53 //
54 // The examples are from the URI
55 // http://192.168.1.1:8080/cgi-bin/printenv?name=xyzzy&addr=none#frag
56 
57 class TGHtmlUri : public TObject {
58 private:
59  TGHtmlUri(const TGHtmlUri&); // Not implemented.
60  TGHtmlUri &operator=(const TGHtmlUri&); // Not implemented.
61 
62 public:
63  TGHtmlUri(const char *zUri = 0);
64  TGHtmlUri(const TGHtmlUri *uri);
65  virtual ~TGHtmlUri();
66 
67  char *BuildUri();
68  int EqualsUri(const TGHtmlUri *uri, int field_mask = URI_FULL_MASK);
69 
70 public:
71  int ComponentLength(const char *z, const char *zInit, const char *zTerm);
72 
73  char *fZScheme; // Ex: "http"
74  char *fZAuthority; // Ex: "192.168.1.1:8080"
75  char *fZPath; // Ex: "cgi-bin/printenv"
76  char *fZQuery; // Ex: "name=xyzzy&addr=none"
77  char *fZFragment; // Ex: "frag"
78 };
79 
80 #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:75
#define URI_FULL_MASK
Definition: TGHtmlUri.h:47
char * fZQuery
Definition: TGHtmlUri.h:76
char * fZFragment
Definition: TGHtmlUri.h:77
char * fZScheme
Definition: TGHtmlUri.h:73
Float_t z[5]
Definition: Ifit.C:16
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:74
Mother of all ROOT objects.
Definition: TObject.h:58
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 &)