/[pcsx2_0.9.7]/trunk/3rdparty/wxWidgets/src/common/sckfile.cpp
ViewVC logotype

Contents of /trunk/3rdparty/wxWidgets/src/common/sckfile.cpp

Parent Directory Parent Directory | Revision Log Revision Log


Revision 31 - (show annotations) (download)
Tue Sep 7 03:24:11 2010 UTC (10 years, 2 months ago) by william
File size: 1307 byte(s)
committing r3113 initial commit again...
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/common/sckfile.cpp
3 // Purpose: File protocol
4 // Author: Guilhem Lavaux
5 // Modified by:
6 // Created: 20/07/97
7 // RCS-ID: $Id: sckfile.cpp 43836 2006-12-06 19:20:40Z VZ $
8 // Copyright: (c) 1997, 1998 Guilhem Lavaux
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
11
12 // For compilers that support precompilation, includes "wx.h".
13 #include "wx/wxprec.h"
14
15 #ifdef __BORLANDC__
16 #pragma hdrstop
17 #endif
18
19 #if wxUSE_STREAMS && wxUSE_PROTOCOL_FILE
20
21 #ifndef WX_PRECOMP
22 #endif
23
24 #include "wx/uri.h"
25 #include "wx/wfstream.h"
26 #include "wx/protocol/file.h"
27
28 IMPLEMENT_DYNAMIC_CLASS(wxFileProto, wxProtocol)
29 IMPLEMENT_PROTOCOL(wxFileProto, wxT("file"), NULL, false)
30
31 wxFileProto::wxFileProto()
32 : wxProtocol()
33 {
34 m_error = wxPROTO_NOERR;
35 }
36
37 wxFileProto::~wxFileProto()
38 {
39 }
40
41 wxInputStream *wxFileProto::GetInputStream(const wxString& path)
42 {
43 wxFileInputStream *retval = new wxFileInputStream(wxURI::Unescape(path));
44 if ( retval->Ok() )
45 {
46 m_error = wxPROTO_NOERR;
47
48 return retval;
49 }
50
51 m_error = wxPROTO_NOFILE;
52 delete retval;
53
54 return NULL;
55 }
56
57 #endif // wxUSE_STREAMS && wxUSE_PROTOCOL_FILE

  ViewVC Help
Powered by ViewVC 1.1.22