diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-16 17:00:53 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-16 17:00:53 +0100 |
commit | 66b21fd2e3c53e4a820e3343b192be7b043da110 (patch) | |
tree | e9fe4685d4113c64c573e8230ae4f90fbd17ef8f /common | |
parent | b1c4f94606b6a1b9223acb2c1722bfe3bce26933 (diff) | |
download | sink-66b21fd2e3c53e4a820e3343b192be7b043da110.tar.gz sink-66b21fd2e3c53e4a820e3343b192be7b043da110.zip |
a more complete command set
Diffstat (limited to 'common')
-rw-r--r-- | common/CMakeLists.txt | 10 | ||||
-rw-r--r-- | common/commands.h | 6 | ||||
-rw-r--r-- | common/commands/commandcompletion.fbs | 9 | ||||
-rw-r--r-- | common/commands/createentity.fbs | 8 | ||||
-rw-r--r-- | common/commands/deleteentity.fbs | 8 | ||||
-rw-r--r-- | common/commands/fetchentity.fbs | 9 | ||||
-rw-r--r-- | common/commands/modifyentity.fbs | 11 |
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 @@ | |||
1 | project(akonadi2common) | 1 | project(akonadi2common) |
2 | generate_flatbuffers(commands/handshake | 2 | generate_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 | ||
5 | if (STORAGE_unqlite) | 11 | if (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 | |||
34 | enum CommandIds { | 34 | enum 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 @@ | |||
1 | namespace Akonadi2; | ||
2 | |||
3 | table CommandCompletion { | ||
4 | id: ulong | ||
5 | success: bool | ||
6 | log: ulong = 0 | ||
7 | } | ||
8 | |||
9 | 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 @@ | |||
1 | namespace Akonadi2; | ||
2 | |||
3 | table CreateEntity { | ||
4 | domainType: string; | ||
5 | delta: [ubyte]; | ||
6 | } | ||
7 | |||
8 | 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 @@ | |||
1 | namespace Akonadi2; | ||
2 | |||
3 | table DeleteEntity { | ||
4 | revision: ulong; | ||
5 | entityId: string; | ||
6 | } | ||
7 | |||
8 | 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 @@ | |||
1 | namespace Akonadi2; | ||
2 | |||
3 | table FetchEntity { | ||
4 | revision: ulong; | ||
5 | entityId: string; | ||
6 | properties: [string]; | ||
7 | } | ||
8 | |||
9 | 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 @@ | |||
1 | namespace Akonadi2; | ||
2 | |||
3 | table ModifyEntity { | ||
4 | revision: ulong; | ||
5 | entityId: string; | ||
6 | deletions: [string]; | ||
7 | domainType: string; | ||
8 | delta: [ubyte]; | ||
9 | } | ||
10 | |||
11 | root_type ModifyEntity; | ||