/////////////////////////////////////////////////////////////////////////////
-// Name: mac/mimetype.cpp
+// Name: src/msdos/mimetype.cpp
// Purpose: classes and functions to manage MIME types
// Author: Vadim Zeitlin
// Modified by:
// Licence: wxWindows licence (part of wxExtra library)
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "mimetype.h"
-#endif
-
// for compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
#ifdef __BORLANDC__
- #pragma hdrstop
+ #pragma hdrstop
#endif
-#ifndef WX_PRECOMP
- #include "wx/defs.h"
-#endif
+#if wxUSE_MIMETYPE
+
+#include "wx/msdos/mimetype.h"
#ifndef WX_PRECOMP
- #include "wx/string.h"
- #if wxUSE_GUI
- #include "wx/icon.h"
- #endif
+ #include "wx/dynarray.h"
+ #include "wx/string.h"
+ #include "wx/intl.h"
+ #include "wx/log.h"
+ #if wxUSE_GUI
+ #include "wx/icon.h"
+ #endif
#endif //WX_PRECOMP
-#if wxUSE_MIMETYPE
-
-#include "wx/log.h"
#include "wx/file.h"
-#include "wx/intl.h"
-#include "wx/dynarray.h"
#include "wx/confbase.h"
-#include "wx/msdos/mimetype.h"
-
// other standard headers
#include <ctype.h>
// in case we're compiling in non-GUI mode
class WXDLLEXPORT wxIcon;
-bool wxFileTypeImpl::SetCommand(const wxString& cmd, const wxString& verb, bool overwriteprompt)
+bool wxFileTypeImpl::SetCommand(const wxString& WXUNUSED(cmd),
+ const wxString& WXUNUSED(verb),
+ bool WXUNUSED(overwriteprompt))
{
- return FALSE;
+ return false;
}
-bool wxFileTypeImpl::SetDefaultIcon(const wxString& strIcon, int index)
+bool wxFileTypeImpl::SetDefaultIcon(const wxString& WXUNUSED(strIcon),
+ int WXUNUSED(index))
{
- return FALSE;
+ return false;
}
-bool wxFileTypeImpl::GetCommand(wxString *command, const char *verb) const
+bool wxFileTypeImpl::GetCommand(wxString *WXUNUSED(command),
+ const char *WXUNUSED(verb)) const
{
- return FALSE;
+ return false;
}
-// @@ this function is half implemented
-bool wxFileTypeImpl::GetExtensions(wxArrayString& extensions)
+bool wxFileTypeImpl::GetExtensions(wxArrayString& WXUNUSED(extensions))
{
- return FALSE;
+ return false;
}
bool wxFileTypeImpl::GetMimeType(wxString *mimeType) const
{
- if ( m_strFileType.Length() > 0 )
+ if ( !m_strFileType.empty() )
{
*mimeType = m_strFileType ;
- return TRUE ;
+ return true ;
}
else
- return FALSE;
+ return false;
}
bool wxFileTypeImpl::GetMimeTypes(wxArrayString& mimeTypes) const
{
wxString s;
-
+
if (GetMimeType(&s))
{
mimeTypes.Clear();
mimeTypes.Add(s);
- return TRUE;
+ return true;
}
- else
- return FALSE;
+ else
+ return false;
}
bool wxFileTypeImpl::GetIcon(wxIconLocation *WXUNUSED(icon)) const
{
// no such file type or no value or incorrect icon entry
- return FALSE;
+ return false;
}
-bool wxFileTypeImpl::GetDescription(wxString *desc) const
+bool wxFileTypeImpl::GetDescription(wxString *WXUNUSED(desc)) const
{
- return FALSE;
+ return false;
}
size_t
-wxFileTypeImpl::GetAllCommands(wxArrayString * verbs, wxArrayString * commands,
- const wxFileType::MessageParameters& params) const
+wxFileTypeImpl::GetAllCommands(wxArrayString * WXUNUSED(verbs),
+ wxArrayString * WXUNUSED(commands),
+ const wxFileType::MessageParameters& WXUNUSED(params)) const
{
- wxFAIL_MSG( _T("wxFileTypeImpl::GetAllCommands() not yet implemented") );
+ wxFAIL_MSG( wxT("wxFileTypeImpl::GetAllCommands() not yet implemented") );
return 0;
}
void
-wxMimeTypesManagerImpl::Initialize(int mailcapStyles, const wxString& extraDir)
+wxMimeTypesManagerImpl::Initialize(int WXUNUSED(mailcapStyles),
+ const wxString& WXUNUSED(extraDir))
{
- wxFAIL_MSG( _T("wxMimeTypesManagerImpl::Initialize() not yet implemented") );
+ wxFAIL_MSG( wxT("wxMimeTypesManagerImpl::Initialize() not yet implemented") );
}
void
wxMimeTypesManagerImpl::ClearData()
{
- wxFAIL_MSG( _T("wxMimeTypesManagerImpl::ClearData() not yet implemented") );
+ wxFAIL_MSG( wxT("wxMimeTypesManagerImpl::ClearData() not yet implemented") );
}
// extension -> file type
// MIME type -> extension -> file type
wxFileType *
-wxMimeTypesManagerImpl::GetFileTypeFromMimeType(const wxString& mimeType)
+wxMimeTypesManagerImpl::GetFileTypeFromMimeType(const wxString& WXUNUSED(mimeType))
{
return NULL;
}
-size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& mimetypes)
+size_t wxMimeTypesManagerImpl::EnumAllFileTypes(wxArrayString& WXUNUSED(mimetypes))
{
// VZ: don't know anything about this for Mac
- wxFAIL_MSG( _T("wxMimeTypesManagerImpl::EnumAllFileTypes() not yet implemented") );
+ wxFAIL_MSG( wxT("wxMimeTypesManagerImpl::EnumAllFileTypes() not yet implemented") );
return 0;
}
wxFileType *
-wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& ftInfo)
+wxMimeTypesManagerImpl::Associate(const wxFileTypeInfo& WXUNUSED(ftInfo))
{
- wxFAIL_MSG( _T("wxMimeTypesManagerImpl::Associate() not yet implemented") );
+ wxFAIL_MSG( wxT("wxMimeTypesManagerImpl::Associate() not yet implemented") );
return NULL;
}
bool
-wxMimeTypesManagerImpl::Unassociate(wxFileType *ft)
+wxMimeTypesManagerImpl::Unassociate(wxFileType *WXUNUSED(ft))
{
- return FALSE;
+ return false;
}
#endif // wxUSE_MIMETYPE