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

void MtpDevice::dbgPrintFolders ( MTP::Folder root,
count_t  level 
) [private]

Recursively prints the folders discovered

Parameters:
root the current level's root folder
level the current depth of the traversal used for ASCII alignment

Definition at line 479 of file MtpDevice.cpp.

References MTP::Folder::ChildFolder(), MTP::Folder::FolderCount(), and MTP::Folder::Name().

{
  if (root == NULL)
  {
    for (count_t i =0; i < _rootFolders.size(); i++)
    {
      cout << _rootFolders[i]->Name() << endl;
      dbgPrintFolders(_rootFolders[i], 1);
    }
    return;
  }

  for (count_t i = 0; i < root->FolderCount(); i++)
  {
    for (count_t j = 0; j < level; j++)
      cout << "  ";
    MTP::Folder* temp = root->ChildFolder(i); 
    cout << temp->Name() << endl;
    dbgPrintFolders(temp, level+1);
  }
}


Generated by  Doxygen 1.6.0   Back to index