diff options
Diffstat (limited to 'common/resourceaccess.cpp')
-rw-r--r-- | common/resourceaccess.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/common/resourceaccess.cpp b/common/resourceaccess.cpp index 6540e98..e3ffe64 100644 --- a/common/resourceaccess.cpp +++ b/common/resourceaccess.cpp | |||
@@ -298,8 +298,8 @@ KAsync::Job<void> ResourceAccess::synchronizeResource(bool sourceSync, bool loca | |||
298 | { | 298 | { |
299 | Trace() << "Sending synchronize command: " << sourceSync << localSync; | 299 | Trace() << "Sending synchronize command: " << sourceSync << localSync; |
300 | flatbuffers::FlatBufferBuilder fbb; | 300 | flatbuffers::FlatBufferBuilder fbb; |
301 | auto command = Akonadi2::CreateSynchronize(fbb, sourceSync, localSync); | 301 | auto command = Akonadi2::Commands::CreateSynchronize(fbb, sourceSync, localSync); |
302 | Akonadi2::FinishSynchronizeBuffer(fbb, command); | 302 | Akonadi2::Commands::FinishSynchronizeBuffer(fbb, command); |
303 | open(); | 303 | open(); |
304 | return sendCommand(Commands::SynchronizeCommand, fbb); | 304 | return sendCommand(Commands::SynchronizeCommand, fbb); |
305 | } | 305 | } |
@@ -457,8 +457,8 @@ void ResourceAccess::connected() | |||
457 | { | 457 | { |
458 | flatbuffers::FlatBufferBuilder fbb; | 458 | flatbuffers::FlatBufferBuilder fbb; |
459 | auto name = fbb.CreateString(QString("PID: %1 ResourceAccess: %2").arg(QCoreApplication::applicationPid()).arg(reinterpret_cast<qlonglong>(this)).toLatin1()); | 459 | auto name = fbb.CreateString(QString("PID: %1 ResourceAccess: %2").arg(QCoreApplication::applicationPid()).arg(reinterpret_cast<qlonglong>(this)).toLatin1()); |
460 | auto command = Akonadi2::CreateHandshake(fbb, name); | 460 | auto command = Akonadi2::Commands::CreateHandshake(fbb, name); |
461 | Akonadi2::FinishHandshakeBuffer(fbb, command); | 461 | Akonadi2::Commands::FinishHandshakeBuffer(fbb, command); |
462 | Commands::write(d->socket.data(), ++d->messageId, Commands::HandshakeCommand, fbb); | 462 | Commands::write(d->socket.data(), ++d->messageId, Commands::HandshakeCommand, fbb); |
463 | } | 463 | } |
464 | 464 | ||
@@ -523,14 +523,14 @@ bool ResourceAccess::processMessageBuffer() | |||
523 | 523 | ||
524 | switch (commandId) { | 524 | switch (commandId) { |
525 | case Commands::RevisionUpdateCommand: { | 525 | case Commands::RevisionUpdateCommand: { |
526 | auto buffer = GetRevisionUpdate(d->partialMessageBuffer.constData() + headerSize); | 526 | auto buffer = Commands::GetRevisionUpdate(d->partialMessageBuffer.constData() + headerSize); |
527 | log(QString("Revision updated to: %1").arg(buffer->revision())); | 527 | log(QString("Revision updated to: %1").arg(buffer->revision())); |
528 | emit revisionChanged(buffer->revision()); | 528 | emit revisionChanged(buffer->revision()); |
529 | 529 | ||
530 | break; | 530 | break; |
531 | } | 531 | } |
532 | case Commands::CommandCompletion: { | 532 | case Commands::CommandCompletionCommand: { |
533 | auto buffer = GetCommandCompletion(d->partialMessageBuffer.constData() + headerSize); | 533 | auto buffer = Commands::GetCommandCompletion(d->partialMessageBuffer.constData() + headerSize); |
534 | log(QString("Command with messageId %1 completed %2").arg(buffer->id()).arg(buffer->success() ? "sucessfully" : "unsuccessfully")); | 534 | log(QString("Command with messageId %1 completed %2").arg(buffer->id()).arg(buffer->success() ? "sucessfully" : "unsuccessfully")); |
535 | 535 | ||
536 | d->completeCommands << buffer->id(); | 536 | d->completeCommands << buffer->id(); |
@@ -541,13 +541,13 @@ bool ResourceAccess::processMessageBuffer() | |||
541 | break; | 541 | break; |
542 | } | 542 | } |
543 | case Commands::NotificationCommand: { | 543 | case Commands::NotificationCommand: { |
544 | auto buffer = GetNotification(d->partialMessageBuffer.constData() + headerSize); | 544 | auto buffer = Commands::GetNotification(d->partialMessageBuffer.constData() + headerSize); |
545 | switch (buffer->type()) { | 545 | switch (buffer->type()) { |
546 | case Akonadi2::NotificationType::NotificationType_Shutdown: | 546 | case Akonadi2::Commands::NotificationType::NotificationType_Shutdown: |
547 | Log(d->resourceInstanceIdentifier) << "Received shutdown notification."; | 547 | Log(d->resourceInstanceIdentifier) << "Received shutdown notification."; |
548 | close(); | 548 | close(); |
549 | break; | 549 | break; |
550 | case Akonadi2::NotificationType::NotificationType_Inspection: { | 550 | case Akonadi2::Commands::NotificationType::NotificationType_Inspection: { |
551 | Log(d->resourceInstanceIdentifier) << "Received inspection notification."; | 551 | Log(d->resourceInstanceIdentifier) << "Received inspection notification."; |
552 | ResourceNotification n; | 552 | ResourceNotification n; |
553 | if (buffer->identifier()) { | 553 | if (buffer->identifier()) { |