void GContactClient::receiveStateChanged(Sync::SyncProgressDetail aState) { FUNCTION_CALL_TRACE; switch(aState) { case Sync::SYNC_PROGRESS_SENDING_ITEMS: { emit syncProgressDetail (getProfileName(), Sync::SYNC_PROGRESS_SENDING_ITEMS); break; } case Sync::SYNC_PROGRESS_RECEIVING_ITEMS: { emit syncProgressDetail (getProfileName(), Sync::SYNC_PROGRESS_RECEIVING_ITEMS); break; } case Sync::SYNC_PROGRESS_FINALISING: { emit syncProgressDetail (getProfileName(),Sync::SYNC_PROGRESS_FINALISING); break; } default: //do nothing break; }; #ifndef QT_NO_DEBUG //LOG_DEBUG("*********** Sync Status has Changed to:" << toText(aState) // << "****************"); #endif // QT_NO_DEBUG }
void SyncEmailClient::syncStatusChanged(EmailAgent::Status status) { // TODO: Do we need to care about various status here ? // if so status info needs to be added to EmailAgent if (!m_emailAgent->synchronizing()) { if (status == EmailAgent::Completed) { updateResults(Buteo::SyncResults(QDateTime::currentDateTime(), Buteo::SyncResults::SYNC_RESULT_SUCCESS, Buteo::SyncResults::NO_ERROR)); emit success(getProfileName(), "Sync completed"); } else if (status == EmailAgent::Error) { updateResults(Buteo::SyncResults(QDateTime::currentDateTime(), Buteo::SyncResults::SYNC_RESULT_FAILED, Buteo::SyncResults::ABORTED)); emit error(getProfileName(), "Sync failed", Buteo::SyncResults::SYNC_RESULT_FAILED); } } }
void MokoSync::onUpdateAvailable(QUrl url, int newItems) { Q_UNUSED(url) d->writeLog(QString("\nMokoSync::onUpdateAvailable:newitemscount:")+QString().setNum(newItems)); if(newItems) { QString msg = QString().setNum(newItems) + " new app(s) available for your phone."; qlonglong id = -1; MEventFeed::instance()->removeItemsBySourceName("mokosync"); id = MEventFeed::instance()->addItem(QString("/usr/share/icons/hicolor/80x80/apps/Moko80.png"), QString("Moko"), msg, QStringList(), QDateTime::currentDateTime(), QString(), false, QUrl("moko://latest"), QString("mokosync"), QString("Moko")); d->writeLog("\n"+msg); d->writeLog(QString("\nMokoSync::updateReady: ")+QString().setNum(id)); } // Always emit success. emit success(getProfileName(), "Success."); // else // emit error(getProfileName(), "Error.", Buteo::SyncResults::SYNC_RESULT_FAILED); }
void CalDavClient::startSlowSync() { FUNCTION_CALL_TRACE; if (!mManager) { mManager = new Accounts::Manager(this); } Accounts::Account *account = mManager->account(mAccountId); if (account != NULL) { mKCal::Notebook::Ptr notebook = mKCal::Notebook::Ptr(new mKCal::Notebook(account->displayName(), "")); notebook->setAccount(QString::number(mAccountId)); notebook->setPluginName(getPluginName()); notebook->setSyncProfile(getProfileName()); mKCal::ExtendedCalendar::Ptr calendar = mKCal::ExtendedCalendar::Ptr(new mKCal::ExtendedCalendar(KDateTime::Spec::UTC())); mKCal::ExtendedStorage::Ptr storage = calendar->defaultStorage(calendar); storage->open(); bool status = storage->addNotebook(notebook); LOG_DEBUG("NOTEBOOK created " << status << " UUID of NoteBook = " << notebook->uid()); storage->close(); calendar->close(); Report *report = new Report(mNAManager, &mSettings); mRequests.insert(report); connect(report, SIGNAL(finished()), this, SLOT(reportRequestFinished())); report->getAllEvents(); } }
void CalDavClient::syncFinished(int minorErrorCode, const QString &errorMessage) { FUNCTION_CALL_TRACE; clearRequests(); if (minorErrorCode == Buteo::SyncResults::NO_ERROR) { mResults = Buteo::SyncResults(QDateTime::currentDateTime().toUTC(), Buteo::SyncResults::SYNC_RESULT_SUCCESS, Buteo::SyncResults::NO_ERROR); emit success(getProfileName(), QString()); } else { mResults = Buteo::SyncResults(QDateTime::currentDateTime().toUTC(), Buteo::SyncResults::SYNC_RESULT_FAILED, minorErrorCode); emit error(getProfileName(), errorMessage, minorErrorCode); } }
void CardDavClient::syncFinished(int minorErrorCode, const QString &message) { FUNCTION_CALL_TRACE; if (minorErrorCode == Buteo::SyncResults::NO_ERROR) { LOG_DEBUG("CardDAV sync succeeded!" << message); m_results = Buteo::SyncResults(QDateTime::currentDateTimeUtc(), Buteo::SyncResults::SYNC_RESULT_SUCCESS, Buteo::SyncResults::NO_ERROR); emit success(getProfileName(), message); } else { LOG_CRITICAL("CardDAV sync failed:" << minorErrorCode << message); m_results = Buteo::SyncResults(iProfile.lastSuccessfulSyncTime(), // don't change the last sync time Buteo::SyncResults::SYNC_RESULT_FAILED, minorErrorCode); emit error(getProfileName(), message, minorErrorCode); } }
HRESULT Shader::setup(DataSourceRef dataSrc, const std::string& entryName) { if (dataSrc && dataSrc->getBuffer().getDataSize() > 0) { CComPtr<ID3DBlob> shaderBytecode; HR( dx11::compileShader(dataSrc->getBuffer(), entryName, getProfileName(), &shaderBytecode) ); HR( doCreateShader(shaderBytecode, &mHandle) ); } return hr; }
void GContactClient::receiveSyncFinished(Sync::SyncStatus aState) { FUNCTION_CALL_TRACE; #ifndef QT_NO_DEBUG //LOG_DEBUG("*********** Sync has finished with:" << toText(aState) // << "****************"); #endif // QT_NO_DEBUG switch(aState) { case Sync::SYNC_ERROR: case Sync::SYNC_AUTHENTICATION_FAILURE: case Sync::SYNC_DATABASE_FAILURE: case Sync::SYNC_CONNECTION_ERROR: case Sync::SYNC_NOTPOSSIBLE: { generateResults( false ); emit error( getProfileName(), "", aState); break; } case Sync::SYNC_ABORTED: case Sync::SYNC_DONE: { generateResults( true ); emit success( getProfileName(), QString::number(aState)); break; } case Sync::SYNC_QUEUED: case Sync::SYNC_STARTED: case Sync::SYNC_PROGRESS: default: { generateResults( false ); emit error( getProfileName(), "", aState); break; } } }
std::wstring& MirandaUtils::getDisplayName() { if (displayName.size()>0){ //displayName is now inited return displayName; } displayName.append(L"Miranda NG v."); char mirandaVersion[128]; CallService(MS_SYSTEM_GETVERSIONTEXT, (WPARAM)SIZEOF(mirandaVersion), (LPARAM)mirandaVersion); displayName.append(_A2T(mirandaVersion)); displayName.append(L" ("); displayName.append(getProfileName()); displayName.append(L")"); return displayName; }
void GContactClient::receiveItemProcessed (Sync::TransferType aModificationType, Sync::TransferDatabase transferDb, QString database, int aCommittedItems) { FUNCTION_CALL_TRACE; LOG_DEBUG("Modification Type " << aModificationType); LOG_DEBUG("Committed items" << aCommittedItems); ++mCommittedItems; if(!receivedItems.contains(database)) { ReceivedItemDetails details; details.added = details.modified = details.deleted = details.error = 0; //details.mime = aMimeType; receivedItems[database] = details; } switch (aModificationType) { case Sync::ITEM_ADDED: { ++receivedItems[database].added; break; } case Sync::ITEM_MODIFIED: { ++receivedItems[database].modified; break; } case Sync::ITEM_DELETED: { ++receivedItems[database].deleted; break; } case Sync::ITEM_ERROR: { ++receivedItems[database].error; break; } default: { Q_ASSERT(0); break; } } if( mCommittedItems == aCommittedItems ) { QMapIterator<QString,ReceivedItemDetails> itr(receivedItems); while( itr.hasNext() ) { itr.next(); if( itr.value().added ) emit transferProgress(getProfileName(), transferDb, Sync::ITEM_ADDED, itr.value().mime, itr.value().added); if( itr.value().modified ) emit transferProgress(getProfileName(), transferDb, Sync::ITEM_MODIFIED, itr.value().mime, itr.value().modified); if( itr.value().deleted ) emit transferProgress(getProfileName(), transferDb, Sync::ITEM_DELETED, itr.value().mime, itr.value().deleted); if( itr.value().error ) emit transferProgress(getProfileName(), transferDb, Sync::ITEM_ERROR, itr.value().mime, itr.value().error); } mCommittedItems = 0; receivedItems.clear(); } }