6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 #include "Platform.h" 27 28 #ifdef MAC 29 30 #ifndef MACPLATFORM_H 31 #define MACPLATFORM_H 32 33 #include "GenericPlatform.h" 34 #include "PosixPlatform.h" 35 36 37 class MacPlatform : virtual public Platform, GenericPlatform, PosixPlatform { 38 private: 39 bool UsePListForConfigFile(); 40 41 protected: 42 virtual TString getTmpDirString(); 43 44 public: 45 MacPlatform(void); 46 virtual ~MacPlatform(void); 47 48 public: 49 virtual void ShowMessage(TString title, TString description); 50 virtual void ShowMessage(TString description); 51 52 virtual TCHAR* ConvertStringToFileSystemString( 53 TCHAR* Source, bool &release); 54 virtual TCHAR* ConvertFileSystemStringToString( 55 TCHAR* Source, bool &release); 56 57 virtual void SetCurrentDirectory(TString Value); 58 virtual TString GetPackageRootDirectory(); 59 virtual TString GetAppDataDirectory(); 60 virtual TString GetBundledJVMLibraryFileName(TString RuntimePath); 61 virtual TString GetAppName(); 62 63 virtual ISectionalPropertyContainer* GetConfigFile(TString FileName); 64 virtual TString GetModuleFileName(); 65 66 virtual bool IsMainThread(); 67 virtual TPlatformNumber GetMemorySize(); 68 69 virtual std::map<TString, TString> GetKeys(); 70 71 #ifdef DEBUG 72 virtual bool IsNativeDebuggerPresent(); 73 virtual int GetProcessID(); 74 #endif // DEBUG 75 }; 76 77 78 #endif // MACPLATFORM_H 79 80 #endif // MAC | 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. Oracle designates this 8 * particular file as subject to the "Classpath" exception as provided 9 * by Oracle in the LICENSE file that accompanied this code. 10 * 11 * This code is distributed in the hope that it will be useful, but WITHOUT 12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 14 * version 2 for more details (a copy is included in the LICENSE file that 15 * accompanied this code). 16 * 17 * You should have received a copy of the GNU General Public License version 18 * 2 along with this work; if not, write to the Free Software Foundation, 19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20 * 21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 22 * or visit www.oracle.com if you need additional information or have any 23 * questions. 24 */ 25 26 #ifndef MACPLATFORM_H 27 #define MACPLATFORM_H 28 29 #include "Platform.h" 30 #include "PosixPlatform.h" 31 32 class MacPlatform : virtual public Platform, PosixPlatform { 33 private: 34 bool UsePListForConfigFile(); 35 36 protected: 37 virtual TString getTmpDirString(); 38 39 public: 40 MacPlatform(void); 41 virtual ~MacPlatform(void); 42 43 public: 44 virtual void ShowMessage(TString title, TString description); 45 virtual void ShowMessage(TString description); 46 47 virtual TCHAR* ConvertStringToFileSystemString( 48 TCHAR* Source, bool &release); 49 virtual TCHAR* ConvertFileSystemStringToString( 50 TCHAR* Source, bool &release); 51 52 virtual void SetCurrentDirectory(TString Value); 53 virtual TString GetPackageRootDirectory(); 54 virtual TString GetAppDataDirectory(); 55 virtual TString GetBundledJVMLibraryFileName(TString RuntimePath); 56 virtual TString GetAppName(); 57 58 TString GetPackageAppDirectory(); 59 TString GetPackageLauncherDirectory(); 60 TString GetPackageRuntimeBinDirectory(); 61 62 virtual ISectionalPropertyContainer* GetConfigFile(TString FileName); 63 virtual TString GetModuleFileName(); 64 65 virtual bool IsMainThread(); 66 virtual TPlatformNumber GetMemorySize(); 67 68 virtual std::map<TString, TString> GetKeys(); 69 }; 70 71 72 #endif // MACPLATFORM_H |