summaryrefslogtreecommitdiffstats
path: root/common/commands.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/commands.cpp')
-rw-r--r--common/commands.cpp33
1 files changed, 33 insertions, 0 deletions
diff --git a/common/commands.cpp b/common/commands.cpp
index 1dfeabe..99313b9 100644
--- a/common/commands.cpp
+++ b/common/commands.cpp
@@ -28,6 +28,39 @@ namespace Akonadi2
28namespace Commands 28namespace Commands
29{ 29{
30 30
31QByteArray name(int commandId)
32{
33 switch(commandId) {
34 case UnknownCommand:
35 return "Unknown";
36 case CommandCompletion:
37 return "Completion";
38 case HandshakeCommand:
39 return "Handshake";
40 case RevisionUpdateCommand:
41 return "RevisionUpdate";
42 case SynchronizeCommand:
43 return "Synchronize";
44 case FetchEntityCommand:
45 return "FetchEntity";
46 case DeleteEntityCommand:
47 return "DeleteEntity";
48 case ModifyEntityCommand:
49 return "ModifyEntity";
50 case CreateEntityCommand:
51 return "CreateEntity";
52 case SearchSourceCommand:
53 return "SearchSource";
54 case ShutdownCommand:
55 return "Shutdown";
56 case NotificationCommand:
57 return "Notification";
58 case CustomCommand:
59 return "Custom";
60 };
61 return QByteArray("Invalid commandId");
62}
63
31int headerSize() 64int headerSize()
32{ 65{
33 return sizeof(int) + (sizeof(uint) * 2); 66 return sizeof(int) + (sizeof(uint) * 2);