diff options
-rw-r--r-- | client/CMakeLists.txt | 8 | ||||
-rw-r--r-- | client/main.cpp | 2 | ||||
-rw-r--r-- | client/resourceaccess.cpp | 8 | ||||
-rw-r--r-- | common/CMakeLists.txt | 2 | ||||
-rw-r--r-- | common/commands/handshake.fbs | 4 | ||||
-rw-r--r-- | common/commands/revisionupdate.fbs | 2 | ||||
-rw-r--r-- | dummyresource/CMakeLists.txt | 4 | ||||
-rw-r--r-- | synchronizer/CMakeLists.txt | 8 | ||||
-rw-r--r-- | synchronizer/listener.cpp | 10 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 2 |
10 files changed, 24 insertions, 26 deletions
diff --git a/client/CMakeLists.txt b/client/CMakeLists.txt index 48e212c..a0ebe3a 100644 --- a/client/CMakeLists.txt +++ b/client/CMakeLists.txt | |||
@@ -1,14 +1,14 @@ | |||
1 | project(akonadinext_client) | 1 | project(akonadi2_client) |
2 | 2 | ||
3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | 3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) |
4 | 4 | ||
5 | set(akonadinextclient_SRCS | 5 | set(akonadi2client_SRCS |
6 | main.cpp | 6 | main.cpp |
7 | resourceaccess.cpp | 7 | resourceaccess.cpp |
8 | ) | 8 | ) |
9 | 9 | ||
10 | add_executable(${PROJECT_NAME} ${akonadinextclient_SRCS}) | 10 | add_executable(${PROJECT_NAME} ${akonadi2client_SRCS}) |
11 | target_link_libraries(${PROJECT_NAME} akonadinextcommon) | 11 | target_link_libraries(${PROJECT_NAME} akonadi2common) |
12 | qt5_use_modules(${PROJECT_NAME} Widgets Network) | 12 | qt5_use_modules(${PROJECT_NAME} Widgets Network) |
13 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) | 13 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) |
14 | 14 | ||
diff --git a/client/main.cpp b/client/main.cpp index ac086b0..1748331 100644 --- a/client/main.cpp +++ b/client/main.cpp | |||
@@ -9,7 +9,7 @@ int main(int argc, char *argv[]) | |||
9 | { | 9 | { |
10 | QApplication app(argc, argv); | 10 | QApplication app(argc, argv); |
11 | 11 | ||
12 | new Console("Akonadi Next Client"); | 12 | new Console("Akonadi2 Client"); |
13 | 13 | ||
14 | ResourceAccess *resAccess = 0; | 14 | ResourceAccess *resAccess = 0; |
15 | QCommandLineParser cliOptions; | 15 | QCommandLineParser cliOptions; |
diff --git a/client/resourceaccess.cpp b/client/resourceaccess.cpp index fce8ca6..bbc7f8b 100644 --- a/client/resourceaccess.cpp +++ b/client/resourceaccess.cpp | |||
@@ -73,8 +73,8 @@ void ResourceAccess::connected() | |||
73 | 73 | ||
74 | { | 74 | { |
75 | auto name = m_fbb.CreateString(QString::number((long long)this).toLatin1()); | 75 | auto name = m_fbb.CreateString(QString::number((long long)this).toLatin1()); |
76 | auto command = Akonadi::CreateHandshake(m_fbb, name); | 76 | auto command = Akonadi2::CreateHandshake(m_fbb, name); |
77 | Akonadi::FinishHandshakeBuffer(m_fbb, command); | 77 | Akonadi2::FinishHandshakeBuffer(m_fbb, command); |
78 | Commands::write(m_socket, Commands::HandshakeCommand, m_fbb); | 78 | Commands::write(m_socket, Commands::HandshakeCommand, m_fbb); |
79 | m_fbb.Clear(); | 79 | m_fbb.Clear(); |
80 | } | 80 | } |
@@ -104,7 +104,7 @@ void ResourceAccess::connectionError(QLocalSocket::LocalSocketError error) | |||
104 | log(QString("Attempting to start resource ") + m_resourceName); | 104 | log(QString("Attempting to start resource ") + m_resourceName); |
105 | QStringList args; | 105 | QStringList args; |
106 | args << m_resourceName; | 106 | args << m_resourceName; |
107 | if (QProcess::startDetached("akonadinext_synchronizer", args)) { | 107 | if (QProcess::startDetached("akonadi2_synchronizer", args)) { |
108 | m_socket->open(); | 108 | m_socket->open(); |
109 | } | 109 | } |
110 | } | 110 | } |
@@ -137,7 +137,7 @@ bool ResourceAccess::processMessageBuffer() | |||
137 | 137 | ||
138 | switch (commandId) { | 138 | switch (commandId) { |
139 | case Commands::RevisionUpdateCommand: { | 139 | case Commands::RevisionUpdateCommand: { |
140 | auto buffer = Akonadi::GetRevisionUpdate(m_partialMessageBuffer.constData() + headerSize); | 140 | auto buffer = Akonadi2::GetRevisionUpdate(m_partialMessageBuffer.constData() + headerSize); |
141 | log(QString("Revision updated to: %1").arg(buffer->revision())); | 141 | log(QString("Revision updated to: %1").arg(buffer->revision())); |
142 | emit revisionChanged(buffer->revision()); | 142 | emit revisionChanged(buffer->revision()); |
143 | break; | 143 | break; |
diff --git a/common/CMakeLists.txt b/common/CMakeLists.txt index 68330ce..2fef5f6 100644 --- a/common/CMakeLists.txt +++ b/common/CMakeLists.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | project(akonadinextcommon) | 1 | project(akonadi2common) |
2 | generate_flatbuffers(commands/handshake | 2 | generate_flatbuffers(commands/handshake |
3 | commands/revisionupdate) | 3 | commands/revisionupdate) |
4 | 4 | ||
diff --git a/common/commands/handshake.fbs b/common/commands/handshake.fbs index 90c0d3a..52a883a 100644 --- a/common/commands/handshake.fbs +++ b/common/commands/handshake.fbs | |||
@@ -1,9 +1,7 @@ | |||
1 | 1 | namespace Akonadi2; | |
2 | namespace Akonadi; | ||
3 | 2 | ||
4 | table Handshake { | 3 | table Handshake { |
5 | name: string; | 4 | name: string; |
6 | } | 5 | } |
7 | 6 | ||
8 | root_type Handshake; | 7 | root_type Handshake; |
9 | |||
diff --git a/common/commands/revisionupdate.fbs b/common/commands/revisionupdate.fbs index bf3943f..634bcd0 100644 --- a/common/commands/revisionupdate.fbs +++ b/common/commands/revisionupdate.fbs | |||
@@ -1,4 +1,4 @@ | |||
1 | namespace Akonadi; | 1 | namespace Akonadi2; |
2 | 2 | ||
3 | table RevisionUpdate { | 3 | table RevisionUpdate { |
4 | revision: ulong; | 4 | revision: ulong; |
diff --git a/dummyresource/CMakeLists.txt b/dummyresource/CMakeLists.txt index 9d28c0b..e814f41 100644 --- a/dummyresource/CMakeLists.txt +++ b/dummyresource/CMakeLists.txt | |||
@@ -1,4 +1,4 @@ | |||
1 | project(akonadinext_dummyresource) | 1 | project(akonadi2_dummyresource) |
2 | 2 | ||
3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | 3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) |
4 | 4 | ||
@@ -6,7 +6,7 @@ generate_flatbuffers(dummycalendar) | |||
6 | 6 | ||
7 | #Client plugin | 7 | #Client plugin |
8 | add_library(${PROJECT_NAME}_facade SHARED facade.cpp) | 8 | add_library(${PROJECT_NAME}_facade SHARED facade.cpp) |
9 | target_link_libraries(${PROJECT_NAME}_facade akonadinextcommon) | 9 | target_link_libraries(${PROJECT_NAME}_facade akonadi2common) |
10 | qt5_use_modules(${PROJECT_NAME}_facade Widgets Network) | 10 | qt5_use_modules(${PROJECT_NAME}_facade Widgets Network) |
11 | #install(TARGETS ${PROJECT_NAME}_facade DESTINATION bin) | 11 | #install(TARGETS ${PROJECT_NAME}_facade DESTINATION bin) |
12 | 12 | ||
diff --git a/synchronizer/CMakeLists.txt b/synchronizer/CMakeLists.txt index 92cb465..031b3b2 100644 --- a/synchronizer/CMakeLists.txt +++ b/synchronizer/CMakeLists.txt | |||
@@ -1,13 +1,13 @@ | |||
1 | project(akonadinext_synchronizer) | 1 | project(akonadi2_synchronizer) |
2 | 2 | ||
3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) | 3 | include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}) |
4 | 4 | ||
5 | set(akonadinextsynchronizer_SRCS | 5 | set(akonadi2synchronizer_SRCS |
6 | main.cpp | 6 | main.cpp |
7 | listener.cpp | 7 | listener.cpp |
8 | ) | 8 | ) |
9 | 9 | ||
10 | add_executable(${PROJECT_NAME} ${akonadinextsynchronizer_SRCS}) | 10 | add_executable(${PROJECT_NAME} ${akonadi2synchronizer_SRCS}) |
11 | target_link_libraries(${PROJECT_NAME} akonadinextcommon) | 11 | target_link_libraries(${PROJECT_NAME} akonadi2common) |
12 | qt5_use_modules(${PROJECT_NAME} Widgets Network) | 12 | qt5_use_modules(${PROJECT_NAME} Widgets Network) |
13 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) | 13 | install(TARGETS ${PROJECT_NAME} DESTINATION bin) |
diff --git a/synchronizer/listener.cpp b/synchronizer/listener.cpp index 23a5a70..01daf5d 100644 --- a/synchronizer/listener.cpp +++ b/synchronizer/listener.cpp | |||
@@ -148,7 +148,7 @@ bool Listener::processClientBuffer(Client &client) | |||
148 | 148 | ||
149 | switch (commandId) { | 149 | switch (commandId) { |
150 | case Commands::HandshakeCommand: { | 150 | case Commands::HandshakeCommand: { |
151 | auto buffer = Akonadi::GetHandshake(data.constData()); | 151 | auto buffer = Akonadi2::GetHandshake(data.constData()); |
152 | Console::main()->log(QString(" Handshake from %1").arg(buffer->name()->c_str())); | 152 | Console::main()->log(QString(" Handshake from %1").arg(buffer->name()->c_str())); |
153 | sendCurrentRevision(client); | 153 | sendCurrentRevision(client); |
154 | break; | 154 | break; |
@@ -170,16 +170,16 @@ void Listener::sendCurrentRevision(Client &client) | |||
170 | return; | 170 | return; |
171 | } | 171 | } |
172 | 172 | ||
173 | auto command = Akonadi::CreateRevisionUpdate(m_fbb, m_revision); | 173 | auto command = Akonadi2::CreateRevisionUpdate(m_fbb, m_revision); |
174 | Akonadi::FinishRevisionUpdateBuffer(m_fbb, command); | 174 | Akonadi2::FinishRevisionUpdateBuffer(m_fbb, command); |
175 | Commands::write(client.socket, Commands::RevisionUpdateCommand, m_fbb); | 175 | Commands::write(client.socket, Commands::RevisionUpdateCommand, m_fbb); |
176 | m_fbb.Clear(); | 176 | m_fbb.Clear(); |
177 | } | 177 | } |
178 | 178 | ||
179 | void Listener::updateClientsWithRevision() | 179 | void Listener::updateClientsWithRevision() |
180 | { | 180 | { |
181 | auto command = Akonadi::CreateRevisionUpdate(m_fbb, m_revision); | 181 | auto command = Akonadi2::CreateRevisionUpdate(m_fbb, m_revision); |
182 | Akonadi::FinishRevisionUpdateBuffer(m_fbb, command); | 182 | Akonadi2::FinishRevisionUpdateBuffer(m_fbb, command); |
183 | 183 | ||
184 | for (const Client &client: m_connections) { | 184 | for (const Client &client: m_connections) { |
185 | if (!client.socket || !client.socket->isValid()) { | 185 | if (!client.socket || !client.socket->isValid()) { |
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 1629acb..9ee3f5e 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -7,7 +7,7 @@ macro(manual_tests) | |||
7 | foreach(_testname ${ARGN}) | 7 | foreach(_testname ${ARGN}) |
8 | add_executable(${_testname} ${_testname}.cpp) | 8 | add_executable(${_testname} ${_testname}.cpp) |
9 | qt5_use_modules(${_testname} Core Test Concurrent) | 9 | qt5_use_modules(${_testname} Core Test Concurrent) |
10 | target_link_libraries(${_testname} akonadinextcommon) | 10 | target_link_libraries(${_testname} akonadi2common) |
11 | endforeach(_testname) | 11 | endforeach(_testname) |
12 | endmacro(manual_tests) | 12 | endmacro(manual_tests) |
13 | 13 | ||