Lines 977-982
Link Here
|
977 |
if( !isConnected() ) |
977 |
if( !isConnected() ) |
978 |
return false; |
978 |
return false; |
979 |
|
979 |
|
|
|
980 |
#if 0 |
980 |
uint64_t totalbytes; |
981 |
uint64_t totalbytes; |
981 |
uint64_t freebytes; |
982 |
uint64_t freebytes; |
982 |
char *storage_description; |
983 |
char *storage_description; |
Lines 996-1001
Link Here
|
996 |
debug() << "couldn't get storage details" << endl; |
997 |
debug() << "couldn't get storage details" << endl; |
997 |
return false; |
998 |
return false; |
998 |
} |
999 |
} |
|
|
1000 |
#else |
1001 |
*total = m_device->storage->MaxCapacity; |
1002 |
*available = m_device->storage->FreeSpaceInBytes; |
1003 |
return true; |
1004 |
#endif |
999 |
} |
1005 |
} |
1000 |
|
1006 |
|
1001 |
/** |
1007 |
/** |
Lines 1014-1028
Link Here
|
1014 |
|
1020 |
|
1015 |
uint8_t maxbattlevel; |
1021 |
uint8_t maxbattlevel; |
1016 |
uint8_t currbattlevel; |
1022 |
uint8_t currbattlevel; |
|
|
1023 |
#if 0 |
1017 |
uint64_t totalbytes; |
1024 |
uint64_t totalbytes; |
1018 |
uint64_t freebytes; |
1025 |
uint64_t freebytes; |
1019 |
char *storage_description; |
1026 |
char *storage_description; |
1020 |
char *volume_label; |
1027 |
char *volume_label; |
|
|
1028 |
#endif |
1021 |
char *sectime; |
1029 |
char *sectime; |
1022 |
|
1030 |
|
1023 |
|
1031 |
|
1024 |
m_critical_mutex.lock(); |
1032 |
m_critical_mutex.lock(); |
|
|
1033 |
#if 0 |
1025 |
LIBMTP_Get_Storageinfo( m_device, &totalbytes, &freebytes, &storage_description, &volume_label ); |
1034 |
LIBMTP_Get_Storageinfo( m_device, &totalbytes, &freebytes, &storage_description, &volume_label ); |
|
|
1035 |
#endif |
1026 |
LIBMTP_Get_Batterylevel( m_device, &maxbattlevel, &currbattlevel ); |
1036 |
LIBMTP_Get_Batterylevel( m_device, &maxbattlevel, &currbattlevel ); |
1027 |
LIBMTP_Get_Secure_Time( m_device, §ime ); |
1037 |
LIBMTP_Get_Secure_Time( m_device, §ime ); |
1028 |
m_critical_mutex.unlock(); |
1038 |
m_critical_mutex.unlock(); |
Lines 1032-1039
Link Here
|
1032 |
+ '%'; |
1042 |
+ '%'; |
1033 |
secureTime = i18n("Secure time: ") + sectime; |
1043 |
secureTime = i18n("Secure time: ") + sectime; |
1034 |
storageInformation = i18n("Volume label: ") |
1044 |
storageInformation = i18n("Volume label: ") |
|
|
1045 |
#if 0 |
1035 |
+ volume_label + '\n' |
1046 |
+ volume_label + '\n' |
1036 |
+ i18n("Storage description: ") + storage_description; |
1047 |
+ i18n("Storage description: ") + storage_description; |
|
|
1048 |
#else |
1049 |
+ m_device->storage->VolumeIdentifier + '\n' |
1050 |
+ i18n("Storage description: ") + m_device->storage->StorageDescription; |
1051 |
#endif |
1037 |
supportedFiles = i18n("Supported file types: ") |
1052 |
supportedFiles = i18n("Supported file types: ") |
1038 |
+ m_supportedFiles.join( ", " ); |
1053 |
+ m_supportedFiles.join( ", " ); |
1039 |
|
1054 |
|
Lines 1041-1048
Link Here
|
1041 |
+ m_name + '\n' + batteryLevel |
1056 |
+ m_name + '\n' + batteryLevel |
1042 |
+ '\n' + secureTime + '\n' |
1057 |
+ '\n' + secureTime + '\n' |
1043 |
+ storageInformation + '\n' + supportedFiles ); |
1058 |
+ storageInformation + '\n' + supportedFiles ); |
|
|
1059 |
#if 0 |
1044 |
free(storage_description); |
1060 |
free(storage_description); |
1045 |
free(volume_label); |
1061 |
free(volume_label); |
|
|
1062 |
#endif |
1046 |
free(sectime); |
1063 |
free(sectime); |
1047 |
} |
1064 |
} |
1048 |
else |
1065 |
else |