home *** CD-ROM | disk | FTP | other *** search
- #if !defined(AFX_URL_H__E9B68BF0_52E8_11D1_AF0A_0000C0003048__INCLUDED_)
- #define AFX_URL_H__E9B68BF0_52E8_11D1_AF0A_0000C0003048__INCLUDED_
-
- #if _MSC_VER >= 1000
- #pragma once
- #endif // _MSC_VER >= 1000
- // URL.h : header file
- //
-
- /////////////////////////////////////////////////////////////////////////////
- // CURL command target
-
- #define SEPCHAR '\\'
-
- #define URL_NOERROR 0 //net_loc exists
- #define URL_EMPTY 1 //empty url
- #define URL_INVALID -1 //parsing error
-
- #define SCHEME_UNKNOWN 0
- #define SCHEME_FILE 1
- #define SCHEME_HTTP 2
-
- class CURL : public CObject
- {
- // Attributes
- public:
-
- // Operations
- public:
- CURL();
- CURL(int aurltype, CString ascheme, CString anet_loc, CString apath, CString aparams, CString aquery, CString afragment);
- virtual ~CURL();
-
- // Overrides
- public:
- void parse(LPCSTR url);
- void getname(CString & name);
- void getdir(CString & dir);
- void topath(CString & res);
- LPCSTR relbuild(CString &relurl);
- CURL(LPCSTR url);
- CURL * expand(CURL *base);
- LPCSTR build(CString& url);
-
- int urltype;
- int schemetype;
- CString fragment;
- CString params;
- CString query;
- CString path;
- CString net_loc;
- CString scheme;
- // ClassWizard generated virtual function overrides
- //{{AFX_VIRTUAL(CURL)
- //}}AFX_VIRTUAL
-
- // Generated message map functions
- //{{AFX_MSG(CURL)
- // NOTE - the ClassWizard will add and remove member functions here.
- //}}AFX_MSG
-
- // Implementation
- protected:
- private:
- LPCSTR nextsegment(LPCSTR s);
- LPCSTR prevsegment(LPCSTR base, LPCSTR s);
- int abs_path(LPCSTR s, LPCSTR & spath, LPCSTR & sparams, LPCSTR & squery);
- int rel_path(LPCSTR s, LPCSTR &spath, LPCSTR &sparams, LPCSTR &squery);
- void setschemetype();
- };
-
- /////////////////////////////////////////////////////////////////////////////
-
- //{{AFX_INSERT_LOCATION}}
- // Microsoft Developer Studio will insert additional declarations immediately before the previous line.
-
- #endif // !defined(AFX_URL_H__E9B68BF0_52E8_11D1_AF0A_0000C0003048__INCLUDED_)
-
-