git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42621
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
enum wxStreamProtocolType
{
enum wxStreamProtocolType
{
- wxSTREAM_PROTOCOL, // wxFileSystem protocol (should be only one)
- wxSTREAM_MIMETYPE, // Mime types the stream handles
- wxSTREAM_ENCODING, // The http Content-Encodings the stream handles
- wxSTREAM_FILEEXTENSION // File extensions the stream handles
+ wxSTREAM_PROTOCOL, // wxFileSystem protocol (should be only one)
+ wxSTREAM_MIMETYPE, // MIME types the stream handles
+ wxSTREAM_ENCODING, // The HTTP Content-Encodings the stream handles
+ wxSTREAM_FILEEXT // File extensions the stream handles
};
void WXDLLIMPEXP_BASE wxUseFilterClasses();
};
void WXDLLIMPEXP_BASE wxUseFilterClasses();
{
size_t len = wxStrlen(location);
{
size_t len = wxStrlen(location);
- for (const wxChar *const *p = GetProtocols(wxSTREAM_FILEEXTENSION);
- p && *p;
- p++)
+ for (const wxChar *const *p = GetProtocols(wxSTREAM_FILEEXT); *p; p++)
{
size_t l = wxStrlen(*p);
{
size_t l = wxStrlen(*p);
bool wxFilterClassFactoryBase::CanHandle(const wxChar *protocol,
wxStreamProtocolType type) const
{
bool wxFilterClassFactoryBase::CanHandle(const wxChar *protocol,
wxStreamProtocolType type) const
{
- if (type == wxSTREAM_FILEEXTENSION)
+ if (type == wxSTREAM_FILEEXT)
return FindExtension(protocol) != wxString::npos;
else
return FindExtension(protocol) != wxString::npos;
else
- for (const wxChar *const *p = GetProtocols(type); p && *p; p++)
+ for (const wxChar *const *p = GetProtocols(type); *p; p++)
if (wxStrcmp(*p, protocol) == 0)
return true;
if (wxStrcmp(*p, protocol) == 0)
return true;
static const wxChar *empty[] = { NULL };
switch (type) {
static const wxChar *empty[] = { NULL };
switch (type) {
- case wxSTREAM_PROTOCOL: return protocols;
- case wxSTREAM_MIMETYPE: return mimetypes;
- case wxSTREAM_FILEEXTENSION: return fileexts;
- default: return empty;
+ case wxSTREAM_PROTOCOL: return protocols;
+ case wxSTREAM_MIMETYPE: return mimetypes;
+ case wxSTREAM_FILEEXT: return fileexts;
+ default: return empty;
static const wxChar *empty[] = { NULL };
switch (type) {
static const wxChar *empty[] = { NULL };
switch (type) {
- case wxSTREAM_PROTOCOL: return protocols;
- case wxSTREAM_MIMETYPE: return mimetypes;
- case wxSTREAM_FILEEXTENSION: return fileexts;
- default: return empty;
+ case wxSTREAM_PROTOCOL: return protocols;
+ case wxSTREAM_MIMETYPE: return mimetypes;
+ case wxSTREAM_FILEEXT: return fileexts;
+ default: return empty;
{ NULL };
switch (type) {
{ NULL };
switch (type) {
- case wxSTREAM_PROTOCOL: return protos;
- case wxSTREAM_MIMETYPE: return mimes;
- case wxSTREAM_ENCODING: return encs;
- case wxSTREAM_FILEEXTENSION: return exts;
- default: return empty;
+ case wxSTREAM_PROTOCOL: return protos;
+ case wxSTREAM_MIMETYPE: return mimes;
+ case wxSTREAM_ENCODING: return encs;
+ case wxSTREAM_FILEEXT: return exts;
+ default: return empty;