1 //===-- SBPlatform.h --------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef LLDB_SBPlatform_h_
11 #define LLDB_SBPlatform_h_
13 #include "lldb/API/SBDefines.h"
15 struct PlatformConnectOptions;
16 struct PlatformShellCommand;
20 class SBPlatformConnectOptions
23 SBPlatformConnectOptions (const char *url);
25 SBPlatformConnectOptions (const SBPlatformConnectOptions &rhs);
27 ~SBPlatformConnectOptions ();
30 operator=(const SBPlatformConnectOptions &rhs);
36 SetURL(const char *url);
42 EnableRsync (const char *options,
43 const char *remote_path_prefix,
44 bool omit_remote_hostname);
50 GetLocalCacheDirectory();
53 SetLocalCacheDirectory(const char *path);
55 PlatformConnectOptions *m_opaque_ptr;
58 class SBPlatformShellCommand
61 SBPlatformShellCommand (const char *shell_command);
63 SBPlatformShellCommand (const SBPlatformShellCommand &rhs);
65 ~SBPlatformShellCommand();
74 SetCommand(const char *shell_command);
77 GetWorkingDirectory ();
80 SetWorkingDirectory (const char *path);
86 SetTimeoutSeconds (uint32_t sec);
98 friend class SBPlatform;
100 PlatformShellCommand *m_opaque_ptr;
109 SBPlatform (const char *platform_name);
120 GetWorkingDirectory();
123 SetWorkingDirectory(const char *path);
129 ConnectRemote (SBPlatformConnectOptions &connect_options);
137 //----------------------------------------------------------------------
138 // The following functions will work if the platform is connected
139 //----------------------------------------------------------------------
153 GetOSMajorVersion ();
156 GetOSMinorVersion ();
159 GetOSUpdateVersion ();
162 Put (SBFileSpec &src, SBFileSpec &dst);
165 Get (SBFileSpec &src, SBFileSpec &dst);
168 Install (SBFileSpec& src, SBFileSpec& dst);
171 Run (SBPlatformShellCommand &shell_command);
174 MakeDirectory (const char *path, uint32_t file_permissions = eFilePermissionsDirectoryDefault);
177 GetFilePermissions (const char *path);
180 SetFilePermissions (const char *path, uint32_t file_permissions);
184 friend class SBDebugger;
185 friend class SBTarget;
191 SetSP (const lldb::PlatformSP& platform_sp);
193 lldb::PlatformSP m_opaque_sp;
198 #endif // LLDB_SBPlatform_h_