summaryrefslogtreecommitdiff
path: root/examples/detect.c
diff options
context:
space:
mode:
authorLinus Walleij <triad@df.lth.se>2006-06-13 15:22:12 +0000
committerLinus Walleij <triad@df.lth.se>2006-06-13 15:22:12 +0000
commit124016423ff2a6cedcca0e1b27af9e08027bf6c4 (patch)
tree45d435c8a1c3a953ecc2ffc976bba7231333e788 /examples/detect.c
parent05ccbe74c745fac06f52b2ca91c913de07edf9cb (diff)
downloadlibmtp-124016423ff2a6cedcca0e1b27af9e08027bf6c4.tar.gz
Latest things
Diffstat (limited to 'examples/detect.c')
-rw-r--r--examples/detect.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/examples/detect.c b/examples/detect.c
index e018fa3..a7ab345 100644
--- a/examples/detect.c
+++ b/examples/detect.c
@@ -43,6 +43,8 @@ int main (int argc, char **argv)
char *storage_description;
char *volume_label;
char *owner;
+ char *sectime;
+ char *devcert;
uint8_t maxbattlevel;
uint8_t currbattlevel;
int ret;
@@ -120,6 +122,20 @@ int main (int argc, char **argv)
printf(" Error getting battery info...\n");
}
+ // Secure time XML fragment
+ ret = LIBMTP_Get_Secure_Time(device, &sectime);
+ if (ret == 0 && sectime != NULL) {
+ printf("\nSecure Time:\n%s\n", sectime);
+ free(sectime);
+ }
+
+ // Device certificate XML fragment
+ ret = LIBMTP_Get_Device_Certificate(device, &devcert);
+ if (ret == 0 && devcert != NULL) {
+ printf("\nDevice Certificate:\n%s\n", devcert);
+ free(devcert);
+ }
+
// Try to get device info XML file...
files = LIBMTP_Get_Filelisting(device);
if (files != NULL) {