mirror of
https://github.com/Genymobile/scrcpy.git
synced 2026-04-21 01:33:36 +00:00
Add a parser of `adb device -l` output, to extract a list of devices with their serial, state and model. PR #3005 <https://github.com/Genymobile/scrcpy/pull/3005>
31 lines
686 B
C
31 lines
686 B
C
#ifndef SC_ADB_PARSER_H
|
|
#define SC_ADB_PARSER_H
|
|
|
|
#include "common.h"
|
|
|
|
#include <stddef.h>
|
|
|
|
#include "adb_device.h"
|
|
|
|
/**
|
|
* Parse the available devices from the output of `adb devices`
|
|
*
|
|
* The parameter must be a NUL-terminated string.
|
|
*
|
|
* Warning: this function modifies the buffer for optimization purposes.
|
|
*/
|
|
ssize_t
|
|
sc_adb_parse_devices(char *str, struct sc_adb_device *devices,
|
|
size_t devices_len);
|
|
|
|
/**
|
|
* Parse the ip from the output of `adb shell ip route`
|
|
*
|
|
* The parameter must be a NUL-terminated string.
|
|
*
|
|
* Warning: this function modifies the buffer for optimization purposes.
|
|
*/
|
|
char *
|
|
sc_adb_parse_device_ip_from_output(char *str);
|
|
|
|
#endif
|