/////////////////////////////////////////////////////////////////////////////
-// Name:        palmos/utils.cpp
+// Name:        src/palmos/utils.cpp
 // Purpose:     Various utilities
-// Author:      William Osborne
-// Modified by:
+// Author:      William Osborne - minimal working wxPalmOS port
+// Modified by: Wlodzimierz ABX Skiba - real functionality
 // Created:     10/13/04
-// RCS-ID:      $Id:
-// Copyright:   (c) William Osborne
+// RCS-ID:      $Id$
+// Copyright:   (c) William Osborne, Wlodzimierz Skiba
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
     #include "wx/app.h"
     #include "wx/intl.h"
     #include "wx/log.h"
+    #include "wx/timer.h"
 #endif  //WX_PRECOMP
 
 #include "wx/apptrait.h"
 #include "wx/dynload.h"
 #include "wx/confbase.h"
-#include "wx/timer.h"
+#include "wx/power.h"
 
 #include <MemoryMgr.h>
 #include <DLServer.h>
 #include <SoundMgr.h>
+#include <SysUtils.h>
 
 // ============================================================================
 // implementation
         return false;
     }
 
-    wxStrncpy (buf, wxConvertMB2WX(id), maxSize - 1);
+    wxStrncpy (buf, wxSafeConvertMB2WX(id), maxSize - 1);
 
     // free the buffer
     MemPtrUnlock(id);
     return NULL;
 }
 
-bool wxDirExists(const wxString& dir)
-{
-    return false;
-}
-
-bool wxGetDiskSpace(const wxString& path, wxLongLong *pTotal, wxLongLong *pFree)
+bool wxGetDiskSpace(const wxString& path, wxDiskspaceSize_t *pTotal, wxDiskspaceSize_t *pFree)
 {
     return false;
 }
     return false;
 }
 
+bool wxUnsetEnv(const wxString& var)
+{
+    return false;
+}
+
 // ----------------------------------------------------------------------------
 // process management
 // ----------------------------------------------------------------------------
     return false;
 }
 
+// ----------------------------------------------------------------------------
+// power management
+// ----------------------------------------------------------------------------
+
+wxPowerType wxGetPowerType()
+{
+    return wxPOWER_BATTERY;
+}
+
+wxBatteryState wxGetBatteryState()
+{
+    // TODO
+    return wxBATTERY_UNKNOWN_STATE;
+}
+
 // ----------------------------------------------------------------------------
 // misc
 // ----------------------------------------------------------------------------
     SndPlaySystemSound(sndWarning);
 }
 
+bool wxIsPlatform64Bit()
+{
+    return false;
+}
+
 wxString wxGetOsDescription()
 {
     wxString strOS = _T("PalmOS");
     if(version)
     {
         wxString str = wxString::FromAscii(version);
+        MemPtrFree(version);
         if(!str.empty())
         {
             strOS << _(" ") << str;
     return strOS;
 }
 
-wxToolkitInfo& wxAppTraits::GetToolkitInfo()
+wxOperatingSystemId wxGetOsVersion(int *verMaj, int *verMin)
 {
-    static wxToolkitInfo info;
-    info.name = _T("wxBase");
-    return info;
+    // TODO
+
+    return wxOS_UNKNOWN;
 }
 
 // ----------------------------------------------------------------------------
 }
 
 #endif // wxUSE_FONTMAP/!wxUSE_FONTMAP
-