From 66b21fd2e3c53e4a820e3343b192be7b043da110 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 16 Dec 2014 17:00:53 +0100 Subject: a more complete command set --- common/CMakeLists.txt | 10 ++++++++-- common/commands.h | 6 ++++++ common/commands/commandcompletion.fbs | 9 +++++++++ common/commands/createentity.fbs | 8 ++++++++ common/commands/deleteentity.fbs | 8 ++++++++ common/commands/fetchentity.fbs | 9 +++++++++ common/commands/modifyentity.fbs | 11 +++++++++++ 7 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 common/commands/commandcompletion.fbs create mode 100644 common/commands/createentity.fbs create mode 100644 common/commands/deleteentity.fbs create mode 100644 common/commands/fetchentity.fbs create mode 100644 common/commands/modifyentity.fbs diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index ceec69c..7de4aa9 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt @@ -1,6 +1,12 @@ project(akonadi2common) -generate_flatbuffers(commands/handshake - commands/revisionupdate) +generate_flatbuffers( + commands/createentity + commands/deleteentity + commands/fetchentity + commands/handshake + commands/modifyentity + commands/revisionupdate + ) if (STORAGE_unqlite) add_definitions(-DUNQLITE_ENABLE_THREADS -fpermissive) diff --git a/common/commands.h b/common/commands.h index 2e84a2f..874db73 100644 --- a/common/commands.h +++ b/common/commands.h @@ -34,8 +34,14 @@ namespace Commands enum CommandIds { UnknownCommand = 0, HandshakeCommand, + CommandCompletion, RevisionUpdateCommand, SynchronizeCommand, + FetchEntityCommand, + DeleteEntityCommand, + ModifyEntityCommand, + CreateEntityCommand, + SearchSourceCommand, // need a buffer definition for this, but relies on Query API CustomCommand = 0xffff }; diff --git a/common/commands/commandcompletion.fbs b/common/commands/commandcompletion.fbs new file mode 100644 index 0000000..9583108 --- /dev/null +++ b/common/commands/commandcompletion.fbs @@ -0,0 +1,9 @@ +namespace Akonadi2; + +table CommandCompletion { + id: ulong + success: bool + log: ulong = 0 +} + +root_type CommandCompletion; diff --git a/common/commands/createentity.fbs b/common/commands/createentity.fbs new file mode 100644 index 0000000..564c231 --- /dev/null +++ b/common/commands/createentity.fbs @@ -0,0 +1,8 @@ +namespace Akonadi2; + +table CreateEntity { + domainType: string; + delta: [ubyte]; +} + +root_type CreateEntity; diff --git a/common/commands/deleteentity.fbs b/common/commands/deleteentity.fbs new file mode 100644 index 0000000..c9b7850 --- /dev/null +++ b/common/commands/deleteentity.fbs @@ -0,0 +1,8 @@ +namespace Akonadi2; + +table DeleteEntity { + revision: ulong; + entityId: string; +} + +root_type DeleteEntity; diff --git a/common/commands/fetchentity.fbs b/common/commands/fetchentity.fbs new file mode 100644 index 0000000..ddca275 --- /dev/null +++ b/common/commands/fetchentity.fbs @@ -0,0 +1,9 @@ +namespace Akonadi2; + +table FetchEntity { + revision: ulong; + entityId: string; + properties: [string]; +} + +root_type FetchEntity; diff --git a/common/commands/modifyentity.fbs b/common/commands/modifyentity.fbs new file mode 100644 index 0000000..b4edb12 --- /dev/null +++ b/common/commands/modifyentity.fbs @@ -0,0 +1,11 @@ +namespace Akonadi2; + +table ModifyEntity { + revision: ulong; + entityId: string; + deletions: [string]; + domainType: string; + delta: [ubyte]; +} + +root_type ModifyEntity; -- cgit v1.2.3