annotate base/StorageAdviser.cpp @ 169:603991c63ff6

...
author Chris Cannam
date Mon, 25 Sep 2006 20:32:44 +0000
parents 04baa690f90d
children b23eea68357e
rev   line source
Chris@168 1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
Chris@168 2
Chris@168 3 /*
Chris@168 4 Sonic Visualiser
Chris@168 5 An audio file viewer and annotation editor.
Chris@168 6 Centre for Digital Music, Queen Mary, University of London.
Chris@168 7 This file copyright 2006 Chris Cannam.
Chris@168 8
Chris@168 9 This program is free software; you can redistribute it and/or
Chris@168 10 modify it under the terms of the GNU General Public License as
Chris@168 11 published by the Free Software Foundation; either version 2 of the
Chris@168 12 License, or (at your option) any later version. See the file
Chris@168 13 COPYING included with this distribution for more information.
Chris@168 14 */
Chris@168 15
Chris@168 16 #include "StorageAdviser.h"
Chris@168 17
Chris@168 18 #include "Exceptions.h"
Chris@168 19 #include "TempDirectory.h"
Chris@168 20
Chris@168 21 #include "system/System.h"
Chris@168 22
Chris@168 23 #include <iostream>
Chris@168 24
Chris@168 25 StorageAdviser::Recommendation
Chris@168 26 StorageAdviser::recommend(Criteria criteria,
Chris@168 27 int minimumSize,
Chris@168 28 int maximumSize)
Chris@168 29 {
Chris@168 30 QString path = TempDirectory::getInstance()->getPath();
Chris@168 31
Chris@168 32 int discSpace = GetDiscSpaceMBAvailable(path.toLocal8Bit());
Chris@168 33 int memory = GetRealMemoryMBAvailable();
Chris@168 34
Chris@168 35 std::cerr << "Disc space: " << discSpace << ", memory: " << memory << std::endl;
Chris@168 36
Chris@168 37 return Recommendation(0);
Chris@168 38 }
Chris@168 39
Chris@168 40
Chris@168 41