1 /* 2 * Copyright (c) 2014, 2018, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 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 void reactivateAnotherInstance(); 67 virtual bool IsMainThread(); 68 virtual TPlatformNumber GetMemorySize(); 69 70 virtual std::map<TString, TString> GetKeys(); 71 72 #ifdef DEBUG 73 virtual bool IsNativeDebuggerPresent(); 74 virtual int GetProcessID(); 75 #endif // DEBUG 76 }; 77 78 79 #endif // MACPLATFORM_H 80 81 #endif // MAC