//
// C++ Implementation: soundprovider
//
// Description: 
//
//
// Author: Eitzenberger Thomas <kde@atpc310d>, (C) 2009
//
// Copyright: See COPYING file that comes with this distribution
//
//
#include "soundprovider.h"
#include "soundproviderfactory.h"

#include <KDebug>
#include <kstandarddirs.h>

SoundProvider::SoundProvider(QObject* parent) : QObject(parent)
{
  m_priority = -1;
  m_providerName = "N/A";
  m_localCache = true;
}

SoundProvider::~SoundProvider()
{
}

void SoundProvider::abortDownloadSoundUrl(KUrl remoteUrl) 
{
   kDebug() << " not implemented but called with remoteUrl ='" << remoteUrl << "'"; 
}

void SoundProvider::useLocalCache(bool activate) 
{
  if (!supportsLocalCache() && activate) {
    kDebug() << "unable to activate local cache if implementation doesnt support it!";
    return;
  }
  m_localCache = activate;
}

QString SoundProvider::getLocalCacheName(QString providerclass, QString item, QString lang) 
{
  return KStandardDirs::locateLocal("data", 
                                    "kvtml/soundfiles/" + providerclass + "/" + 
                                        lang + "-" + item + ".ogg", true); 
}