1999-07-07 22:04:58 +00:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: fs_inet.h
|
|
|
|
// Purpose: HTTP and FTP file system
|
|
|
|
// Author: Vaclav Slavik
|
|
|
|
// Copyright: (c) 1999 Vaclav Slavik
|
|
|
|
// Licence: wxWindows Licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
|
|
|
REMARKS :
|
|
|
|
|
|
|
|
This FS creates local cache (in /tmp directory). The cache is freed
|
|
|
|
on program exit.
|
|
|
|
|
|
|
|
Size of cache is limited to cca 1000 items (due to GetTempFileName
|
|
|
|
limitation)
|
|
|
|
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifdef __GNUG__
|
|
|
|
#pragma implementation
|
|
|
|
#endif
|
|
|
|
|
1999-08-20 22:52:21 +00:00
|
|
|
#include "wx/wxprec.h"
|
1999-07-07 22:04:58 +00:00
|
|
|
|
|
|
|
#ifdef __BORDLANDC__
|
|
|
|
#pragma hdrstop
|
|
|
|
#endif
|
|
|
|
|
1999-07-29 19:52:37 +00:00
|
|
|
#if wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
|
|
|
|
|
1999-07-07 22:04:58 +00:00
|
|
|
#ifndef WXPRECOMP
|
1999-08-20 22:52:21 +00:00
|
|
|
#include "wx/wx.h"
|
1999-07-07 22:04:58 +00:00
|
|
|
#endif
|
|
|
|
|
1999-08-20 22:52:21 +00:00
|
|
|
#include "wx/filesys.h"
|
1999-07-07 22:04:58 +00:00
|
|
|
|
|
|
|
|
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
// wxInternetFSHandler
|
|
|
|
//--------------------------------------------------------------------------------
|
|
|
|
|
1999-08-03 23:56:34 +00:00
|
|
|
class WXDLLEXPORT wxInternetFSHandler : public wxFileSystemHandler
|
1999-07-07 22:04:58 +00:00
|
|
|
{
|
|
|
|
private:
|
|
|
|
wxHashTable m_Cache;
|
|
|
|
|
|
|
|
public:
|
|
|
|
virtual bool CanOpen(const wxString& location);
|
|
|
|
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
|
|
|
|
~wxInternetFSHandler();
|
|
|
|
};
|
|
|
|
|
1999-07-29 19:52:37 +00:00
|
|
|
#endif
|
|
|
|
// wxUSE_FS_INET && wxUSE_STREAMS && wxUSE_SOCKETS
|
1999-07-07 22:04:58 +00:00
|
|
|
|