Logo Search packages:      
Sourcecode: qlix version File versions  Download package

void MtpDevice::FreeSpace ( unsigned int  in_ID,
uint64_t *  out_total,
uint64_t *  out_free 
)

Returns the total and free space on the requested storage device

Parameters:
in_ID the storage ID of the storage device
total the total amount of space on the device
free the amount of free space on the device

Definition at line 143 of file MtpDevice.cpp.

{
  for (unsigned int i =0; i < _storageDeviceList.size(); i++)
  {
    if (_storageDeviceList[i]->ID() == in_ID)
    {
      MtpStorage* storage_dev = _storageDeviceList[i];
      cout << "Storage reporting: " << storage_dev->TotalSpace() << " and " <<
               storage_dev->FreeSpace() << endl;;
      *out_total = storage_dev->TotalSpace();
      *out_free = storage_dev->FreeSpace();
      return;
    }
  }
  *out_total = 0;
  *out_free = 0;
}


Generated by  Doxygen 1.6.0   Back to index