void MagnatuneServiceFactory::init() { DEBUG_BLOCK MagnatuneStore* service = new MagnatuneStore( this, "Magnatune.com" ); m_initialized = true; emit newService( service ); }
void AmazonServiceFactory::init() { DEBUG_BLOCK AmazonStore* service = new AmazonStore( this, "MP3 Music Store" ); m_initialized = true; emit newService( service ); }
/* Create a new xPL service */ xPL_ServicePtr xPL_createService(String theVendor, String theDeviceID, String theInstanceID) { xPL_ServicePtr theService; /* Create the service */ if ((theService = newService(theVendor, theDeviceID, theInstanceID)) == NULL) return NULL; /* And we are done */ return theService; }
void AmpacheServiceFactory::init() { //read config and create the needed number of services AmpacheConfig config; AmpacheServerList servers = config.servers(); m_initialized = true; for( int i = 0; i < servers.size(); i++ ) { AmpacheServerEntry server = servers.at( i ); ServiceBase* service = new AmpacheService( this, "Ampache (" + server.name + ')', server.url, server. username, server.password ); emit newService( service ); } }
void Mp3tunesServiceFactory::init() { Mp3tunesConfig config; //The user activated the service, but didn't fill the email/password? Don't start it. if ( config.email().isEmpty() || config.password().isEmpty() ) return; ServiceBase* service = new Mp3tunesService( this, "MP3tunes.com", config.partnerToken(), config.email(), config.password(), config.harmonyEnabled() ); m_activeServices << service; m_initialized = true; connect( service, SIGNAL( ready() ), this, SLOT( slotServiceReady() ) ); emit newService( service ); }
void AmpacheServiceFactory::init() { //read config and create the needed number of services AmpacheConfig config; AmpacheServerList servers = config.servers(); m_initialized = true; for( int i = 0; i < servers.size(); i++ ) { AmpacheServerEntry server = servers.at( i ); ServiceBase* service = new AmpacheService( this, "Ampache (" + server.name + ')', server.url, server. username, server.password ); m_activeServices << service; debug() << "Emitting service!!!!!!"; connect( service, SIGNAL( ready() ), this, SLOT( slotServiceReady() ) ); emit newService( service ); } }
void eComponentScan::scanEvent(int evt) { // eDebug("scan event %d!", evt); switch(evt) { case eDVBScan::evtFinish: { m_done = 1; ePtr<iDVBChannelList> db; ePtr<eDVBResourceManager> res; int err; if ((err = eDVBResourceManager::getInstance(res)) != 0) { eDebug("no resource manager"); m_failed = 2; } else if ((err = res->getChannelList(db)) != 0) { m_failed = 3; eDebug("no channel list"); } else { m_scan->insertInto(db); db->flush(); eDebug("scan done!"); } break; } case eDVBScan::evtNewService: newService(); return; case eDVBScan::evtFail: eDebug("scan failed."); m_failed = 1; m_done = 1; break; case eDVBScan::evtUpdate: break; } statusChanged(); if (m_failed > 0) m_done = 1; }