diff options
author | tedbullock <tedbullock> | 2007-03-03 23:20:12 +0000 |
---|---|---|
committer | tedbullock <tedbullock> | 2007-03-03 23:20:12 +0000 |
commit | 848009b99300d6dbf4ced291dd765f0e90266952 (patch) | |
tree | 1f72dc92d045237cfe893eab399c3cd544c3aecb /examples/detect.c | |
parent | bb3e193ce2ba4513ee05946d435261fe3bd744c3 (diff) | |
download | libmtp-848009b99300d6dbf4ced291dd765f0e90266952.tar.gz |
New API function to retrieve the number of devices in a list of connected devices
Diffstat (limited to 'examples/detect.c')
-rw-r--r-- | examples/detect.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/examples/detect.c b/examples/detect.c index fc28b25..9c7633f 100644 --- a/examples/detect.c +++ b/examples/detect.c @@ -69,6 +69,7 @@ int main (int argc, char **argv) uint16_t filetypes_len; uint8_t maxbattlevel; uint8_t currbattlevel; + uint32_t numdevices; int ret; int probeonly = 0; @@ -116,8 +117,8 @@ int main (int argc, char **argv) /* Successfully connected at least one device, so continue */ case LIBMTP_ERROR_NONE: - fprintf(stdout, "Detect: Successfully connected\n"); - fflush(stdout); + numdevices = LIBMTP_Number_Devices_In_List(device); + fprintf(stdout, "Detect: Successfully connected %u devices\n", numdevices); } /* iterate through connected MTP devices */ |