llurl.h

Go to the documentation of this file.
00001 
00032 #ifndef LL_LLURL_H
00033 #define LL_LLURL_H
00034 
00035 // splits a URL into its parts, which are:
00036 //
00037 //  [URI][AUTHORITY][PATH][FILENAME][EXTENSION][TAG]
00038 //
00039 //  e.g. http://www.lindenlab.com/early/bite_me.html#where
00040 //
00041 //  URI=       "http"
00042 //  AUTHORITY= "www.lindenlab.com"
00043 //  PATH=      "/early/"
00044 //  FILENAME=  "bite_me"
00045 //  EXTENSION= "html"
00046 //  TAG=       "where"
00047 //
00048 //
00049 // test cases:
00050 //
00051 // http://www.lindenlab.com/early/bite_me.html#where
00052 // http://www.lindenlab.com/
00053 // http://www.lindenlab.com
00054 // www.lindenlab.com             ?
00055 // early/bite_me.html#where
00056 // mailto://test@lindenlab.com
00057 // mailto:test@lindenlab.com
00058 //
00059 //
00060 
00061 
00062 class LLURL
00063 {
00064 public:
00065         LLURL();
00066         LLURL(const LLURL &url);
00067         LLURL(const char * url);
00068 
00069         LLURL &operator=(const LLURL &rhs);
00070 
00071         virtual ~LLURL();
00072 
00073         virtual void init (const char * url);
00074         virtual void free ();
00075 
00076         bool operator==(const LLURL &rhs) const;
00077         bool operator!=(const LLURL &rhs) const;
00078 
00079         virtual const char *getFQURL() const;
00080         virtual const char *getFullPath();
00081 
00082         virtual const char *updateRelativePath(const LLURL &url);
00083 
00084         virtual BOOL  isExtension(const char *compare) {return (!strcmp(mExtension,compare));};
00085 
00086 public: 
00087         
00088         char        mURI[LL_MAX_PATH];          /* Flawfinder: ignore */
00089         char        mAuthority[LL_MAX_PATH];            /* Flawfinder: ignore */
00090         char        mPath[LL_MAX_PATH];         /* Flawfinder: ignore */
00091         char        mFilename[LL_MAX_PATH];             /* Flawfinder: ignore */
00092         char        mExtension[LL_MAX_PATH];            /* Flawfinder: ignore */
00093         char        mTag[LL_MAX_PATH];          /* Flawfinder: ignore */
00094 
00095         static char sReturnString[LL_MAX_PATH];         /* Flawfinder: ignore */
00096 };
00097 
00098 #endif  // LL_LLURL_H
00099 

Generated on Thu Jul 1 06:09:24 2010 for Second Life Viewer by  doxygen 1.4.7