1 //===-- PlatformAndroid.h ---------------------------------------*- C++ -*-===// 2 // 3 // The LLVM Compiler Infrastructure 4 // 5 // This file is distributed under the University of Illinois Open Source 6 // License. See LICENSE.TXT for details. 7 // 8 //===----------------------------------------------------------------------===// 9 10 #ifndef liblldb_PlatformAndroid_h_ 11 #define liblldb_PlatformAndroid_h_ 12 13 // C Includes 14 // C++ Includes 15 16 #include <string> 17 18 // Other libraries and framework includes 19 // Project includes 20 #include "Plugins/Platform/Linux/PlatformLinux.h" 21 22 namespace lldb_private { 23 namespace platform_android { 24 25 class PlatformAndroid : public platform_linux::PlatformLinux 26 { 27 public: 28 static void 29 Initialize (); 30 31 static void 32 Terminate (); 33 34 PlatformAndroid (bool is_host); 35 36 virtual 37 ~PlatformAndroid(); 38 39 //------------------------------------------------------------ 40 // lldb_private::PluginInterface functions 41 //------------------------------------------------------------ 42 static lldb::PlatformSP 43 CreateInstance (bool force, const ArchSpec *arch); 44 45 static ConstString 46 GetPluginNameStatic (bool is_host); 47 48 static const char * 49 GetPluginDescriptionStatic (bool is_host); 50 51 ConstString 52 GetPluginName() override; 53 54 uint32_t 55 GetPluginVersion() override 56 { 57 return 1; 58 } 59 60 //------------------------------------------------------------ 61 // lldb_private::Platform functions 62 //------------------------------------------------------------ 63 64 Error 65 ConnectRemote (Args& args) override; 66 67 Error 68 GetFile (const FileSpec& source, 69 const FileSpec& destination) override; 70 71 Error 72 PutFile (const FileSpec& source, 73 const FileSpec& destination, 74 uint32_t uid = UINT32_MAX, 75 uint32_t gid = UINT32_MAX) override; 76 77 protected: 78 const char * 79 GetCacheHostname () override; 80 81 Error 82 DownloadModuleSlice (const FileSpec &src_file_spec, 83 const uint64_t src_offset, 84 const uint64_t src_size, 85 const FileSpec &dst_file_spec) override; 86 87 private: 88 std::string m_device_id; 89 DISALLOW_COPY_AND_ASSIGN (PlatformAndroid); 90 }; 91 92 } // namespace platofor_android 93 } // namespace lldb_private 94 95 #endif // liblldb_PlatformAndroid_h_ 96