Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(668)

Side by Side Diff: examples/albumart.c

Issue 11358153: Update libmtp from pre 1.1.4 git to 1.1.5 release. (Closed) Base URL: svn://chrome-svn/chrome/trunk/deps/third_party/libmtp/
Patch Set: disable mptz Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« config.h ('K') | « configure.ac ('k') | examples/albums.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /** 1 /**
2 * \file albumart.c 2 * \file albumart.c
3 * Example program to send album art. 3 * Example program to send album art.
4 * 4 *
5 * Copyright (C) 2006 Andy Kelk <andy@mopoke.co.uk> 5 * Copyright (C) 2006 Andy Kelk <andy@mopoke.co.uk>
6 * 6 *
7 * This library is free software; you can redistribute it and/or 7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public 8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either 9 * License as published by the Free Software Foundation; either
10 * version 2 of the License, or (at your option) any later version. 10 * version 2 of the License, or (at your option) any later version.
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
56 uint32_t storageid = 0; 56 uint32_t storageid = 0;
57 uint32_t parentid = 0; 57 uint32_t parentid = 0;
58 58
59 fprintf(stdout, "libmtp version: " LIBMTP_VERSION_STRING "\n\n"); 59 fprintf(stdout, "libmtp version: " LIBMTP_VERSION_STRING "\n\n");
60 60
61 while ( (opt = getopt(argc, argv, "dhn:i:s:p:")) != -1 ) { 61 while ( (opt = getopt(argc, argv, "dhn:i:s:p:")) != -1 ) {
62 switch (opt) { 62 switch (opt) {
63 case 'h': 63 case 'h':
64 usage(); 64 usage();
65 case 'd': 65 case 'd':
66 LIBMTP_Set_Debug(LIBMTP_DEBUG_ALL); 66 LIBMTP_Set_Debug(LIBMTP_DEBUG_PTP | LIBMTP_DEBUG_DATA);
67 break; 67 break;
68 case 'i': 68 case 'i':
69 idcount++; 69 idcount++;
70 if ((tmp = realloc(ids, sizeof(uint32_t) * (idcount))) == NULL) { 70 if ((tmp = realloc(ids, sizeof(uint32_t) * (idcount))) == NULL) {
71 printf("realloc failed\n"); 71 printf("realloc failed\n");
72 return 1; 72 return 1;
73 } 73 }
74 ids = tmp; 74 ids = tmp;
75 ids[(idcount-1)] = strtoul(optarg, &rest, 0); 75 ids[(idcount-1)] = strtoul(optarg, &rest, 0);
76 break; 76 break;
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
162 } 162 }
163 163
164 LIBMTP_destroy_filesampledata_t(albumart); 164 LIBMTP_destroy_filesampledata_t(albumart);
165 LIBMTP_destroy_album_t(album); 165 LIBMTP_destroy_album_t(album);
166 166
167 LIBMTP_Release_Device(device); 167 LIBMTP_Release_Device(device);
168 printf("OK.\n"); 168 printf("OK.\n");
169 return 0; 169 return 0;
170 } 170 }
171 171
OLDNEW
« config.h ('K') | « configure.ac ('k') | examples/albums.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698