summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--common/CMakeLists.txt10
-rw-r--r--common/commands.h6
-rw-r--r--common/commands/commandcompletion.fbs9
-rw-r--r--common/commands/createentity.fbs8
-rw-r--r--common/commands/deleteentity.fbs8
-rw-r--r--common/commands/fetchentity.fbs9
-rw-r--r--common/commands/modifyentity.fbs11
7 files changed, 59 insertions, 2 deletions
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 @@
1project(akonadi2common) 1project(akonadi2common)
2generate_flatbuffers(commands/handshake 2generate_flatbuffers(
3 commands/revisionupdate) 3 commands/createentity
4 commands/deleteentity
5 commands/fetchentity
6 commands/handshake
7 commands/modifyentity
8 commands/revisionupdate
9 )
4 10
5if (STORAGE_unqlite) 11if (STORAGE_unqlite)
6 add_definitions(-DUNQLITE_ENABLE_THREADS -fpermissive) 12 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
34enum CommandIds { 34enum CommandIds {
35 UnknownCommand = 0, 35 UnknownCommand = 0,
36 HandshakeCommand, 36 HandshakeCommand,
37 CommandCompletion,
37 RevisionUpdateCommand, 38 RevisionUpdateCommand,
38 SynchronizeCommand, 39 SynchronizeCommand,
40 FetchEntityCommand,
41 DeleteEntityCommand,
42 ModifyEntityCommand,
43 CreateEntityCommand,
44 SearchSourceCommand, // need a buffer definition for this, but relies on Query API
39 CustomCommand = 0xffff 45 CustomCommand = 0xffff
40}; 46};
41 47
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 @@
1namespace Akonadi2;
2
3table CommandCompletion {
4 id: ulong
5 success: bool
6 log: ulong = 0
7}
8
9root_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 @@
1namespace Akonadi2;
2
3table CreateEntity {
4 domainType: string;
5 delta: [ubyte];
6}
7
8root_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 @@
1namespace Akonadi2;
2
3table DeleteEntity {
4 revision: ulong;
5 entityId: string;
6}
7
8root_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 @@
1namespace Akonadi2;
2
3table FetchEntity {
4 revision: ulong;
5 entityId: string;
6 properties: [string];
7}
8
9root_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 @@
1namespace Akonadi2;
2
3table ModifyEntity {
4 revision: ulong;
5 entityId: string;
6 deletions: [string];
7 domainType: string;
8 delta: [ubyte];
9}
10
11root_type ModifyEntity;