mirror of
https://github.com/baldurk/renderdoc.git
synced 2026-08-25 16:06:31 +00:00
Add an abstracted interface around android-specific handling
* This makes it easier to use the same kind of interface to manage other kinds of devices.
This commit is contained in:
@@ -93,6 +93,9 @@ public:
|
||||
)");
|
||||
void SetLastCapturePath(const rdcstr &path);
|
||||
|
||||
DOCUMENT(
|
||||
"The :class:`DeviceProtocolController` for this host, or ``None`` if no protocol is in use");
|
||||
IDeviceProtocolController *Protocol() const { return m_protocol; }
|
||||
DOCUMENT(R"(
|
||||
Returns the name to display for this host in the UI, either :meth:`FriendlyName` if it is valid, or
|
||||
:meth:`Hostname` if not.
|
||||
@@ -102,12 +105,6 @@ Returns the name to display for this host in the UI, either :meth:`FriendlyName`
|
||||
rdcstr friendlyName = FriendlyName();
|
||||
return !friendlyName.isEmpty() ? friendlyName : m_hostname;
|
||||
}
|
||||
DOCUMENT("Returns ``True`` if this host represents a connected ADB (Android) device.");
|
||||
bool IsADB() const
|
||||
{
|
||||
return m_hostname.count() > 4 && m_hostname[0] == 'a' && m_hostname[1] == 'd' &&
|
||||
m_hostname[2] == 'b' && m_hostname[3] == ':';
|
||||
}
|
||||
DOCUMENT("Returns ``True`` if this host represents the special localhost device.");
|
||||
bool IsLocalhost() const { return m_hostname == "localhost"; }
|
||||
DOCUMENT("Returns ``True`` if this host represents a valid remote host.");
|
||||
@@ -117,6 +114,8 @@ private:
|
||||
// are created with it
|
||||
rdcstr m_hostname;
|
||||
|
||||
IDeviceProtocolController *m_protocol = NULL;
|
||||
|
||||
// self-deleting shared and locked data store
|
||||
RemoteHostData *m_data = NULL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user