From 4ca6215004b47104cb0d3af42422451738091719 Mon Sep 17 00:00:00 2001
From: Pawel Wieczorek
Date: Mon, 15 Sep 2014 16:49:19 +0200
Subject: [PATCH 01/16] Replace @file commands for Doxygen compatibility
Not all filenames are unique for the whole project. This affects
Doxygen, as it ignores repeated @file descriptions. Patch replaces
Doxygen @file commands with full relative path to the source file.
Change-Id: Iabcdf59e9bf6fae3137598e6013f0a552e82acba
---
src/admin/api/ApiInterface.h | 2 +-
src/admin/api/admin-api.cpp | 2 +-
src/admin/logic/Logic.cpp | 2 +-
src/admin/logic/Logic.h | 2 +-
src/client-common/cache/CacheInterface.h | 2 +-
src/client-common/cache/CapacityCache.cpp | 2 +-
src/client-common/cache/CapacityCache.h | 2 +-
src/client-common/plugins/NaiveInterpreter.h | 2 +-
src/client-common/plugins/PluginInterface.h | 2 +-
src/client/api/ApiInterface.h | 2 +-
src/client/api/client-api.cpp | 2 +-
src/client/logic/Logic.cpp | 2 +-
src/client/logic/Logic.h | 2 +-
src/common/attributes/attributes.h | 2 +-
src/common/attributes/debug_attributes.h | 2 +-
src/common/common.h | 2 +-
src/common/containers/BinaryQueue.cpp | 2 +-
src/common/containers/BinaryQueue.h | 2 +-
src/common/containers/RawBuffer.h | 2 +-
src/common/exceptions/BucketDeserializationException.h | 2 +-
src/common/exceptions/BucketNotExistsException.h | 2 +-
src/common/exceptions/BucketRecordCorruptedException.h | 2 +-
src/common/exceptions/BucketSerializationException.h | 2 +-
src/common/exceptions/CannotCreateFileException.h | 2 +-
src/common/exceptions/DatabaseException.h | 2 +-
src/common/exceptions/DefaultBucketDeletionException.h | 2 +-
src/common/exceptions/DefaultBucketSetNoneException.h | 2 +-
src/common/exceptions/DescriptorNotExistsException.h | 2 +-
src/common/exceptions/Exception.h | 2 +-
src/common/exceptions/FileNotFoundException.h | 2 +-
src/common/exceptions/InitException.h | 2 +-
src/common/exceptions/InvalidProtocolException.h | 2 +-
src/common/exceptions/NotImplementedException.h | 2 +-
src/common/exceptions/NullPointerException.h | 2 +-
src/common/exceptions/OutOfDataException.h | 2 +-
src/common/exceptions/PluginNotFoundException.h | 2 +-
src/common/exceptions/ServerConnectionErrorException.h | 2 +-
src/common/exceptions/UnexpectedErrorException.h | 2 +-
src/common/log/Backtrace.cpp | 2 +-
src/common/log/Backtrace.h | 2 +-
src/common/log/log.cpp | 8 ++++----
src/common/log/log.h | 2 +-
src/common/protocol/Protocol.h | 2 +-
src/common/protocol/ProtocolAdmin.cpp | 2 +-
src/common/protocol/ProtocolAdmin.h | 2 +-
src/common/protocol/ProtocolClient.cpp | 2 +-
src/common/protocol/ProtocolClient.h | 2 +-
src/common/protocol/ProtocolFrame.cpp | 2 +-
src/common/protocol/ProtocolFrame.h | 2 +-
src/common/protocol/ProtocolFrameHeader.cpp | 2 +-
src/common/protocol/ProtocolFrameHeader.h | 2 +-
src/common/protocol/ProtocolFrameSerializer.cpp | 2 +-
src/common/protocol/ProtocolFrameSerializer.h | 2 +-
src/common/protocol/ProtocolOpCode.h | 2 +-
src/common/protocol/ProtocolSerialization.cpp | 2 +-
src/common/protocol/ProtocolSerialization.h | 10 +++++-----
src/common/protocol/ProtocolSignal.cpp | 2 +-
src/common/protocol/ProtocolSignal.h | 2 +-
src/common/request/AdminCheckRequest.cpp | 2 +-
src/common/request/AdminCheckRequest.h | 2 +-
src/common/request/CheckRequest.cpp | 2 +-
src/common/request/CheckRequest.h | 2 +-
src/common/request/InsertOrUpdateBucketRequest.cpp | 2 +-
src/common/request/InsertOrUpdateBucketRequest.h | 2 +-
src/common/request/RemoveBucketRequest.cpp | 2 +-
src/common/request/RemoveBucketRequest.h | 2 +-
src/common/request/Request.h | 2 +-
src/common/request/RequestContext.h | 2 +-
src/common/request/RequestTaker.cpp | 2 +-
src/common/request/RequestTaker.h | 2 +-
src/common/request/SetPoliciesRequest.cpp | 2 +-
src/common/request/SetPoliciesRequest.h | 2 +-
src/common/request/SignalRequest.cpp | 2 +-
src/common/request/SignalRequest.h | 2 +-
src/common/request/pointers.h | 2 +-
src/common/response/CheckResponse.cpp | 2 +-
src/common/response/CheckResponse.h | 2 +-
src/common/response/CodeResponse.cpp | 2 +-
src/common/response/CodeResponse.h | 2 +-
src/common/response/Response.h | 2 +-
src/common/response/ResponseTaker.cpp | 2 +-
src/common/response/ResponseTaker.h | 2 +-
src/common/response/pointers.h | 2 +-
src/common/sockets/Socket.cpp | 2 +-
src/common/sockets/Socket.h | 2 +-
src/common/sockets/SocketClient.cpp | 2 +-
src/common/sockets/SocketClient.h | 2 +-
src/common/types/ClientSession.h | 2 +-
src/common/types/Policy.h | 2 +-
src/common/types/PolicyBucket.cpp | 2 +-
src/common/types/PolicyBucket.h | 2 +-
src/common/types/PolicyBucketId.h | 2 +-
src/common/types/PolicyCollection.h | 2 +-
src/common/types/PolicyKey.cpp | 2 +-
src/common/types/PolicyKey.h | 2 +-
src/common/types/PolicyKeyHelpers.cpp | 2 +-
src/common/types/PolicyKeyHelpers.h | 2 +-
src/common/types/PolicyResult.h | 2 +-
src/common/types/PolicyType.cpp | 2 +-
src/common/types/PolicyType.h | 2 +-
src/common/types/PolicyTypeExtension.h | 2 +-
src/common/types/ProtocolFields.h | 2 +-
src/common/types/pointers.h | 2 +-
src/helpers/creds-commons/creds-commons.cpp | 2 +-
src/helpers/creds-dbus/creds-dbus-inner.cpp | 2 +-
src/helpers/creds-dbus/creds-dbus-inner.h | 2 +-
src/helpers/creds-dbus/creds-dbus.cpp | 2 +-
src/helpers/creds-socket/creds-socket-inner.cpp | 2 +-
src/helpers/creds-socket/creds-socket-inner.h | 2 +-
src/helpers/creds-socket/creds-socket.cpp | 2 +-
src/helpers/session/session.cpp | 2 +-
src/include/cynara-admin-error.h | 2 +-
src/include/cynara-admin-types.h | 2 +-
src/include/cynara-admin.h | 2 +-
src/include/cynara-client-error.h | 2 +-
src/include/cynara-client.h | 2 +-
src/include/cynara-creds-commons.h | 2 +-
src/include/cynara-creds-dbus.h | 2 +-
src/include/cynara-creds-socket.h | 2 +-
src/include/cynara-offline-admin.h | 2 +-
src/include/cynara-session.h | 2 +-
src/service/logic/Logic.cpp | 2 +-
src/service/logic/Logic.h | 2 +-
src/service/main/Cynara.cpp | 2 +-
src/service/main/Cynara.h | 2 +-
src/service/main/main.cpp | 2 +-
src/service/main/pointers.h | 2 +-
src/service/sockets/Descriptor.cpp | 2 +-
src/service/sockets/Descriptor.h | 2 +-
src/service/sockets/SocketManager.cpp | 2 +-
src/service/sockets/SocketManager.h | 2 +-
src/storage/BucketDeserializer.cpp | 2 +-
src/storage/BucketDeserializer.h | 2 +-
src/storage/Buckets.h | 2 +-
src/storage/InMemoryStorageBackend.cpp | 2 +-
src/storage/InMemoryStorageBackend.h | 2 +-
src/storage/Storage.cpp | 2 +-
src/storage/Storage.h | 2 +-
src/storage/StorageBackend.h | 2 +-
src/storage/StorageDeserializer.cpp | 2 +-
src/storage/StorageDeserializer.h | 2 +-
src/storage/StorageSerializer.cpp | 2 +-
src/storage/StorageSerializer.h | 2 +-
test/Benchmark.h | 2 +-
test/TestEventListenerProxy.cpp | 2 +-
test/TestEventListenerProxy.h | 2 +-
test/common/exceptions/bucketrecordcorrupted.cpp | 2 +-
test/common/types/policybucket.cpp | 2 +-
test/helpers.cpp | 2 +-
test/helpers.h | 2 +-
test/storage/inmemorystoragebackend/buckets.cpp | 2 +-
.../inmemorystoragebackend/fakeinmemorystoragebackend.h | 2 +-
.../inmemorystoragebackend/inmemeorystoragebackendfixture.h | 2 +-
test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp | 2 +-
test/storage/inmemorystoragebackend/search.cpp | 2 +-
test/storage/performance/bucket.cpp | 2 +-
test/storage/serializer/bucket_load.cpp | 2 +-
test/storage/serializer/deserialize.cpp | 2 +-
test/storage/serializer/dump.cpp | 2 +-
test/storage/serializer/dump_load.cpp | 2 +-
test/storage/serializer/serialize.cpp | 2 +-
test/storage/storage/buckets.cpp | 2 +-
test/storage/storage/check.cpp | 2 +-
test/storage/storage/fakestoragebackend.h | 2 +-
test/storage/storage/policies.cpp | 2 +-
test/tests.cpp | 2 +-
test/types/policykey.cpp | 2 +-
167 files changed, 174 insertions(+), 174 deletions(-)
diff --git a/src/admin/api/ApiInterface.h b/src/admin/api/ApiInterface.h
index e7f3e3a..bbfe98d 100644
--- a/src/admin/api/ApiInterface.h
+++ b/src/admin/api/ApiInterface.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file ApiInterface.h
+ * @file src/admin/api/ApiInterface.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains libcynara-admin API interface definition.
diff --git a/src/admin/api/admin-api.cpp b/src/admin/api/admin-api.cpp
index f643dd0..fe426fb 100644
--- a/src/admin/api/admin-api.cpp
+++ b/src/admin/api/admin-api.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file admin-api.cpp
+ * @file src/admin/api/admin-api.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of external libcynara-admin API
diff --git a/src/admin/logic/Logic.cpp b/src/admin/logic/Logic.cpp
index fe05d6b..95ececc 100644
--- a/src/admin/logic/Logic.cpp
+++ b/src/admin/logic/Logic.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file Logic.cpp
+ * @file src/admin/logic/Logic.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains implementation of Logic class - main libcynara-admin class
diff --git a/src/admin/logic/Logic.h b/src/admin/logic/Logic.h
index 4ae8ea4..8a274ff 100644
--- a/src/admin/logic/Logic.h
+++ b/src/admin/logic/Logic.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file Logic.h
+ * @file src/admin/logic/Logic.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains definition of Logic class - main libcynara-admin class
diff --git a/src/client-common/cache/CacheInterface.h b/src/client-common/cache/CacheInterface.h
index ffc1a7b..57455b8 100644
--- a/src/client-common/cache/CacheInterface.h
+++ b/src/client-common/cache/CacheInterface.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file CacheInterface.h
+ * @file src/client-common/cache/CacheInterface.h
* @author Lukasz Wojciechowski
* @author Zofia Abramowska
* @version 1.0
diff --git a/src/client-common/cache/CapacityCache.cpp b/src/client-common/cache/CapacityCache.cpp
index 6f8a57e..c4cf680 100644
--- a/src/client-common/cache/CapacityCache.cpp
+++ b/src/client-common/cache/CapacityCache.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file CapacityCache.cpp
+ * @file src/client-common/cache/CapacityCache.cpp
* @author Zofia Abramowska
* @version 1.0
* @brief This file contains capacity cache implementation.
diff --git a/src/client-common/cache/CapacityCache.h b/src/client-common/cache/CapacityCache.h
index 42e94e9..5bb083e 100644
--- a/src/client-common/cache/CapacityCache.h
+++ b/src/client-common/cache/CapacityCache.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file CapacityCache.h
+ * @file src/client-common/cache/CapacityCache.h
* @author Zofia Abramowska
* @version 1.0
* @brief This file contains capacity cache header.
diff --git a/src/client-common/plugins/NaiveInterpreter.h b/src/client-common/plugins/NaiveInterpreter.h
index b5e4f6d..e16f463 100644
--- a/src/client-common/plugins/NaiveInterpreter.h
+++ b/src/client-common/plugins/NaiveInterpreter.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file NaiveInterpreter.h
+ * @file src/client-common/plugins/NaiveInterpreter.h
* @author Zofia Abramowska
* @version 1.0
* @brief This file contains PolicyType naive interpreter implementation.
diff --git a/src/client-common/plugins/PluginInterface.h b/src/client-common/plugins/PluginInterface.h
index 07643c3..f1e7ef9 100644
--- a/src/client-common/plugins/PluginInterface.h
+++ b/src/client-common/plugins/PluginInterface.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file PluginInterface.h
+ * @file src/client-common/plugins/PluginInterface.h
* @author Zofia Abramowska
* @version 1.0
* @brief This file contains plugin interface definitions.
diff --git a/src/client/api/ApiInterface.h b/src/client/api/ApiInterface.h
index ec61363..3a724c5 100644
--- a/src/client/api/ApiInterface.h
+++ b/src/client/api/ApiInterface.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file ApiInterface.h
+ * @file src/client/api/ApiInterface.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains libcynara-client API interface definition.
diff --git a/src/client/api/client-api.cpp b/src/client/api/client-api.cpp
index 0e5dc8e..6d086a5 100644
--- a/src/client/api/client-api.cpp
+++ b/src/client/api/client-api.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file client-api.cpp
+ * @file src/client/api/client-api.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of external libcynara-client API
diff --git a/src/client/logic/Logic.cpp b/src/client/logic/Logic.cpp
index 66fe78f..e090fcc 100644
--- a/src/client/logic/Logic.cpp
+++ b/src/client/logic/Logic.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file Logic.cpp
+ * @file src/client/logic/Logic.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains implementation of Logic class - main libcynara-client class
diff --git a/src/client/logic/Logic.h b/src/client/logic/Logic.h
index 8f83d4a..8f8b1bb 100644
--- a/src/client/logic/Logic.h
+++ b/src/client/logic/Logic.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file Logic.h
+ * @file src/client/logic/Logic.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains definition of Logic class - main libcynara-client class
diff --git a/src/common/attributes/attributes.h b/src/common/attributes/attributes.h
index 6a949c9..be09d82 100644
--- a/src/common/attributes/attributes.h
+++ b/src/common/attributes/attributes.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file attributes.h
+ * @file src/common/attributes/attributes.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines common used attributes
diff --git a/src/common/attributes/debug_attributes.h b/src/common/attributes/debug_attributes.h
index aaeade2..71dc381 100644
--- a/src/common/attributes/debug_attributes.h
+++ b/src/common/attributes/debug_attributes.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file debug_attributes.h
+ * @file src/common/attributes/debug_attributes.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines debug related attributes
diff --git a/src/common/common.h b/src/common/common.h
index df149a7..5d93cdc 100644
--- a/src/common/common.h
+++ b/src/common/common.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file common.h
+ * @file src/common/common.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file binds includes from cynara common library
diff --git a/src/common/containers/BinaryQueue.cpp b/src/common/containers/BinaryQueue.cpp
index d2b2c5a..9a4afba 100644
--- a/src/common/containers/BinaryQueue.cpp
+++ b/src/common/containers/BinaryQueue.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BinaryQueue.cpp
+ * @file src/common/containers/BinaryQueue.cpp
* @author Przemyslaw Dobrowolski
* @author Lukasz Wojciechowski
* @version 1.0
diff --git a/src/common/containers/BinaryQueue.h b/src/common/containers/BinaryQueue.h
index 685c7fd..f69f786 100644
--- a/src/common/containers/BinaryQueue.h
+++ b/src/common/containers/BinaryQueue.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BinaryQueue.h
+ * @file src/common/containers/BinaryQueue.h
* @author Przemyslaw Dobrowolski
* @author Lukasz Wojciechowski
* @version 1.0
diff --git a/src/common/containers/RawBuffer.h b/src/common/containers/RawBuffer.h
index ee5839d..d2c0662 100644
--- a/src/common/containers/RawBuffer.h
+++ b/src/common/containers/RawBuffer.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file RawBuffer.h
+ * @file src/common/containers/RawBuffer.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines binary raw buffer type
diff --git a/src/common/exceptions/BucketDeserializationException.h b/src/common/exceptions/BucketDeserializationException.h
index 18a3727..c6b6f1d 100644
--- a/src/common/exceptions/BucketDeserializationException.h
+++ b/src/common/exceptions/BucketDeserializationException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BucketDeserializationException.h
+ * @file src/common/exceptions/BucketDeserializationException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of BucketDeserializationException
diff --git a/src/common/exceptions/BucketNotExistsException.h b/src/common/exceptions/BucketNotExistsException.h
index 7efb6a3..7802210 100644
--- a/src/common/exceptions/BucketNotExistsException.h
+++ b/src/common/exceptions/BucketNotExistsException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BucketNotExistsException.h
+ * @file src/common/exceptions/BucketNotExistsException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of BucketNotExistsException
diff --git a/src/common/exceptions/BucketRecordCorruptedException.h b/src/common/exceptions/BucketRecordCorruptedException.h
index c243c8e..4511fb5 100644
--- a/src/common/exceptions/BucketRecordCorruptedException.h
+++ b/src/common/exceptions/BucketRecordCorruptedException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BucketRecordCorruptedException.h
+ * @file src/common/exceptions/BucketRecordCorruptedException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of BucketRecordCorruptedException
diff --git a/src/common/exceptions/BucketSerializationException.h b/src/common/exceptions/BucketSerializationException.h
index 3084808..f6dba4c 100644
--- a/src/common/exceptions/BucketSerializationException.h
+++ b/src/common/exceptions/BucketSerializationException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BucketSerializationException.h
+ * @file src/common/exceptions/BucketSerializationException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of BucketSerializationException
diff --git a/src/common/exceptions/CannotCreateFileException.h b/src/common/exceptions/CannotCreateFileException.h
index fe3b71d..4195156 100644
--- a/src/common/exceptions/CannotCreateFileException.h
+++ b/src/common/exceptions/CannotCreateFileException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file CannotCreateFileException.h
+ * @file src/common/exceptions/CannotCreateFileException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines exception thrown when database file cannot be created
diff --git a/src/common/exceptions/DatabaseException.h b/src/common/exceptions/DatabaseException.h
index bfd1e27..9cbd2b4 100644
--- a/src/common/exceptions/DatabaseException.h
+++ b/src/common/exceptions/DatabaseException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file DatabaseException.h
+ * @file src/common/exceptions/DatabaseException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Common class for database exceptions
diff --git a/src/common/exceptions/DefaultBucketDeletionException.h b/src/common/exceptions/DefaultBucketDeletionException.h
index 9909376..9b75a00 100644
--- a/src/common/exceptions/DefaultBucketDeletionException.h
+++ b/src/common/exceptions/DefaultBucketDeletionException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file DefaultBucketDeletionException.h
+ * @file src/common/exceptions/DefaultBucketDeletionException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of DefaultBucketDeletionException
diff --git a/src/common/exceptions/DefaultBucketSetNoneException.h b/src/common/exceptions/DefaultBucketSetNoneException.h
index 0adf2d3..b7975cd 100644
--- a/src/common/exceptions/DefaultBucketSetNoneException.h
+++ b/src/common/exceptions/DefaultBucketSetNoneException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file DefaultBucketSetNoneException.h
+ * @file src/common/exceptions/DefaultBucketSetNoneException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of DefaultBucketSetNoneException
diff --git a/src/common/exceptions/DescriptorNotExistsException.h b/src/common/exceptions/DescriptorNotExistsException.h
index 1e285fc..badb64a 100644
--- a/src/common/exceptions/DescriptorNotExistsException.h
+++ b/src/common/exceptions/DescriptorNotExistsException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file DescriptorNotExistsException.h
+ * @file src/common/exceptions/DescriptorNotExistsException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of DescriptorNotExistsException
diff --git a/src/common/exceptions/Exception.h b/src/common/exceptions/Exception.h
index 666fd5c..4f5f5eb 100644
--- a/src/common/exceptions/Exception.h
+++ b/src/common/exceptions/Exception.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Exception.h
+ * @file src/common/exceptions/Exception.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Header for generic Cynara exception
diff --git a/src/common/exceptions/FileNotFoundException.h b/src/common/exceptions/FileNotFoundException.h
index 1ea3c69..e7aeead 100644
--- a/src/common/exceptions/FileNotFoundException.h
+++ b/src/common/exceptions/FileNotFoundException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file FileNotFoundException.h
+ * @file src/common/exceptions/FileNotFoundException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief This file defines exception thrown when database file is not found
diff --git a/src/common/exceptions/InitException.h b/src/common/exceptions/InitException.h
index 71f03f2..c93155c 100644
--- a/src/common/exceptions/InitException.h
+++ b/src/common/exceptions/InitException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file InitException.h
+ * @file src/common/exceptions/InitException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of InitException
diff --git a/src/common/exceptions/InvalidProtocolException.h b/src/common/exceptions/InvalidProtocolException.h
index 61e99ca..89d0e4b 100644
--- a/src/common/exceptions/InvalidProtocolException.h
+++ b/src/common/exceptions/InvalidProtocolException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file InvalidProtocolException.h
+ * @file src/common/exceptions/InvalidProtocolException.h
* @author Adam Malinowski
* @version 1.0
* @brief Implementation of InvalidProtocolException
diff --git a/src/common/exceptions/NotImplementedException.h b/src/common/exceptions/NotImplementedException.h
index 51cfe2d..1496fd7 100644
--- a/src/common/exceptions/NotImplementedException.h
+++ b/src/common/exceptions/NotImplementedException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file NotImplementedException.h
+ * @file src/common/exceptions/NotImplementedException.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of NotImplementedException
diff --git a/src/common/exceptions/NullPointerException.h b/src/common/exceptions/NullPointerException.h
index 54be160..47e4239 100644
--- a/src/common/exceptions/NullPointerException.h
+++ b/src/common/exceptions/NullPointerException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file NullPointerException.h
+ * @file src/common/exceptions/NullPointerException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of OutOfDataException
diff --git a/src/common/exceptions/OutOfDataException.h b/src/common/exceptions/OutOfDataException.h
index be77e4d..716df13 100644
--- a/src/common/exceptions/OutOfDataException.h
+++ b/src/common/exceptions/OutOfDataException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file OutOfDataException.h
+ * @file src/common/exceptions/OutOfDataException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of OutOfDataException
diff --git a/src/common/exceptions/PluginNotFoundException.h b/src/common/exceptions/PluginNotFoundException.h
index e0a0a16..3604075 100644
--- a/src/common/exceptions/PluginNotFoundException.h
+++ b/src/common/exceptions/PluginNotFoundException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PluginNotFoundException.h
+ * @file src/common/exceptions/PluginNotFoundException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of PluginNotFoundException
diff --git a/src/common/exceptions/ServerConnectionErrorException.h b/src/common/exceptions/ServerConnectionErrorException.h
index a7ff51c..fc550ce 100644
--- a/src/common/exceptions/ServerConnectionErrorException.h
+++ b/src/common/exceptions/ServerConnectionErrorException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ServerConnectionErrorException.h
+ * @file src/common/exceptions/ServerConnectionErrorException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of ServerConnectionErrorException
diff --git a/src/common/exceptions/UnexpectedErrorException.h b/src/common/exceptions/UnexpectedErrorException.h
index 2e54a78..ed0b72c 100644
--- a/src/common/exceptions/UnexpectedErrorException.h
+++ b/src/common/exceptions/UnexpectedErrorException.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file UnexpectedErrorException.h
+ * @file src/common/exceptions/UnexpectedErrorException.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief Implementation of UnexpectedErrorException
diff --git a/src/common/log/Backtrace.cpp b/src/common/log/Backtrace.cpp
index cf3a458..792352b 100644
--- a/src/common/log/Backtrace.cpp
+++ b/src/common/log/Backtrace.cpp
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file Backtrace.cpp
+ * @file src/common/log/Backtrace.cpp
* @author Adam Malinowski
* @version 1.0
* @brief Implementation of backtrace utility class.
diff --git a/src/common/log/Backtrace.h b/src/common/log/Backtrace.h
index 3e96237..0f15dd8 100644
--- a/src/common/log/Backtrace.h
+++ b/src/common/log/Backtrace.h
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file Backtrace.h
+ * @file src/common/log/Backtrace.h
* @author Adam Malinowski
* @version 1.0
* @brief Header file for backtrace utility class.
diff --git a/src/common/log/log.cpp b/src/common/log/log.cpp
index 6aa5e2d..bc28659 100644
--- a/src/common/log/log.cpp
+++ b/src/common/log/log.cpp
@@ -16,10 +16,10 @@
* limitations under the License
*/
/**
- * @file log.cpp
- * @author Adam Malinowski
- * @version 1.0
- * @brief Simple file containing defintion of logging level variable.
+ * @file src/common/log/log.cpp
+ * @author Adam Malinowski
+ * @version 1.0
+ * @brief Simple file containing defintion of logging level variable.
*/
#include "log.h"
diff --git a/src/common/log/log.h b/src/common/log/log.h
index e3b62b5..ccb0710 100644
--- a/src/common/log/log.h
+++ b/src/common/log/log.h
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file log.h
+ * @file src/common/log/log.h
* @author Adam Malinowski
* @version 1.0
* @brief This file defines logging utilities.
diff --git a/src/common/protocol/Protocol.h b/src/common/protocol/Protocol.h
index d5d5280..b98f145 100644
--- a/src/common/protocol/Protocol.h
+++ b/src/common/protocol/Protocol.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Protocol.h
+ * @file src/common/protocol/Protocol.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines protocol base class
diff --git a/src/common/protocol/ProtocolAdmin.cpp b/src/common/protocol/ProtocolAdmin.cpp
index cc1ec0b..7d7d0f9 100644
--- a/src/common/protocol/ProtocolAdmin.cpp
+++ b/src/common/protocol/ProtocolAdmin.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolAdmin.cpp
+ * @file src/common/protocol/ProtocolAdmin.cpp
* @author Lukasz Wojciechowski
* @author Adam Malinowski
* @version 1.0
diff --git a/src/common/protocol/ProtocolAdmin.h b/src/common/protocol/ProtocolAdmin.h
index 880d32a..2d1e702 100644
--- a/src/common/protocol/ProtocolAdmin.h
+++ b/src/common/protocol/ProtocolAdmin.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolAdmin.h
+ * @file src/common/protocol/ProtocolAdmin.h
* @author Lukasz Wojciechowski
* @author Adam Malinowski
* @version 1.0
diff --git a/src/common/protocol/ProtocolClient.cpp b/src/common/protocol/ProtocolClient.cpp
index 516bbb5..5101900 100644
--- a/src/common/protocol/ProtocolClient.cpp
+++ b/src/common/protocol/ProtocolClient.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolClient.cpp
+ * @file src/common/protocol/ProtocolClient.cpp
* @author Lukasz Wojciechowski
* @author Adam Malinowski
* @version 1.0
diff --git a/src/common/protocol/ProtocolClient.h b/src/common/protocol/ProtocolClient.h
index 0165435..9493a88 100644
--- a/src/common/protocol/ProtocolClient.h
+++ b/src/common/protocol/ProtocolClient.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolClient.h
+ * @file src/common/protocol/ProtocolClient.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines protocol class for communication with client
diff --git a/src/common/protocol/ProtocolFrame.cpp b/src/common/protocol/ProtocolFrame.cpp
index 7a3fdec..560217e 100644
--- a/src/common/protocol/ProtocolFrame.cpp
+++ b/src/common/protocol/ProtocolFrame.cpp
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolFrame.cpp
+ * @file src/common/protocol/ProtocolFrame.cpp
* @author Adam Malinowski
* @version 1.0
* @brief Implementation of ProtocolFrame class.
diff --git a/src/common/protocol/ProtocolFrame.h b/src/common/protocol/ProtocolFrame.h
index 1ff9021..3d85cc0 100644
--- a/src/common/protocol/ProtocolFrame.h
+++ b/src/common/protocol/ProtocolFrame.h
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolFrame.h
+ * @file src/common/protocol/ProtocolFrame.h
* @author Adam Malinowski
* @version 1.0
* @brief Header for ProtocolFrame class.
diff --git a/src/common/protocol/ProtocolFrameHeader.cpp b/src/common/protocol/ProtocolFrameHeader.cpp
index dc982c7..a07a4c4 100644
--- a/src/common/protocol/ProtocolFrameHeader.cpp
+++ b/src/common/protocol/ProtocolFrameHeader.cpp
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolFrameHeader.cpp
+ * @file src/common/protocol/ProtocolFrameHeader.cpp
* @author Adam Malinowski
* @version 1.0
* @brief Implementation of protocol frame header (de)serializer class.
diff --git a/src/common/protocol/ProtocolFrameHeader.h b/src/common/protocol/ProtocolFrameHeader.h
index ff9cd81..ff92bf9 100644
--- a/src/common/protocol/ProtocolFrameHeader.h
+++ b/src/common/protocol/ProtocolFrameHeader.h
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolFrameHeader.h
+ * @file src/common/protocol/ProtocolFrameHeader.h
* @author Adam Malinowski
* @version 1.0
* @brief Header file for protocol frame header (de)serializer class.
diff --git a/src/common/protocol/ProtocolFrameSerializer.cpp b/src/common/protocol/ProtocolFrameSerializer.cpp
index 7eaa8bb..88a07d3 100644
--- a/src/common/protocol/ProtocolFrameSerializer.cpp
+++ b/src/common/protocol/ProtocolFrameSerializer.cpp
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolFrameSerializer.cpp
+ * @file src/common/protocol/ProtocolFrameSerializer.cpp
* @author Adam Malinowski
* @version 1.0
* @brief Implementation of protocol frame (de)serializer class.
diff --git a/src/common/protocol/ProtocolFrameSerializer.h b/src/common/protocol/ProtocolFrameSerializer.h
index ca9d914..8961e14 100644
--- a/src/common/protocol/ProtocolFrameSerializer.h
+++ b/src/common/protocol/ProtocolFrameSerializer.h
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolFrameSerializer.h
+ * @file src/common/protocol/ProtocolFrameSerializer.h
* @author Adam Malinowski
* @version 1.0
* @brief Header file for protocol frame (de)serialization.
diff --git a/src/common/protocol/ProtocolOpCode.h b/src/common/protocol/ProtocolOpCode.h
index 0ebf75c..7319ad3 100644
--- a/src/common/protocol/ProtocolOpCode.h
+++ b/src/common/protocol/ProtocolOpCode.h
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolOpCode.h
+ * @file src/common/protocol/ProtocolOpCode.h
* @author Adam Malinowski
* @version 1.0
* @brief Decalaration of protocol frame operation codes.
diff --git a/src/common/protocol/ProtocolSerialization.cpp b/src/common/protocol/ProtocolSerialization.cpp
index 87b12c7..b1a246e 100644
--- a/src/common/protocol/ProtocolSerialization.cpp
+++ b/src/common/protocol/ProtocolSerialization.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolSerialization.cpp
+ * @file src/common/protocol/ProtocolSerialization.cpp
* @author Tomasz Swierczek (t.swierczek@samsung.com)
* @version 1.0
* @brief This file is the implementation file of data serialization.
diff --git a/src/common/protocol/ProtocolSerialization.h b/src/common/protocol/ProtocolSerialization.h
index f3acff7..06cd05d 100644
--- a/src/common/protocol/ProtocolSerialization.h
+++ b/src/common/protocol/ProtocolSerialization.h
@@ -14,11 +14,11 @@
* limitations under the License.
*/
/**
- * @file ProtocolSerialization.h
- * @author Tomasz Swierczek (t.swierczek@samsung.com)
- * @author Adam Malinowski (a.malinowsk2@samsung.com)
- * @version 1.0
- * @brief Interfaces and templates used for data serialization.
+ * @file src/common/protocol/ProtocolSerialization.h
+ * @author Tomasz Swierczek (t.swierczek@samsung.com)
+ * @author Adam Malinowski (a.malinowsk2@samsung.com)
+ * @version 1.0
+ * @brief Interfaces and templates used for data serialization.
*/
#ifndef SRC_COMMON_PROTOCOL_PROTOCOLSERIALIZATION_H_
#define SRC_COMMON_PROTOCOL_PROTOCOLSERIALIZATION_H_
diff --git a/src/common/protocol/ProtocolSignal.cpp b/src/common/protocol/ProtocolSignal.cpp
index f4c5dc2..963ee9a 100644
--- a/src/common/protocol/ProtocolSignal.cpp
+++ b/src/common/protocol/ProtocolSignal.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolSignal.cpp
+ * @file src/common/protocol/ProtocolSignal.cpp
* @author Lukasz Wojciechowski
* @author Adam Malinowski
* @version 1.0
diff --git a/src/common/protocol/ProtocolSignal.h b/src/common/protocol/ProtocolSignal.h
index bb9fc3b..e2142da 100644
--- a/src/common/protocol/ProtocolSignal.h
+++ b/src/common/protocol/ProtocolSignal.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolSignal.h
+ * @file src/common/protocol/ProtocolSignal.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines protocol class for signals
diff --git a/src/common/request/AdminCheckRequest.cpp b/src/common/request/AdminCheckRequest.cpp
index 0b5b3e0..d8608be 100644
--- a/src/common/request/AdminCheckRequest.cpp
+++ b/src/common/request/AdminCheckRequest.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file AdminCheckRequest.cpp
+ * @file src/common/request/AdminCheckRequest.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements admin check request class
diff --git a/src/common/request/AdminCheckRequest.h b/src/common/request/AdminCheckRequest.h
index a0817a4..96e2d0e 100644
--- a/src/common/request/AdminCheckRequest.h
+++ b/src/common/request/AdminCheckRequest.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file AdminCheckRequest.h
+ * @file src/common/request/AdminCheckRequest.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines admin check request class
diff --git a/src/common/request/CheckRequest.cpp b/src/common/request/CheckRequest.cpp
index 35fd7ad..149c0c6 100644
--- a/src/common/request/CheckRequest.cpp
+++ b/src/common/request/CheckRequest.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file CheckRequest.cpp
+ * @file src/common/request/CheckRequest.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements check request class
diff --git a/src/common/request/CheckRequest.h b/src/common/request/CheckRequest.h
index 945e442..263c4d6 100644
--- a/src/common/request/CheckRequest.h
+++ b/src/common/request/CheckRequest.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file CheckRequest.h
+ * @file src/common/request/CheckRequest.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines check request class
diff --git a/src/common/request/InsertOrUpdateBucketRequest.cpp b/src/common/request/InsertOrUpdateBucketRequest.cpp
index ab49640..7d51e01 100644
--- a/src/common/request/InsertOrUpdateBucketRequest.cpp
+++ b/src/common/request/InsertOrUpdateBucketRequest.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file InsertOrUpdateBucketRequest.cpp
+ * @file src/common/request/InsertOrUpdateBucketRequest.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements request class for inserting or updating policy bucket
diff --git a/src/common/request/InsertOrUpdateBucketRequest.h b/src/common/request/InsertOrUpdateBucketRequest.h
index 32c8d05..1ad1e89 100644
--- a/src/common/request/InsertOrUpdateBucketRequest.h
+++ b/src/common/request/InsertOrUpdateBucketRequest.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file InsertOrUpdateBucketRequest.h
+ * @file src/common/request/InsertOrUpdateBucketRequest.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines request class for inserting or updating policy bucket
diff --git a/src/common/request/RemoveBucketRequest.cpp b/src/common/request/RemoveBucketRequest.cpp
index b328f06..dead83d 100644
--- a/src/common/request/RemoveBucketRequest.cpp
+++ b/src/common/request/RemoveBucketRequest.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file RemoveBucketRequest.cpp
+ * @file src/common/request/RemoveBucketRequest.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements request class for bucket removal
diff --git a/src/common/request/RemoveBucketRequest.h b/src/common/request/RemoveBucketRequest.h
index 69314a3..1172a5f 100644
--- a/src/common/request/RemoveBucketRequest.h
+++ b/src/common/request/RemoveBucketRequest.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file RemoveBucketRequest.h
+ * @file src/common/request/RemoveBucketRequest.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines request class for bucket removal
diff --git a/src/common/request/Request.h b/src/common/request/Request.h
index a1e1a4b..e890868 100644
--- a/src/common/request/Request.h
+++ b/src/common/request/Request.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Request.h
+ * @file src/common/request/Request.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines request base class
diff --git a/src/common/request/RequestContext.h b/src/common/request/RequestContext.h
index 209786b..33b6ef4 100644
--- a/src/common/request/RequestContext.h
+++ b/src/common/request/RequestContext.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file RequestContext.h
+ * @file src/common/request/RequestContext.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines request context class
diff --git a/src/common/request/RequestTaker.cpp b/src/common/request/RequestTaker.cpp
index 965ce42..d645aee 100644
--- a/src/common/request/RequestTaker.cpp
+++ b/src/common/request/RequestTaker.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file RequestTaker.cpp
+ * @file src/common/request/RequestTaker.cpp
* @author Lukasz Wojciechowski
* @author Adam Malinowski
* @version 1.0
diff --git a/src/common/request/RequestTaker.h b/src/common/request/RequestTaker.h
index 8c13e76..6f1f112 100644
--- a/src/common/request/RequestTaker.h
+++ b/src/common/request/RequestTaker.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file RequestTaker.h
+ * @file src/common/request/RequestTaker.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines RequestTaker class
diff --git a/src/common/request/SetPoliciesRequest.cpp b/src/common/request/SetPoliciesRequest.cpp
index 7e73a44..82e10ff 100644
--- a/src/common/request/SetPoliciesRequest.cpp
+++ b/src/common/request/SetPoliciesRequest.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file SetPoliciesRequest.cpp
+ * @file src/common/request/SetPoliciesRequest.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements request class for modifying policies
diff --git a/src/common/request/SetPoliciesRequest.h b/src/common/request/SetPoliciesRequest.h
index ee9c7a2..eb2362f 100644
--- a/src/common/request/SetPoliciesRequest.h
+++ b/src/common/request/SetPoliciesRequest.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file SetPoliciesRequest.h
+ * @file src/common/request/SetPoliciesRequest.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines request class for modifying policies
diff --git a/src/common/request/SignalRequest.cpp b/src/common/request/SignalRequest.cpp
index a3ac6c1..c881c5d 100644
--- a/src/common/request/SignalRequest.cpp
+++ b/src/common/request/SignalRequest.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file SignalRequest.cpp
+ * @file src/common/request/SignalRequest.cpp
* @author Adam Malinowski
* @version 1.0
* @brief This file implements signal request class
diff --git a/src/common/request/SignalRequest.h b/src/common/request/SignalRequest.h
index faf01cd..97314aa 100644
--- a/src/common/request/SignalRequest.h
+++ b/src/common/request/SignalRequest.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file SignalRequest.h
+ * @file src/common/request/SignalRequest.h
* @author Adam Malinowski
* @version 1.0
* @brief This file defines signal request class
diff --git a/src/common/request/pointers.h b/src/common/request/pointers.h
index 71bee15..5800321 100644
--- a/src/common/request/pointers.h
+++ b/src/common/request/pointers.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file pointers.h
+ * @file src/common/request/pointers.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines request classes pointers
diff --git a/src/common/response/CheckResponse.cpp b/src/common/response/CheckResponse.cpp
index 27ed102..96f20ff 100644
--- a/src/common/response/CheckResponse.cpp
+++ b/src/common/response/CheckResponse.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file CheckResponse.cpp
+ * @file src/common/response/CheckResponse.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements check response class
diff --git a/src/common/response/CheckResponse.h b/src/common/response/CheckResponse.h
index 0e1f99b..9f6f9e0 100644
--- a/src/common/response/CheckResponse.h
+++ b/src/common/response/CheckResponse.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file CheckResponse.h
+ * @file src/common/response/CheckResponse.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines response class for check request
diff --git a/src/common/response/CodeResponse.cpp b/src/common/response/CodeResponse.cpp
index 26fdb33..bec8e96 100644
--- a/src/common/response/CodeResponse.cpp
+++ b/src/common/response/CodeResponse.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file CodeResponse.cpp
+ * @file src/common/response/CodeResponse.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements class for responding to a request with a code
diff --git a/src/common/response/CodeResponse.h b/src/common/response/CodeResponse.h
index 11f2e89..8544310 100644
--- a/src/common/response/CodeResponse.h
+++ b/src/common/response/CodeResponse.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file CodeResponse.h
+ * @file src/common/response/CodeResponse.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines class for responding to a request with a code
diff --git a/src/common/response/Response.h b/src/common/response/Response.h
index 9f9dfe1..406bd76 100644
--- a/src/common/response/Response.h
+++ b/src/common/response/Response.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Response.h
+ * @file src/common/response/Response.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines response base class
diff --git a/src/common/response/ResponseTaker.cpp b/src/common/response/ResponseTaker.cpp
index 125efef..7da0dfb 100644
--- a/src/common/response/ResponseTaker.cpp
+++ b/src/common/response/ResponseTaker.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ResponseTaker.cpp
+ * @file src/common/response/ResponseTaker.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements ResponseTaker class
diff --git a/src/common/response/ResponseTaker.h b/src/common/response/ResponseTaker.h
index 400aea3..41425d8 100644
--- a/src/common/response/ResponseTaker.h
+++ b/src/common/response/ResponseTaker.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ResponseTaker.h
+ * @file src/common/response/ResponseTaker.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines ResponseTaker class
diff --git a/src/common/response/pointers.h b/src/common/response/pointers.h
index 0c551c4..088c533 100644
--- a/src/common/response/pointers.h
+++ b/src/common/response/pointers.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file pointers.h
+ * @file src/common/response/pointers.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines response classes pointers
diff --git a/src/common/sockets/Socket.cpp b/src/common/sockets/Socket.cpp
index 1a59357..51cd495 100644
--- a/src/common/sockets/Socket.cpp
+++ b/src/common/sockets/Socket.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file Socket.cpp
+ * @file src/common/sockets/Socket.cpp
* @author Bartlomiej Grzelewski
* @author Lukasz Wojciechowski
* @version 1.0
diff --git a/src/common/sockets/Socket.h b/src/common/sockets/Socket.h
index 942d356..95991db 100644
--- a/src/common/sockets/Socket.h
+++ b/src/common/sockets/Socket.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file Socket.h
+ * @file src/common/sockets/Socket.h
* @author Bartlomiej Grzelewski
* @author Lukasz Wojciechowski
* @version 1.0
diff --git a/src/common/sockets/SocketClient.cpp b/src/common/sockets/SocketClient.cpp
index 667c68b..a23c438 100644
--- a/src/common/sockets/SocketClient.cpp
+++ b/src/common/sockets/SocketClient.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file SocketClient.cpp
+ * @file src/common/sockets/SocketClient.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains implementation of cynara's socket client
diff --git a/src/common/sockets/SocketClient.h b/src/common/sockets/SocketClient.h
index d156241..a96107e 100644
--- a/src/common/sockets/SocketClient.h
+++ b/src/common/sockets/SocketClient.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file SocketClient.h
+ * @file src/common/sockets/SocketClient.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains definition of cynara's socket client
diff --git a/src/common/types/ClientSession.h b/src/common/types/ClientSession.h
index b71c891..8159a68 100644
--- a/src/common/types/ClientSession.h
+++ b/src/common/types/ClientSession.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file ClientSession.h
+ * @file src/common/types/ClientSession.h
* @author Zofia Abramowska
* @version 1.0
* @brief Description of user defined session type
diff --git a/src/common/types/Policy.h b/src/common/types/Policy.h
index 0afe887..ee8fff7 100644
--- a/src/common/types/Policy.h
+++ b/src/common/types/Policy.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Policy.h
+ * @file src/common/types/Policy.h
* @author Lukasz Wojciechowski
* @author Aleksander Zdyb
* @version 1.0
diff --git a/src/common/types/PolicyBucket.cpp b/src/common/types/PolicyBucket.cpp
index a28d429..4b9b508 100644
--- a/src/common/types/PolicyBucket.cpp
+++ b/src/common/types/PolicyBucket.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyBucket.cpp
+ * @file src/common/types/PolicyBucket.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of Cynara::PolicyBucket methods
diff --git a/src/common/types/PolicyBucket.h b/src/common/types/PolicyBucket.h
index 376e7a7..92c5f36 100644
--- a/src/common/types/PolicyBucket.h
+++ b/src/common/types/PolicyBucket.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyBucket.h
+ * @file src/common/types/PolicyBucket.h
* @author Lukasz Wojciechowski
* @author Aleksander Zdyb
* @version 1.0
diff --git a/src/common/types/PolicyBucketId.h b/src/common/types/PolicyBucketId.h
index 44fd4c4..525a988 100644
--- a/src/common/types/PolicyBucketId.h
+++ b/src/common/types/PolicyBucketId.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyBucketId.h
+ * @file src/common/types/PolicyBucketId.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Definition of Cynara::PolicyBucketId type
diff --git a/src/common/types/PolicyCollection.h b/src/common/types/PolicyCollection.h
index c4619c6..18dd950 100644
--- a/src/common/types/PolicyCollection.h
+++ b/src/common/types/PolicyCollection.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyCollection.h
+ * @file src/common/types/PolicyCollection.h
* @author Lukasz Wojciechowski
* @author Aleksander Zdyb
* @version 1.0
diff --git a/src/common/types/PolicyKey.cpp b/src/common/types/PolicyKey.cpp
index 06380cb..14b3bc6 100644
--- a/src/common/types/PolicyKey.cpp
+++ b/src/common/types/PolicyKey.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyKey.cpp
+ * @file src/common/types/PolicyKey.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of Cynara:PolicyKey methods
diff --git a/src/common/types/PolicyKey.h b/src/common/types/PolicyKey.h
index 2608310..6bf0302 100644
--- a/src/common/types/PolicyKey.h
+++ b/src/common/types/PolicyKey.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyKey.h
+ * @file src/common/types/PolicyKey.h
* @author Lukasz Wojciechowski
* @author Aleksander Zdyb
* @version 1.0
diff --git a/src/common/types/PolicyKeyHelpers.cpp b/src/common/types/PolicyKeyHelpers.cpp
index f66612f..8c1de06 100644
--- a/src/common/types/PolicyKeyHelpers.cpp
+++ b/src/common/types/PolicyKeyHelpers.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyKeyHelpers.cpp
+ * @file src/common/types/PolicyKeyHelpers.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Helper functions to manage Cynara::PolicyKey
diff --git a/src/common/types/PolicyKeyHelpers.h b/src/common/types/PolicyKeyHelpers.h
index befc0f7..d049d49 100644
--- a/src/common/types/PolicyKeyHelpers.h
+++ b/src/common/types/PolicyKeyHelpers.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyKeyHelpers.h
+ * @file src/common/types/PolicyKeyHelpers.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Helper functions to manage Cynara::PolicyKey
diff --git a/src/common/types/PolicyResult.h b/src/common/types/PolicyResult.h
index 8e26673..28974d7 100644
--- a/src/common/types/PolicyResult.h
+++ b/src/common/types/PolicyResult.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyResult.h
+ * @file src/common/types/PolicyResult.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Definitions of PolicyResult and friends
diff --git a/src/common/types/PolicyType.cpp b/src/common/types/PolicyType.cpp
index 7ba9e62..3d8c3ca 100644
--- a/src/common/types/PolicyType.cpp
+++ b/src/common/types/PolicyType.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyType.cpp
+ * @file src/common/types/PolicyType.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of functions for Cynara::PolicyType
diff --git a/src/common/types/PolicyType.h b/src/common/types/PolicyType.h
index 410a067..5bef612 100644
--- a/src/common/types/PolicyType.h
+++ b/src/common/types/PolicyType.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyType.h
+ * @file src/common/types/PolicyType.h
* @author Lukasz Wojciechowski
* @author Aleksander Zdyb
* @version 1.0
diff --git a/src/common/types/PolicyTypeExtension.h b/src/common/types/PolicyTypeExtension.h
index 2f69131..5879a09 100644
--- a/src/common/types/PolicyTypeExtension.h
+++ b/src/common/types/PolicyTypeExtension.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file PolicyTypeExtension.h
+ * @file src/common/types/PolicyTypeExtension.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines an extension type for policy. It can be
diff --git a/src/common/types/ProtocolFields.h b/src/common/types/ProtocolFields.h
index 6d86d68..cfa15c2 100644
--- a/src/common/types/ProtocolFields.h
+++ b/src/common/types/ProtocolFields.h
@@ -16,7 +16,7 @@
* limitations under the License.
*/
/**
- * @file ProtocolFields.h
+ * @file src/common/types/ProtocolFields.h
* @author Adam Malinowski
* @version 1.0
* @brief Types definition for protocol frame fields.
diff --git a/src/common/types/pointers.h b/src/common/types/pointers.h
index 6971bee..964b731 100644
--- a/src/common/types/pointers.h
+++ b/src/common/types/pointers.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file pointers.h
+ * @file src/common/types/pointers.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Typedefs for smart pointers of common types
diff --git a/src/helpers/creds-commons/creds-commons.cpp b/src/helpers/creds-commons/creds-commons.cpp
index daca847..3fa1c9b 100644
--- a/src/helpers/creds-commons/creds-commons.cpp
+++ b/src/helpers/creds-commons/creds-commons.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file creds-commons.cpp
+ * @file src/helpers/creds-commons/creds-commons.cpp
* @author Lukasz Wojciechowski
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
diff --git a/src/helpers/creds-dbus/creds-dbus-inner.cpp b/src/helpers/creds-dbus/creds-dbus-inner.cpp
index a691621..34ad453 100644
--- a/src/helpers/creds-dbus/creds-dbus-inner.cpp
+++ b/src/helpers/creds-dbus/creds-dbus-inner.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file creds-dbus-inner.cpp
+ * @file src/helpers/creds-dbus/creds-dbus-inner.cpp
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/helpers/creds-dbus/creds-dbus-inner.h b/src/helpers/creds-dbus/creds-dbus-inner.h
index a2c72f4..c190e6c 100644
--- a/src/helpers/creds-dbus/creds-dbus-inner.h
+++ b/src/helpers/creds-dbus/creds-dbus-inner.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file creds-dbus-inner.h
+ * @file src/helpers/creds-dbus/creds-dbus-inner.h
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/helpers/creds-dbus/creds-dbus.cpp b/src/helpers/creds-dbus/creds-dbus.cpp
index 2b0c74e..e0b235d 100644
--- a/src/helpers/creds-dbus/creds-dbus.cpp
+++ b/src/helpers/creds-dbus/creds-dbus.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file creds-dbus.cpp
+ * @file src/helpers/creds-dbus/creds-dbus.cpp
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/helpers/creds-socket/creds-socket-inner.cpp b/src/helpers/creds-socket/creds-socket-inner.cpp
index 769a769..320fca5 100644
--- a/src/helpers/creds-socket/creds-socket-inner.cpp
+++ b/src/helpers/creds-socket/creds-socket-inner.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file creds-socket-inner.cpp
+ * @file src/helpers/creds-socket/creds-socket-inner.cpp
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/helpers/creds-socket/creds-socket-inner.h b/src/helpers/creds-socket/creds-socket-inner.h
index 831992f..44d92dc 100644
--- a/src/helpers/creds-socket/creds-socket-inner.h
+++ b/src/helpers/creds-socket/creds-socket-inner.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file creds-socket-inner.h
+ * @file src/helpers/creds-socket/creds-socket-inner.h
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/helpers/creds-socket/creds-socket.cpp b/src/helpers/creds-socket/creds-socket.cpp
index c78a9eb..d60c241 100644
--- a/src/helpers/creds-socket/creds-socket.cpp
+++ b/src/helpers/creds-socket/creds-socket.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file creds-socket.cpp
+ * @file src/helpers/creds-socket/creds-socket.cpp
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/helpers/session/session.cpp b/src/helpers/session/session.cpp
index d7a7f18..b799083 100644
--- a/src/helpers/session/session.cpp
+++ b/src/helpers/session/session.cpp
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file session.cpp
+ * @file src/helpers/session/session.cpp
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/include/cynara-admin-error.h b/src/include/cynara-admin-error.h
index 0f5c4d1..4b9cad9 100644
--- a/src/include/cynara-admin-error.h
+++ b/src/include/cynara-admin-error.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file cynara-admin-error.h
+ * @file src/include/cynara-admin-error.h
* @author Lukasz Wojciechowski
* @author Zofia Abramowska
* @version 1.0
diff --git a/src/include/cynara-admin-types.h b/src/include/cynara-admin-types.h
index 0b9a91e..073881a 100644
--- a/src/include/cynara-admin-types.h
+++ b/src/include/cynara-admin-types.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * \file cynara-admin-types.h
+ * \file src/include/cynara-admin-types.h
* \author Lukasz Wojciechowski
* \author Aleksander Zdyb
* \version 1.0
diff --git a/src/include/cynara-admin.h b/src/include/cynara-admin.h
index 0f1e04b..a31b1c5 100644
--- a/src/include/cynara-admin.h
+++ b/src/include/cynara-admin.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * \file cynara-admin.h
+ * @file src/include/cynara-admin.h
* \author Lukasz Wojciechowski
* \version 1.0
* \brief This file contains administration APIs of cynara available with libcynara-admin.
diff --git a/src/include/cynara-client-error.h b/src/include/cynara-client-error.h
index 572ed9f..36d20f4 100644
--- a/src/include/cynara-client-error.h
+++ b/src/include/cynara-client-error.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file cynara-client-error.h
+ * @file src/include/cynara-client-error.h
* @author Lukasz Wojciechowski
* @author Zofia Abramowska
* @version 1.0
diff --git a/src/include/cynara-client.h b/src/include/cynara-client.h
index a67c607..dcdab40 100644
--- a/src/include/cynara-client.h
+++ b/src/include/cynara-client.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file cynara-client.h
+ * @file src/include/cynara-client.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file contains client APIs of Cynara available with libcynara-client.
diff --git a/src/include/cynara-creds-commons.h b/src/include/cynara-creds-commons.h
index 49577a3..0bb3e69 100644
--- a/src/include/cynara-creds-commons.h
+++ b/src/include/cynara-creds-commons.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file cynara-creds-commons.h
+ * @file src/include/cynara-creds-commons.h
* @author Lukasz Wojciechowski
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
diff --git a/src/include/cynara-creds-dbus.h b/src/include/cynara-creds-dbus.h
index fe14278..6f24f74 100644
--- a/src/include/cynara-creds-dbus.h
+++ b/src/include/cynara-creds-dbus.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file cynara-creds-dbus.h
+ * @file src/include/cynara-creds-dbus.h
* @author Lukasz Wojciechowski
* @author Radoslaw Bartosiak
* @version 1.0
diff --git a/src/include/cynara-creds-socket.h b/src/include/cynara-creds-socket.h
index 4ffeab8..e9dc2af 100644
--- a/src/include/cynara-creds-socket.h
+++ b/src/include/cynara-creds-socket.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file cynara-creds-socket.h
+ * @file src/include/cynara-creds-socket.h
* @author Radoslaw Bartosiak
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
diff --git a/src/include/cynara-offline-admin.h b/src/include/cynara-offline-admin.h
index d0bea60..1b26901 100644
--- a/src/include/cynara-offline-admin.h
+++ b/src/include/cynara-offline-admin.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * \file cynara-offline-admin.h
+ * \file src/include/cynara-offline-admin.h
* \author Lukasz Wojciechowski
* \author Aleksander Zdyb
* \version 1.0
diff --git a/src/include/cynara-session.h b/src/include/cynara-session.h
index 267f4af..31e7a5e 100644
--- a/src/include/cynara-session.h
+++ b/src/include/cynara-session.h
@@ -14,7 +14,7 @@
* limitations under the License
*/
/**
- * @file cynara-session.h
+ * @file src/include/cynara-session.h
* \author Aleksander Zdyb
* \author Radoslaw Bartosiak
* @author Lukasz Wojciechowski
diff --git a/src/service/logic/Logic.cpp b/src/service/logic/Logic.cpp
index 053b53f..c25487e 100644
--- a/src/service/logic/Logic.cpp
+++ b/src/service/logic/Logic.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Logic.cpp
+ * @file src/service/logic/Logic.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements main class of logic layer in cynara service
diff --git a/src/service/logic/Logic.h b/src/service/logic/Logic.h
index cbbc076..84af6ff 100644
--- a/src/service/logic/Logic.h
+++ b/src/service/logic/Logic.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Logic.h
+ * @file src/service/logic/Logic.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines main class of logic layer in cynara service
diff --git a/src/service/main/Cynara.cpp b/src/service/main/Cynara.cpp
index bfdbc3b..4a4deb4 100644
--- a/src/service/main/Cynara.cpp
+++ b/src/service/main/Cynara.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Cynara.cpp
+ * @file src/service/main/Cynara.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements main class of cynara service
diff --git a/src/service/main/Cynara.h b/src/service/main/Cynara.h
index 40ba209..ecdde62 100644
--- a/src/service/main/Cynara.h
+++ b/src/service/main/Cynara.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Cynara.h
+ * @file src/service/main/Cynara.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines main class of cynara service
diff --git a/src/service/main/main.cpp b/src/service/main/main.cpp
index 057e980..a89e3a7 100644
--- a/src/service/main/main.cpp
+++ b/src/service/main/main.cpp
@@ -16,7 +16,7 @@
* limitations under the License
*/
/**
- * @file main.cpp
+ * @file src/service/main/main.cpp
* @author Lukasz Wojciechowski
* @author Adam Malinowski
* @version 1.0
diff --git a/src/service/main/pointers.h b/src/service/main/pointers.h
index e425657..652dba3 100644
--- a/src/service/main/pointers.h
+++ b/src/service/main/pointers.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file pointers.h
+ * @file src/service/main/pointers.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines request base class
diff --git a/src/service/sockets/Descriptor.cpp b/src/service/sockets/Descriptor.cpp
index 16bdd40..0e55e4b 100644
--- a/src/service/sockets/Descriptor.cpp
+++ b/src/service/sockets/Descriptor.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Descriptor.cpp
+ * @file src/service/sockets/Descriptor.cpp
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file implements descriptor class
diff --git a/src/service/sockets/Descriptor.h b/src/service/sockets/Descriptor.h
index 0fea1e8..0f42a36 100644
--- a/src/service/sockets/Descriptor.h
+++ b/src/service/sockets/Descriptor.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Descriptor.h
+ * @file src/service/sockets/Descriptor.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines descriptor class
diff --git a/src/service/sockets/SocketManager.cpp b/src/service/sockets/SocketManager.cpp
index 236d207..29bc999 100644
--- a/src/service/sockets/SocketManager.cpp
+++ b/src/service/sockets/SocketManager.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file SocketManager.cpp
+ * @file src/service/sockets/SocketManager.cpp
* @author Lukasz Wojciechowski
* @author Adam Malinowski
* @version 1.0
diff --git a/src/service/sockets/SocketManager.h b/src/service/sockets/SocketManager.h
index d5663c2..99d218b 100644
--- a/src/service/sockets/SocketManager.h
+++ b/src/service/sockets/SocketManager.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file SocketManager.h
+ * @file src/service/sockets/SocketManager.h
* @author Lukasz Wojciechowski
* @version 1.0
* @brief This file defines socket layer manager for cynara
diff --git a/src/storage/BucketDeserializer.cpp b/src/storage/BucketDeserializer.cpp
index 7bdb2fb..68a3f4e 100644
--- a/src/storage/BucketDeserializer.cpp
+++ b/src/storage/BucketDeserializer.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BucketDeserializer.cpp
+ * @file src/storage/BucketDeserializer.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Methods implementation of Cynara::BucketDeserializer
diff --git a/src/storage/BucketDeserializer.h b/src/storage/BucketDeserializer.h
index e45d585..465ecef 100644
--- a/src/storage/BucketDeserializer.h
+++ b/src/storage/BucketDeserializer.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file BucketDeserializer.h
+ * @file src/storage/BucketDeserializer.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Headers for Cynara::BucketDeserializer
diff --git a/src/storage/Buckets.h b/src/storage/Buckets.h
index d364394..eee7feb 100644
--- a/src/storage/Buckets.h
+++ b/src/storage/Buckets.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Buckets.h
+ * @file src/storage/Buckets.h
* @author Aleksander Zdyb
* @author Lukasz Wojciechowski
* @version 1.0
diff --git a/src/storage/InMemoryStorageBackend.cpp b/src/storage/InMemoryStorageBackend.cpp
index ed88c0c..7365294 100644
--- a/src/storage/InMemoryStorageBackend.cpp
+++ b/src/storage/InMemoryStorageBackend.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file InMemoryStorageBackend.cpp
+ * @file src/storage/InMemoryStorageBackend.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of InMemoryStorageBackend
diff --git a/src/storage/InMemoryStorageBackend.h b/src/storage/InMemoryStorageBackend.h
index 7c8ba5c..cc35f95 100644
--- a/src/storage/InMemoryStorageBackend.h
+++ b/src/storage/InMemoryStorageBackend.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file InMemoryStorageBackend.h
+ * @file src/storage/InMemoryStorageBackend.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Headers for InMemoryStorageBackend
diff --git a/src/storage/Storage.cpp b/src/storage/Storage.cpp
index 8be3770..39793e2 100644
--- a/src/storage/Storage.cpp
+++ b/src/storage/Storage.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Storage.cpp
+ * @file src/storage/Storage.cpp
* @author Lukasz Wojciechowski
* @author Aleksander Zdyb
* @version 1.0
diff --git a/src/storage/Storage.h b/src/storage/Storage.h
index 6b8bf30..c89ea40 100644
--- a/src/storage/Storage.h
+++ b/src/storage/Storage.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Storage.h
+ * @file src/storage/Storage.h
* @author Lukasz Wojciechowski
* @author Aleksander Zdyb
* @version 1.0
diff --git a/src/storage/StorageBackend.h b/src/storage/StorageBackend.h
index e0eab1e..4ef66c2 100644
--- a/src/storage/StorageBackend.h
+++ b/src/storage/StorageBackend.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file StorageBackend.h
+ * @file src/storage/StorageBackend.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Headers for StorageBackend base class
diff --git a/src/storage/StorageDeserializer.cpp b/src/storage/StorageDeserializer.cpp
index cdd9e47..22d3231 100644
--- a/src/storage/StorageDeserializer.cpp
+++ b/src/storage/StorageDeserializer.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file StorageDeserializer.cpp
+ * @file src/storage/StorageDeserializer.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation for Cynara::StorageDeserializer
diff --git a/src/storage/StorageDeserializer.h b/src/storage/StorageDeserializer.h
index 318a379..c1ae25a 100644
--- a/src/storage/StorageDeserializer.h
+++ b/src/storage/StorageDeserializer.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file StorageDeserializer.h
+ * @file src/storage/StorageDeserializer.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Headers for Cynara::StorageDeserializer
diff --git a/src/storage/StorageSerializer.cpp b/src/storage/StorageSerializer.cpp
index 8e134aa..132f2c6 100644
--- a/src/storage/StorageSerializer.cpp
+++ b/src/storage/StorageSerializer.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file StorageSerializer.cpp
+ * @file src/storage/StorageSerializer.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Implementation of Cynara::StorageSerializer methods
diff --git a/src/storage/StorageSerializer.h b/src/storage/StorageSerializer.h
index a88c186..8e21f9b 100644
--- a/src/storage/StorageSerializer.h
+++ b/src/storage/StorageSerializer.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file StorageSerializer.h
+ * @file src/storage/StorageSerializer.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Headers for Cynara::StorageSerializer
diff --git a/test/Benchmark.h b/test/Benchmark.h
index 23697a4..fabd20e 100644
--- a/test/Benchmark.h
+++ b/test/Benchmark.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file Benchmark.h
+ * @file test/Benchmark.h
* @author Aleksander Zdyb
* @version 1.0
* @brief A generic benchmark
diff --git a/test/TestEventListenerProxy.cpp b/test/TestEventListenerProxy.cpp
index 1f487b7..b2a9362 100644
--- a/test/TestEventListenerProxy.cpp
+++ b/test/TestEventListenerProxy.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file TestEventListenerProxy.cpp
+ * @file test/TestEventListenerProxy.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Proxy for ::testing::TestEventListener
diff --git a/test/TestEventListenerProxy.h b/test/TestEventListenerProxy.h
index b1491c0..2271cc8 100644
--- a/test/TestEventListenerProxy.h
+++ b/test/TestEventListenerProxy.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file TestEventListenerProxy.h
+ * @file test/TestEventListenerProxy.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Proxy for ::testing::TestEventListener
diff --git a/test/common/exceptions/bucketrecordcorrupted.cpp b/test/common/exceptions/bucketrecordcorrupted.cpp
index c067ad8..3d00faa 100644
--- a/test/common/exceptions/bucketrecordcorrupted.cpp
+++ b/test/common/exceptions/bucketrecordcorrupted.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file bucketrecordcorrupted.cpp
+ * @file test/common/exceptions/bucketrecordcorrupted.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for Cynara::BucketRecordCorruptedException
diff --git a/test/common/types/policybucket.cpp b/test/common/types/policybucket.cpp
index 4614036..0468782 100644
--- a/test/common/types/policybucket.cpp
+++ b/test/common/types/policybucket.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file policybucket.cpp
+ * @file test/common/types/policybucket.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for Cynara::PolicyBucket
diff --git a/test/helpers.cpp b/test/helpers.cpp
index 7aab83b..376d4f8 100644
--- a/test/helpers.cpp
+++ b/test/helpers.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file helpers.cpp
+ * @file test/helpers.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Helper functions for tests
diff --git a/test/helpers.h b/test/helpers.h
index ae352b0..334cda1 100644
--- a/test/helpers.h
+++ b/test/helpers.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file helpers.h
+ * @file test/helpers.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Helper functions for tests
diff --git a/test/storage/inmemorystoragebackend/buckets.cpp b/test/storage/inmemorystoragebackend/buckets.cpp
index fdc8b76..b7e2bdd 100644
--- a/test/storage/inmemorystoragebackend/buckets.cpp
+++ b/test/storage/inmemorystoragebackend/buckets.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file buckets.cpp
+ * @file test/storage/inmemorystoragebackend/buckets.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests of buckets in InMemeoryStorageBackend
diff --git a/test/storage/inmemorystoragebackend/fakeinmemorystoragebackend.h b/test/storage/inmemorystoragebackend/fakeinmemorystoragebackend.h
index a573db6..1c80dea 100644
--- a/test/storage/inmemorystoragebackend/fakeinmemorystoragebackend.h
+++ b/test/storage/inmemorystoragebackend/fakeinmemorystoragebackend.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file fakeinmemorystoragebackend.h
+ * @file test/storage/inmemorystoragebackend/fakeinmemorystoragebackend.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Mock of InMemoryStorageBackend
diff --git a/test/storage/inmemorystoragebackend/inmemeorystoragebackendfixture.h b/test/storage/inmemorystoragebackend/inmemeorystoragebackendfixture.h
index 2bd146b..2c0624b 100644
--- a/test/storage/inmemorystoragebackend/inmemeorystoragebackendfixture.h
+++ b/test/storage/inmemorystoragebackend/inmemeorystoragebackendfixture.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file inmemeorystoragebackendfixture.h
+ * @file test/storage/inmemorystoragebackend/inmemeorystoragebackendfixture.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Fixture for InMemeoryStorageBackend tests
diff --git a/test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp b/test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp
index b2626ab..11c0968 100644
--- a/test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp
+++ b/test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file inmemorystoragebackend.cpp
+ * @file test/storage/inmemorystoragebackend/inmemorystoragebackend.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests of InMemeoryStorageBackend
diff --git a/test/storage/inmemorystoragebackend/search.cpp b/test/storage/inmemorystoragebackend/search.cpp
index 8b6f859..cf6a419 100644
--- a/test/storage/inmemorystoragebackend/search.cpp
+++ b/test/storage/inmemorystoragebackend/search.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file search.cpp
+ * @file test/storage/inmemorystoragebackend/search.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests of search in InMemeoryStorageBackend
diff --git a/test/storage/performance/bucket.cpp b/test/storage/performance/bucket.cpp
index c441e00..1e63966 100644
--- a/test/storage/performance/bucket.cpp
+++ b/test/storage/performance/bucket.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file bucket.cpp
+ * @file test/storage/performance/bucket.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Performance tests for Cynara::PolicyBucket
diff --git a/test/storage/serializer/bucket_load.cpp b/test/storage/serializer/bucket_load.cpp
index ce27800..28c1698 100644
--- a/test/storage/serializer/bucket_load.cpp
+++ b/test/storage/serializer/bucket_load.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file bucket_load.cpp
+ * @file test/storage/serializer/bucket_load.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for Cynara::BucketDeserializer
diff --git a/test/storage/serializer/deserialize.cpp b/test/storage/serializer/deserialize.cpp
index 88e88e7..c38c0c0 100644
--- a/test/storage/serializer/deserialize.cpp
+++ b/test/storage/serializer/deserialize.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file deserialize.cpp
+ * @file test/storage/serializer/deserialize.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for Cynara::StorageDeserializer
diff --git a/test/storage/serializer/dump.cpp b/test/storage/serializer/dump.cpp
index ca8c6cf..53034ce 100644
--- a/test/storage/serializer/dump.cpp
+++ b/test/storage/serializer/dump.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file dump.cpp
+ * @file test/storage/serializer/dump.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for dumping feature of Cynara::StorageSerializer
diff --git a/test/storage/serializer/dump_load.cpp b/test/storage/serializer/dump_load.cpp
index 1530955..01fff9a 100644
--- a/test/storage/serializer/dump_load.cpp
+++ b/test/storage/serializer/dump_load.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file dump_load.cpp
+ * @file test/storage/serializer/dump_load.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for dump => load routine
diff --git a/test/storage/serializer/serialize.cpp b/test/storage/serializer/serialize.cpp
index 61ea4c4..cceed78 100644
--- a/test/storage/serializer/serialize.cpp
+++ b/test/storage/serializer/serialize.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file serialize.cpp
+ * @file test/storage/serializer/serialize.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for dumping feature of Cynara::StorageSerializer
diff --git a/test/storage/storage/buckets.cpp b/test/storage/storage/buckets.cpp
index 19ab1e9..2abfd63 100644
--- a/test/storage/storage/buckets.cpp
+++ b/test/storage/storage/buckets.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file buckets.cpp
+ * @file test/storage/storage/buckets.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests of buckets in Storage
diff --git a/test/storage/storage/check.cpp b/test/storage/storage/check.cpp
index a067881..54c16b4 100644
--- a/test/storage/storage/check.cpp
+++ b/test/storage/storage/check.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file check.cpp
+ * @file test/storage/storage/check.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests of check in Storage
diff --git a/test/storage/storage/fakestoragebackend.h b/test/storage/storage/fakestoragebackend.h
index 7e95c77..3192e46 100644
--- a/test/storage/storage/fakestoragebackend.h
+++ b/test/storage/storage/fakestoragebackend.h
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file fakestoragebackend.h
+ * @file test/storage/storage/fakestoragebackend.h
* @author Aleksander Zdyb
* @version 1.0
* @brief Mock of StorageBackend
diff --git a/test/storage/storage/policies.cpp b/test/storage/storage/policies.cpp
index 300f93a..0166ff5 100644
--- a/test/storage/storage/policies.cpp
+++ b/test/storage/storage/policies.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file policies.cpp
+ * @file test/storage/storage/policies.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests of policies in Storage
diff --git a/test/tests.cpp b/test/tests.cpp
index 7c37224..c6eb69a 100644
--- a/test/tests.cpp
+++ b/test/tests.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file tests.cpp
+ * @file test/tests.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Unit-tests setup
diff --git a/test/types/policykey.cpp b/test/types/policykey.cpp
index 360a446..228cb98 100644
--- a/test/types/policykey.cpp
+++ b/test/types/policykey.cpp
@@ -14,7 +14,7 @@
* limitations under the License.
*/
/**
- * @file policykey.cpp
+ * @file test/types/policykey.cpp
* @author Aleksander Zdyb
* @version 1.0
* @brief Tests for Cynara::PolicyKey
--
2.7.4
From 41a72c3ae09a6bf5e4ef945b8f3218f7d19b87cd Mon Sep 17 00:00:00 2001
From: =?utf8?q?Jos=C3=A9=20Bollo?=
Date: Fri, 3 Oct 2014 14:00:06 +0200
Subject: [PATCH 02/16] Removing home directory creation for user cynara
MIME-Version: 1.0
Content-Type: text/plain; charset=utf8
Content-Transfer-Encoding: 8bit
Cynara should not create a home directory.
If it must, specific options have to be providen
that explicitely should set the home directory
not in /home and should use a specific skeleton.
Change-Id: I296a5856fbae399944b41babf5ebb89a1f0f93eb
Signed-off-by: José Bollo
---
packaging/cynara.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/packaging/cynara.spec b/packaging/cynara.spec
index 2977e5c..4d1c960 100644
--- a/packaging/cynara.spec
+++ b/packaging/cynara.spec
@@ -255,7 +255,7 @@ fi
id -u %{user_name} > /dev/null 2>&1
if [ $? -eq 1 ]; then
- useradd -m %{user_name} -r > /dev/null 2>&1
+ useradd %{user_name} -r > /dev/null 2>&1
fi
%post
--
2.7.4
From 151ad8927deea15aa364208b0a7db2f41f05e446 Mon Sep 17 00:00:00 2001
From: Zofia Abramowska
Date: Wed, 8 Oct 2014 17:14:01 +0200
Subject: [PATCH 03/16] Change client API error codes
Add CYNARA_API_ACCESS_ALLOWED to be returned instead of CYNARA_API_SUCCESS
from cynara check call.
Renumber client API error codes - now CYNARA_API_ACCESS_DENIED is treated
as answer, not as error.
Change-Id: I3d64afdc3cc241de8515be507858304efd729da6
---
src/client-common/plugins/NaiveInterpreter.h | 2 +-
src/include/cynara-client-error.h | 23 +++++++++++++----------
src/include/cynara-client.h | 2 +-
3 files changed, 15 insertions(+), 12 deletions(-)
diff --git a/src/client-common/plugins/NaiveInterpreter.h b/src/client-common/plugins/NaiveInterpreter.h
index e16f463..a541e19 100644
--- a/src/client-common/plugins/NaiveInterpreter.h
+++ b/src/client-common/plugins/NaiveInterpreter.h
@@ -37,7 +37,7 @@ class NaiveInterpreter : public InterpreterInterface {
}
int toResult(const PolicyResult &result) noexcept {
if (result.policyType() == PredefinedPolicyType::ALLOW)
- return CYNARA_API_SUCCESS;
+ return CYNARA_API_ACCESS_ALLOWED;
else
return CYNARA_API_ACCESS_DENIED;
}
diff --git a/src/include/cynara-client-error.h b/src/include/cynara-client-error.h
index 36d20f4..9828942 100644
--- a/src/include/cynara-client-error.h
+++ b/src/include/cynara-client-error.h
@@ -27,33 +27,36 @@
/**
* \name Return Codes
* exported by the foundation API.
- * result codes begin with the start error code and extend into negative direction.
+ * result codes beginning with negative codes indicate an error.
* @{
*/
-/*! \brief indicating the result of the one specific API is successful or access is allowed */
-#define CYNARA_API_SUCCESS 0
+/*! \brief indicating access that was checked is allowed */
+#define CYNARA_API_ACCESS_ALLOWED 2
/*! \brief indicating that access that was checked is denied */
-#define CYNARA_API_ACCESS_DENIED -1
+#define CYNARA_API_ACCESS_DENIED 1
+
+/*! \brief indicating the result of the one specific API is successful */
+#define CYNARA_API_SUCCESS 0
/*! \brief indicating system is running out of memory state */
-#define CYNARA_API_OUT_OF_MEMORY -2
+#define CYNARA_API_OUT_OF_MEMORY -1
/*! \brief indicating the API's parameter is malformed */
-#define CYNARA_API_INVALID_PARAM -3
+#define CYNARA_API_INVALID_PARAM -2
/*! \brief service not available */
-#define CYNARA_API_SERVICE_NOT_AVAILABLE -4
+#define CYNARA_API_SERVICE_NOT_AVAILABLE -3
/*! \brief indicating that value is not present in cache */
-#define CYNARA_API_CACHE_MISS -5
+#define CYNARA_API_CACHE_MISS -4
/*! \brief indicating that provided method is not supported by library */
-#define CYNARA_API_METHOD_NOT_SUPPORTED -6
+#define CYNARA_API_METHOD_NOT_SUPPORTED -5
/*! \brief indicating an unknown error */
-#define CYNARA_API_UNKNOWN_ERROR -7
+#define CYNARA_API_UNKNOWN_ERROR -6
/** @}*/
#endif // CYNARA_CLIENT_ERROR_H
diff --git a/src/include/cynara-client.h b/src/include/cynara-client.h
index dcdab40..3f4c938 100644
--- a/src/include/cynara-client.h
+++ b/src/include/cynara-client.h
@@ -133,7 +133,7 @@ int cynara_finish(cynara *p_cynara);
* \param[in] user User running client.
* \param[in] privilege Privilege that is a subject of a check..
*
- * \return CYNARA_API_SUCCESS on success (access granted), CYNARA_API_ACCESS_DENIED on access denial
+ * \return CYNARA_API_ACCESS_ALLOWED on access allowed, CYNARA_API_ACCESS_DENIED on access denial
* or other error code on error.
*/
int cynara_check(cynara *p_cynara, const char *client, const char *client_session, const char *user,
--
2.7.4
From 0475c1d1ed6e0ddf6bc465b9df3e5bc007b10b26 Mon Sep 17 00:00:00 2001
From: Zofia Abramowska
Date: Wed, 8 Oct 2014 17:16:18 +0200
Subject: [PATCH 04/16] Add asynchronous API header
Add simple API which provide means to:
- ask cynara if has permission to
using cynara_async_check() for cache check
- create request for having permission to
to be sent using cynara_async_create_request()
- send requests and receive responses using cynara_async_process()
- cancel created request using cynara_async_cancel_request()
- inform user about available response and status changes of cynara
socket through callbacks
This is an asynchronus API, so all I/O operations inside are
non-blocking.
Change-Id: Id6d53eae7587c11288d44bb2dd7980ec039e7ca0
---
src/include/cynara-client-async.h | 508 ++++++++++++++++++++++++++++++++++++++
src/include/cynara-client-error.h | 24 +-
2 files changed, 522 insertions(+), 10 deletions(-)
create mode 100644 src/include/cynara-client-async.h
diff --git a/src/include/cynara-client-async.h b/src/include/cynara-client-async.h
new file mode 100644
index 0000000..c824124
--- /dev/null
+++ b/src/include/cynara-client-async.h
@@ -0,0 +1,508 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+/**
+ * @file src/include/cynara-client-async.h
+ * @author Zofia Abramowska
+ * @author Marcin Niesluchowski
+ * @version 1.0
+ * @brief This file contains asynchronous client APIs of Cynara available
+ * with libcynara-client-asynchronous.
+ */
+
+#ifndef CYNARA_CLIENT_ASYNC_H
+#define CYNARA_CLIENT_ASYNC_H
+
+#include
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef uint16_t cynara_check_id;
+typedef struct cynara_async cynara_async;
+typedef struct cynara_async_configuration cynara_async_configuration;
+
+/**
+ * \enum cynara_async_status
+ * Values indicating the status of connected cynara socket.
+ *
+ * \var cynara_async_status::CYNARA_STATUS_FOR_READ
+ * Wait for read events on socket.
+ *
+ * \var cynara_async_status::CYNARA_STATUS_FOR_RW
+ * Wait for both read and write events on socket.
+ */
+typedef enum {
+ CYNARA_STATUS_FOR_READ,
+ CYNARA_STATUS_FOR_RW
+} cynara_async_status;
+
+/**
+ * \enum cynara_async_call_cause
+ * Values indicating the reason of cynara_response_callback call.
+ *
+ * \var cynara_async_call_cause::CYNARA_CALL_CAUSE_ANSWER
+ * Callback was called due to response to previous cynara_async_create_request() call.
+ *
+ * \var cynara_async_call_cause::CYNARA_CALL_CAUSE_CANCEL
+ * Callback was called due to request cancelation with cynara_async_cancel_request() call.
+ *
+ * \var cynara_async_call_cause::CYNARA_CALL_CAUSE_FINISH
+ * Callback was called due to cynara_async_finish() call.
+ *
+ * \var cynara_async_call_cause::CYNARA_CALL_CAUSE_SERVICE_NOT_AVAILABLE
+ * Callback was called due to service not available.
+ */
+typedef enum {
+ CYNARA_CALL_CAUSE_ANSWER,
+ CYNARA_CALL_CAUSE_CANCEL,
+ CYNARA_CALL_CAUSE_FINISH,
+ CYNARA_CALL_CAUSE_SERVICE_NOT_AVAILABLE
+} cynara_async_call_cause;
+
+/**
+ * \brief Response_callback is registered once in cynara_async_create_request()
+ * and will be triggered exactly once in 4 kind of situations:
+ * 1) after response is received from cynara service (CYNARA_CALL_CAUSE_ANSWER)
+ * 2) when request is canceled with cynara_async_cancel_request() (CYNARA_CALL_CAUSE_CANCEL)
+ * 3) when request was pending for response, but cynara_async_finish() was called
+ * (CYNARA_CALL_CAUSE_FINISH)
+ * 4) when connection to cynara service was broken and cannot be established again
+ * - probably cynara is unoperational (CYNARA_CALL_CAUSE_SERVICE_NOT_AVAILABLE)
+ *
+ * \param[in] check_id Number identifying check request. Number is generated in
+ * cynara_async_cancel_request() and returned to user. It can be used to match
+ * response with sent request.
+ * Number is valid since cynara_async_create_request() call till callback call.
+ * After that the number can be reused by cynara to run new request.
+ * \param[in] cause Cause of triggering this callback.
+ * \param[in] response Response for created request. Should be ignored if cause is not
+ * an answer to request (cause != CYNARA_CALL_CAUSE_ANSWER).
+ * \param[in] user_response_data User specific data - passed to cynara library in
+ * cynara_async_cancel_request() is being only remembered by library.
+ * Cynara library does not take any actions on this pointer,
+ * except for giving it back to user in cynara_response_callback.
+ * After that cynara forgets this data.
+ */
+typedef void (*cynara_response_callback) (cynara_check_id check_id, cynara_async_call_cause cause,
+ int response, void *user_response_data);
+
+/**
+ * \brief Callback used by cynara async API when status of cynara socket is changed in
+ * cynara_async_initialize(), cynara_async_create_request(), cynara_async_process(),
+ * cynara_async_cancel_request() or cynara_async_finish().
+ * File descriptor changes every time cynara library connects or disconnects cynara service.
+ * Status change is triggered when check_request or cancel needs to be send to
+ * cynara service or sending data has finished and there is nothing more to send to cynara
+ * service.
+ * Note, that provided file descriptor is used internally by libcynara
+ * so user should not use it in other way than waiting on it in event loop.
+ * In particular user should not write to, read from or close this fd.
+ *
+ * \param[in] old_fd Old descriptor which should be unregistered from event loop,
+ * Special value -1 is used when callback is called after first
+ * successful connect.
+ * \param[in] new_fd New descriptor which should be registered in event loop,
+ * Special value -1 is used when cynara_async_finish() is called and
+ * cynara is disconnected. In this case status should be ignored.
+ * \param[in] status Status indicating which events should be awaited on socket
+ * \param[in] user_status_data User specific data - passed to cynara library in
+ * cynara_async_initialize() is being only remembered by library.
+ * Cynara library does not take any actions on this pointer,
+ * except for giving it back to user in cynara_status_callback.
+ * Data should be valid at least until cynara_async_finish() is called.
+ */
+typedef void (*cynara_status_callback) (int old_fd, int new_fd, cynara_async_status status,
+ void *user_status_data);
+
+/**
+ * \par Description:
+ * Initialize cynara-async-client library with given configuration. Create structure used in
+ * following API calls and register callback and user_status_data for
+ * further cynara async API calls.
+ *
+ * \par Purpose:
+ * This API must be used prior to calling any other cynara async API function.
+ * It will create cynara_async structure required for any other cynara async API calls.
+ *
+ * \par Typical use case:
+ * Once before entering event loop and before any other cynara async API is called.
+ *
+ * \par Method of function operation:
+ * This API initializes inner library structures and in case of success
+ * returns cynara_async structure.
+ *
+ * \par Sync (or) Async:
+ * This is an synchronous API.
+ *
+ * \par Thread-safety:
+ * This function is NOT thread-safe. If functions from described API are called by multithreaded
+ * application from different threads, they must be put into protected critical section.
+ *
+ * \par Important notes:
+ * Structure cynara_async created by cynara_async_initialize() call should be released
+ * with cynara_async_finish().
+ *
+ * \param[out] pp_cynara Placeholder for created cynara_async structure.
+ * \param[in] p_conf Configuration for cynara-async-client library.
+ * NULL should be used for default configuration.
+ * Configuration management functions will be added later.
+ * Configuration will be able to specify e.g. size of cache used by library
+ * for holding checks results.
+ * \param[in] callback Function called when connection is started.
+ * If NULL, no callback will be called, when status changes.
+ * \param[in] user_status_data User specific data, passed to callback is being only remembered
+ * by library. Cynara library does not take any actions on this pointer,
+ * except for giving it back to user in cynara_status_callback.
+ * Data should be valid at least until cynara_async_finish() is called.
+ * Can be NULL.
+ *
+ * \return CYNARA_API_SUCCESS on success
+ * or negative error code on error.
+ */
+int cynara_async_initialize(cynara_async **pp_cynara, const cynara_async_configuration *p_conf,
+ cynara_status_callback callback, void *user_status_data);
+
+/**
+ * \par Description:
+ * Release cynara-async-client library and destroy structure created with cynara_async_initialize().
+ *
+ * \par Purpose:
+ * This API should be used to clean up after usage of cynara-async-client library.
+ *
+ * \par Typical use case:
+ * Once after connection to cynara is not needed.
+ *
+ * \par Method of function operation:
+ * This API releases inner library structure and destroys cynara_async structure. Connection to
+ * cynara server is closed. Upon disconnecting this will trigger cynara_status_callback callback
+ * with -1 as new_fd param so client can unregister file descriptor connected with cynara. It will
+ * also trigger cynara_response_callback callback for each created request with
+ * cynara_async_call_cause::CYNARA_CALL_CAUSE_FINISH as cause param.
+ *
+ * \par Sync (or) Async:
+ * This is an asynchronous API.
+ *
+ * \par Thread-safety:
+ * This function is NOT thread-safe. If functions from described API are called by multithreaded
+ * application from different threads, they must be put into protected critical section.
+ *
+ * \par Important notes:
+ * No other call to cynara-async-client library should be made after call to cynara_async_finish().
+ *
+ * \param[in] p_cynara cynara_async structure. If NULL, then the call has no effect.
+ */
+void cynara_async_finish(cynara_async *p_cynara);
+
+/**
+ * \par Description:
+ * Check access to given privilege for specified user, client and client_session in cache.
+ *
+ * \par Purpose:
+ * This API should be used to check if cache holds information about access of user,
+ * running application identified as clients to a privilege.
+ * This API should be used for fast check in cache.
+ *
+ * \par Typical use case:
+ * A service wants to check in cache, if a client requesting access to some privilege
+ * has proper rights.
+ *
+ * \par Method of function operation:
+ * Client (a process / application) requesting access to a privilege is running as some user.
+ * For such triple (client, user, privilege) a cache is checked.
+ * If cache is invalid it is cleared and call returns same as access not found.
+ * Additional parameter client_session
+ * may be used to distinguish between client session (e.g. for allowing access only for this
+ * particular application launch). EMpty string "" can be used, when session differentation
+ * is not needed.
+ *
+ * \par Sync (or) Async:
+ * This is an synchronous API.
+ *
+ * \par Thread-safety:
+ * This function is NOT thread-safe. If functions from described API are called by multithreaded
+ * application from different threads, they must be put into protected critical section.
+ *
+ * \par Important notes:
+ * Call to cynara_async_check_cache() needs cynara_async structure to be created first.
+ * Use cynara_async_initialize() before calling this function.
+ *
+ * \param[in] p_cynara cynara_async structure.
+ * \param[in] client Application or process identifier.
+ * \param[in] client_session Client defined session.
+ * \param[in] user User of running client.
+ * \param[in] privilege Privilege that is a subject of a check.
+ *
+ * \return CYNARA_API_ACCESS_ALLOWED on checked access allowed,
+ * CYNARA_API_ACCESS_DENIED on checked access denied,
+ * CYNARA_API_CACHE_MISS on access not in cache,
+ * or other negative error code on error.
+ */
+int cynara_async_check_cache(cynara_async *p_cynara, const char *client, const char *client_session,
+ const char *user, const char *privilege);
+
+/**
+ * \par Description:
+ * Creates access check request to cynara service for client, user accessing given privilege.
+ * Set callback and user_response_data to be called and passed when request processing is finished.
+ *
+ * \par Purpose:
+ * This API should be used to create check request for client identified by a triple
+ * (client, user, privilege) in custom defined session.
+ * Response can be received with cynara_async_process().
+ * Check id is returned to pair request with response for canceling purposes.
+ *
+ * \par Typical use case:
+ * When cynara_async_check_cache() returned CYNARA_API_CACHE_MISS, so cynara service
+ * has to be asked, if a client requesting access to some privilege has proper rights.
+ * To receive matching response client sets callback and specifies arbitrary data to be passed
+ * to this callback.
+ *
+ * \par Method of function operation:
+ * Client (a process / application) requesting access to a privilege is running as some user.
+ * For such triple (client, user, privilege) a request event is created and added to pending
+ * requests for cynara_async_process() to process.
+ * Socket status will be changed to CYNARA_STATUS_FOR_RW, to ensure that cynara_async_process()
+ * will be triggered in event loop after socket is ready to send request to cynara service.
+ * After request is sent and there is nothing more to send to cynara service, status will change
+ * back to CYNARA_STATUS_FOR_READ. Status changes are delivered with cynara_status_callback.
+ * When function is succesfully called unique check_id is returned. It is used for matching
+ * generated request with response, that will be received by registered callback.
+ * Because check_id is coded as 16-bit unsigned integer, there can be only 2^16 = 65536 pending
+ * requests. When response callback is called either because of getting answer or because
+ * of cancel check_id used for taht request is released and can be reused by cynara library.
+ * When maximum of pending requests is reached cynara_async_create_request() fails with
+ * CYNARA_API_MAX_PENDING_REQUESTS error code.
+ *
+ * \par Sync (or) Async:
+ * This is an asynchronous API.
+ *
+ * \par Thread-safety:
+ * This function is NOT thread-safe. If functions from described API are called by multithreaded
+ * application from different threads, they must be put into protected critical section.
+ *
+ * \par Important notes:
+ * Call to cynara_async_create_request() needs cynara_async structure to be created first with
+ * cynara_async_initialize().
+ * Call cynara_async_cancel_request() to cancel pending request.
+ * Call cynara_async_process() to receive response.
+ * It is guaranteed that if cynara_async_create_request() function suceeds (CYNARA_API_SUCCESS)
+ * a callback will be called exactly once and that it will receive user_response_data.
+ * If function fails (returns negative error code) request won't be generated and won't be pending,
+ * callback function won't be ever called and user_response_data won't be remembered by library.
+ * Also no check_id will be generated and *p_check_id value should be ignored.
+ *
+ * \param[in] p_cynara cynara_async structure.
+ * \param[in] client Application or process identifier.
+ * \param[in] client_session Client defined session.
+ * \param[in] user User of running client.
+ * \param[in] privilege Privilege that is a subject of a check.
+ * \param[out] p_check_id Placeholder for check id. If NULL, then no check_id is returned.
+ * \param[in] callback Function called when matching response is received.
+ * If NULL then no callback will be called when response, cancel, finish
+ * or service not availble error happens.
+ * \param[in] user_response_data User specific data, passed to callback is being only remembered
+ * by library. Cynara library does not take any actions on this pointer,
+ * except for giving it back to user in cynara_response_callback.
+ * Can be NULL.
+ *
+ * \return CYNARA_API_SUCCESS on success,
+ * CYNARA_API_MAX_PENDING_REQUESTS on too much pending requests,
+ * or other negative error code on error.
+ */
+int cynara_async_create_request(cynara_async *p_cynara, const char *client,
+ const char *client_session, const char *user, const char *privilege,
+ cynara_check_id *p_check_id, cynara_response_callback callback,
+ void *user_response_data);
+
+/**
+ * \par Description:
+ * Process events that appeared on cynara socket.
+ *
+ * \par Purpose:
+ * Process events after they appear on cynara socket.
+ *
+ * \par Typical use case:
+ * After request was queued with cynara_async_create_request() this API will return response.
+ * When event loop will return readiness on cynara socket, client should use this API.
+ *
+ * \par Method of function operation:
+ * This API sends pending requests, receives all responses and reacts when cynara
+ * has disconnected. If cynara has disconnected all values in cache become invalid. During these
+ * operations status of cynara socket may change, so cynara_status_callback callback will be
+ * triggered to indicate these changes. cynara_response_callback callback will be triggered with
+ * cynara_async_call_cause::CYNARA_CALL_CAUSE_ANSWER as cause param when response is available.
+ * If cynara has disconnected it will be triggered with
+ * cynara_async_call_cause::CYNARA_CALL_CAUSE_SERVICE_NOT_AVAILABLE as cause param.
+ *
+ * \par Sync (or) Async:
+ * This is an asynchronous API.
+ *
+ * \par Thread-safety:
+ * This function is NOT thread-safe. If functions from described API are called by multithreaded
+ * application from different threads, they must be put into protected critical section.
+ *
+ * \par Important notes:
+ * Call to cynara_async_process() requires initialized cynara_async structure. For this use
+ * cynara_async_initialize().
+ *
+ * \param[in] p_cynara cynara_async structure.
+ *
+ * \return CYNARA_API_SUCCESS on success
+ * or negative error code on error.
+ */
+int cynara_async_process(cynara_async *p_cynara);
+
+/**
+ * \par Description:
+ * Cancel request created by cynara_async_create_request().
+ *
+ * \par Purpose:
+ * This API should be used to cancel pending check request,
+ * created by cynara_async_create_request().
+ *
+ * \par Typical use case:
+ * When cynara client is no longer interested in receiving an answer.
+ * Same check_id value should be used to identify proper request as was generated during
+ * request creation with cynara_async_create_request().
+ *
+ * \par Method of function operation:
+ * Cancels request created by cynara_async_create_request() call.
+ * cynara_status_callback callback may be triggered to be able to send cancel to cynara.
+ * cynara_response_callback callback will be triggered with with
+ * cynara_async_call_cause::CYNARA_CALL_CAUSE_CANCEL as cause param.
+ *
+ * \par Sync (or) Async:
+ * This is a synchronous API.
+ *
+ * \par Thread-safety:
+ * This function is NOT thread-safe. If functions from described API are called by multithreaded
+ * application from different threads, they must be put into protected critical section.
+ *
+ * \par Important notes:
+ * Call to cynara_async_cancel_request() needs cynara_async structure to be created first. For this
+ * use cynara_async_initialize().
+ *
+ * \param[in] p_cynara cynara_async structure.
+ * \param[in] check_id Check id to be cancelled
+ *
+ * \return CYNARA_API_SUCCESS on success
+ * or negative error code on error.
+ */
+int cynara_async_cancel_request(cynara_async *p_cynara, cynara_check_id check_id);
+
+/*
+ * Example of usage:
+ *
+ * void change_status(int old_fd, int new_fd, cynara_async_status status, void *user_status_data)
+ * {
+ * // unregister using old_fd
+ * ...
+ * //register using new_fd and new status
+ * }
+ *
+ * int process_response(int check_id, cynara_async_call_cause cause, int response,
+ * void *user_response_data)
+ * {
+ * switch (cause) {
+ * case cynara_async_call_cause::CYNARA_CALL_CAUSE_ANSWER:
+ * // handle answer from cynara service - use response value
+ * break;
+ * case cynara_async_call_cause::CYNARA_CALL_CAUSE_CANCEL:
+ * // handle canceled request
+ * break;
+ * case cynara_async_call_cause::CYNARA_CALL_CAUSE_FINISH:
+ * // handle finish of client async
+ * break;
+ * case cynara_async_call_cause::CYNARA_CALL_CAUSE_SERVICE_NOT_AVAILABLE:
+ * // handle disconnection
+ * }
+ * ...
+ * free_user_response_data(user_response_data);
+ * }
+ *
+ * void main_process
+ * {
+ * //initialize all required objects
+ * cynara_async *p_cynara;
+ * int ret;
+ * //change_status will be called passing file descriptor connected to cynara server
+ * if ((ret = cynara_async_initalize(&p_cynara, NULL, change_status, &fd_sets)) !=
+ * CYNARA_API_SUCCESS) {
+ * // handle error
+ * }
+ *
+ * //start event loop
+ * event_process(fd_sets, ...)
+ *
+ * //event loop stopped, clean-up, before closing program
+ * cynara_async_finish(p_cynara);
+ * }
+ *
+ * void event_process(fd_sets, ...)
+ * {
+ * //event loop of user choice
+ * select(..., fd_sets.read, fd_sets.write) {
+ * ...
+ * if(active_socket == cynara_socket) {
+ * if(cynara_async_process(p_cynara) != CYNARA_API_SUCCESS) {
+ * // handle error
+ * }
+ * } else if (active_socket == some_client_socket) {
+ * //processing clients, which may require cynara checks
+ * ...
+ * int ret = cynara_async_check_cache(p_cynara, client, client_session, user,
+ * privilege);
+ * switch(ret) {
+ * case CYNARA_API_ACCESS_ALLOWED:
+ * // allow client
+ * break;
+ * case CYNARA_API_ACCESS_DENIED:
+ * // deny client
+ * break;
+ * case CYNARA_API_CACHE_MISS:
+ * // not in cache - prepare data that will be passed to callback
+ * allocate_user_response_data(&user_response_data);
+ *
+ * // create request
+ * ret = cynara_async_create_request(p_cynara,
+ * client, client_session, user, privilege,
+ * &check_id,
+ * process_response, user_response_data);
+ * if(ret != CYNARA_API_SUCCESS) {
+ * free_user_response_data(user_response_data);
+ * // handle error
+ * }
+ * default:
+ * // handle error
+ * }
+ * ...
+ * // waiting for some request too long
+ * if (ret = cynara_async_cancel_request(p_cynara, check_id)) != CYNARA_API_SUCCESS) {
+ * // handle error
+ * }
+ * }
+ * ...
+ * }
+ * ...
+ * }
+ */
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* CYNARA_CLIENT_ASYNC_H */
diff --git a/src/include/cynara-client-error.h b/src/include/cynara-client-error.h
index 9828942..8dd344f 100644
--- a/src/include/cynara-client-error.h
+++ b/src/include/cynara-client-error.h
@@ -40,23 +40,27 @@
/*! \brief indicating the result of the one specific API is successful */
#define CYNARA_API_SUCCESS 0
+/*! \brief indicating that value is not present in cache */
+#define CYNARA_API_CACHE_MISS -1
+
+/*! \brief indicating that pending requests reached maximum */
+#define CYNARA_API_MAX_PENDING_REQUESTS -2
+
/*! \brief indicating system is running out of memory state */
-#define CYNARA_API_OUT_OF_MEMORY -1
+#define CYNARA_API_OUT_OF_MEMORY -3
/*! \brief indicating the API's parameter is malformed */
-#define CYNARA_API_INVALID_PARAM -2
+#define CYNARA_API_INVALID_PARAM -4
-/*! \brief service not available */
-#define CYNARA_API_SERVICE_NOT_AVAILABLE -3
-
-/*! \brief indicating that value is not present in cache */
-#define CYNARA_API_CACHE_MISS -4
+/*! \brief indicating that service is not available */
+#define CYNARA_API_SERVICE_NOT_AVAILABLE -5
/*! \brief indicating that provided method is not supported by library */
-#define CYNARA_API_METHOD_NOT_SUPPORTED -5
+#define CYNARA_API_METHOD_NOT_SUPPORTED -6
/*! \brief indicating an unknown error */
-#define CYNARA_API_UNKNOWN_ERROR -6
+#define CYNARA_API_UNKNOWN_ERROR -7
+
/** @}*/
-#endif // CYNARA_CLIENT_ERROR_H
+#endif /* CYNARA_CLIENT_ERROR_H */
--
2.7.4
From 711213d22be5b0e68f20051db57417ee534d24cb Mon Sep 17 00:00:00 2001
From: Marcin Niesluchowski
Date: Thu, 9 Oct 2014 16:37:56 +0200
Subject: [PATCH 05/16] Add function for catching all client exceptions
Change-Id: Ia70b4ee257aa279a26862f3d412f81dfdcae3309
---
src/client-common/exceptions/TryCatch.h | 54 ++++++++++++++++++++++++++++
src/client-common/plugins/NaiveInterpreter.h | 6 ++--
src/client-common/plugins/PluginInterface.h | 6 ++--
src/client/api/client-api.cpp | 31 +++++++++++-----
src/client/logic/Logic.cpp | 4 +--
src/client/logic/Logic.h | 4 +--
src/common/sockets/Socket.cpp | 2 +-
src/common/sockets/Socket.h | 2 +-
8 files changed, 89 insertions(+), 20 deletions(-)
create mode 100644 src/client-common/exceptions/TryCatch.h
diff --git a/src/client-common/exceptions/TryCatch.h b/src/client-common/exceptions/TryCatch.h
new file mode 100644
index 0000000..8d1fb20
--- /dev/null
+++ b/src/client-common/exceptions/TryCatch.h
@@ -0,0 +1,54 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+/**
+ * @file src/client-common/exceptions/TryCatch.h
+ * @author Marcin Niesluchowski
+ * @version 1.0
+ * @brief This file contains functions for catching exceptions
+ */
+
+#ifndef SRC_CLIENT_COMMON_EXCEPTIONS_TRYCATCH_H_
+#define SRC_CLIENT_COMMON_EXCEPTIONS_TRYCATCH_H_
+
+#include
+#include
+#include
+
+#include
+
+#include
+
+namespace Cynara {
+
+int tryCatch(const std::function &func) {
+ try {
+ return func();
+ } catch (const std::bad_alloc &e) {
+ LOGE(e.what());
+ return CYNARA_API_OUT_OF_MEMORY;
+ } catch (const std::exception &e) {
+ LOGE(e.what());
+ return CYNARA_API_UNKNOWN_ERROR;
+ } catch (...) {
+ LOGE("Unexpected exception");
+ return CYNARA_API_UNKNOWN_ERROR;
+ }
+}
+
+} // namespace Cynara
+
+#endif // SRC_CLIENT_COMMON_EXCEPTIONS_TRYCATCH_H_
+
diff --git a/src/client-common/plugins/NaiveInterpreter.h b/src/client-common/plugins/NaiveInterpreter.h
index a541e19..04d05de 100644
--- a/src/client-common/plugins/NaiveInterpreter.h
+++ b/src/client-common/plugins/NaiveInterpreter.h
@@ -29,13 +29,13 @@
namespace Cynara {
class NaiveInterpreter : public InterpreterInterface {
- bool isUsable(const PolicyResult &result UNUSED) noexcept {
+ bool isUsable(const PolicyResult &result UNUSED) {
return true;
}
- bool isCacheable(const PolicyResult &result UNUSED) noexcept {
+ bool isCacheable(const PolicyResult &result UNUSED) {
return true;
}
- int toResult(const PolicyResult &result) noexcept {
+ int toResult(const PolicyResult &result) {
if (result.policyType() == PredefinedPolicyType::ALLOW)
return CYNARA_API_ACCESS_ALLOWED;
else
diff --git a/src/client-common/plugins/PluginInterface.h b/src/client-common/plugins/PluginInterface.h
index f1e7ef9..5f3a947 100644
--- a/src/client-common/plugins/PluginInterface.h
+++ b/src/client-common/plugins/PluginInterface.h
@@ -34,9 +34,9 @@ typedef std::shared_ptr InterpreterInterfacePtr;
class InterpreterInterface {
public:
- virtual bool isCacheable(const PolicyResult &result) noexcept = 0;
- virtual bool isUsable(const PolicyResult &result) noexcept = 0;
- virtual int toResult(const PolicyResult &result) noexcept = 0;
+ virtual bool isCacheable(const PolicyResult &result) = 0;
+ virtual bool isUsable(const PolicyResult &result) = 0;
+ virtual int toResult(const PolicyResult &result) = 0;
virtual ~InterpreterInterface() {};
};
diff --git a/src/client/api/client-api.cpp b/src/client/api/client-api.cpp
index 6d086a5..6ca7def 100644
--- a/src/client/api/client-api.cpp
+++ b/src/client/api/client-api.cpp
@@ -24,6 +24,7 @@
#include
+#include
#include
#include
@@ -47,17 +48,15 @@ int cynara_initialize(cynara **pp_cynara, const cynara_configuration *p_conf UNU
if (!pp_cynara)
return CYNARA_API_INVALID_PARAM;
- try {
+ return Cynara::tryCatch([&]() {
*pp_cynara = new cynara(new Cynara::Logic);
- } catch (const std::bad_alloc &ex) {
- return CYNARA_API_OUT_OF_MEMORY;
- }
- init_log();
+ init_log();
- LOGD("Cynara client initialized");
+ LOGD("Cynara client initialized");
- return CYNARA_API_SUCCESS;
+ return CYNARA_API_SUCCESS;
+ });
}
CYNARA_API
@@ -77,5 +76,21 @@ int cynara_check(cynara *p_cynara, const char *client, const char *client_sessio
if(!client || !client_session || !user || !privilege)
return CYNARA_API_INVALID_PARAM;
- return p_cynara->impl->check(client, client_session, user, privilege);
+ return Cynara::tryCatch([&]() {
+ std::string clientStr;
+ std::string clientSessionStr;
+ std::string userStr;
+ std::string privilegeStr;
+
+ try {
+ clientStr = client;
+ clientSessionStr = client_session;
+ userStr = user;
+ privilegeStr = privilege;
+ } catch (const std::length_error &e) {
+ LOGE(e.what());
+ return CYNARA_API_INVALID_PARAM;
+ }
+ return p_cynara->impl->check(clientStr, clientSessionStr, userStr, privilegeStr);
+ });
}
diff --git a/src/client/logic/Logic.cpp b/src/client/logic/Logic.cpp
index e090fcc..2708318 100644
--- a/src/client/logic/Logic.cpp
+++ b/src/client/logic/Logic.cpp
@@ -57,7 +57,7 @@ Logic::Logic() {
}
int Logic::check(const std::string &client, const ClientSession &session, const std::string &user,
- const std::string &privilege) noexcept
+ const std::string &privilege)
{
if (!m_socket->isConnected()){
onDisconnected();
@@ -81,7 +81,7 @@ int Logic::check(const std::string &client, const ClientSession &session, const
return m_cache->update(session, key, result);
}
-int Logic::requestResult(const PolicyKey &key, PolicyResult &result) noexcept {
+int Logic::requestResult(const PolicyKey &key, PolicyResult &result) {
ProtocolFrameSequenceNumber sequenceNumber = generateSequenceNumber();
//Ask cynara service
diff --git a/src/client/logic/Logic.h b/src/client/logic/Logic.h
index 8f8b1bb..36076fc 100644
--- a/src/client/logic/Logic.h
+++ b/src/client/logic/Logic.h
@@ -40,13 +40,13 @@ private:
PluginCachePtr m_cache;
void onDisconnected(void);
- int requestResult(const PolicyKey &key, PolicyResult &result) noexcept;
+ int requestResult(const PolicyKey &key, PolicyResult &result);
public:
Logic();
virtual ~Logic() {};
virtual int check(const std::string &client, const ClientSession &session,
- const std::string &user, const std::string &privilege) noexcept;
+ const std::string &user, const std::string &privilege);
};
} // namespace Cynara
diff --git a/src/common/sockets/Socket.cpp b/src/common/sockets/Socket.cpp
index 51cd495..e3b91dc 100644
--- a/src/common/sockets/Socket.cpp
+++ b/src/common/sockets/Socket.cpp
@@ -50,7 +50,7 @@ Socket::~Socket() {
close();
}
-void Socket::close(void) noexcept {
+void Socket::close(void) {
if (m_sock > -1)
::close(m_sock);
m_sock = -1;
diff --git a/src/common/sockets/Socket.h b/src/common/sockets/Socket.h
index 95991db..3c5c37b 100644
--- a/src/common/sockets/Socket.h
+++ b/src/common/sockets/Socket.h
@@ -37,7 +37,7 @@ private:
std::string m_socketPath;
int m_pollTimeout;
- void close(void) noexcept;
+ void close(void);
//returns true if socket is ready
//returns false in case of timeout
--
2.7.4
From 24e4b22d3e1d2bd970f92617e1469a40d34e0c0c Mon Sep 17 00:00:00 2001
From: Marcin Niesluchowski
Date: Thu, 4 Sep 2014 15:50:32 +0200
Subject: [PATCH 06/16] Add async api stub implementation
Below are listed asynchronous API functions with its value
returned for valid params and enough memory (stub version).
- cynara_async_initialize CYNARA_API_SUCCESS
- cynara_finish
- cynara_async_cache_check CYNARA_API_CACHE_MISS
- cynara_async_create_request CYNARA_API_MAX_PENDING_REQUESTS
- cynara_async_process CYNARA_API_SUCCESS
- cynara_async_cancel_request CYNARA_API_SUCCESS
Change-Id: Ic10d04adc5e7d45fa643a1e817db2670c05790cf
---
CMakeLists.txt | 1 +
packaging/cynara.spec | 56 ++++++--
packaging/libcynara-client-async.manifest | 5 +
pkgconfig/CMakeLists.txt | 1 +
pkgconfig/cynara-client-async/CMakeLists.txt | 25 ++++
.../cynara-client-async/cynara-client-async.pc.in | 11 ++
src/CMakeLists.txt | 1 +
src/client-async/CMakeLists.txt | 49 +++++++
src/client-async/api/ApiInterface.h | 49 +++++++
src/client-async/api/client-async-api.cpp | 146 +++++++++++++++++++++
src/client-async/logic/Logic.cpp | 59 +++++++++
src/client-async/logic/Logic.h | 49 +++++++
src/include/CMakeLists.txt | 1 +
src/include/cynara-client-async.h | 2 +
14 files changed, 445 insertions(+), 10 deletions(-)
create mode 100644 packaging/libcynara-client-async.manifest
create mode 100644 pkgconfig/cynara-client-async/CMakeLists.txt
create mode 100644 pkgconfig/cynara-client-async/cynara-client-async.pc.in
create mode 100644 src/client-async/CMakeLists.txt
create mode 100644 src/client-async/api/ApiInterface.h
create mode 100644 src/client-async/api/client-async-api.cpp
create mode 100644 src/client-async/logic/Logic.cpp
create mode 100644 src/client-async/logic/Logic.h
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 0623e9a..ba5fe97 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -78,6 +78,7 @@ ENDIF (CMAKE_BUILD_TYPE MATCHES "DEBUG")
SET(TARGET_CYNARA "cynara")
SET(TARGET_LIB_CYNARA "cynara-client")
+SET(TARGET_LIB_CYNARA_ASYNC "cynara-client-async")
SET(TARGET_LIB_CYNARA_COMMON "cynara-client-commons")
SET(TARGET_LIB_CYNARA_ADMIN "cynara-admin")
SET(TARGET_CYNARA_COMMON "cynara-commons")
diff --git a/packaging/cynara.spec b/packaging/cynara.spec
index 4d1c960..7508fbf 100644
--- a/packaging/cynara.spec
+++ b/packaging/cynara.spec
@@ -7,15 +7,16 @@ License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
Source1001: cynara.manifest
Source1002: libcynara-client.manifest
-Source1003: libcynara-admin.manifest
-Source1004: cynara-tests.manifest
-Source1005: libcynara-client-commons.manifest
-Source1006: libcynara-commons.manifest
-Source1007: libcynara-creds-commons.manifest
-Source1008: libcynara-creds-dbus.manifest
-Source1009: libcynara-creds-socket.manifest
-Source1010: libcynara-session.manifest
-Source1011: libcynara-storage.manifest
+Source1003: libcynara-client-async.manifest
+Source1004: libcynara-admin.manifest
+Source1005: cynara-tests.manifest
+Source1006: libcynara-client-commons.manifest
+Source1007: libcynara-commons.manifest
+Source1008: libcynara-creds-commons.manifest
+Source1009: libcynara-creds-dbus.manifest
+Source1010: libcynara-creds-socket.manifest
+Source1011: libcynara-session.manifest
+Source1012: libcynara-storage.manifest
Requires: default-ac-domains
Requires(pre): pwdutils
Requires(post): smack
@@ -42,7 +43,7 @@ BuildRequires: pkgconfig(libunwind)
%endif
%description
-service, client libraries (libcynara-client, libcynara-admin),
+service, client libraries (libcynara-client, libcynara-client-async, libcynara-admin),
helper libraries (libcynara-session, libcynara-creds-common, libcynara-creds-dbus,
libcynara-creds-socket)
and tests (cynara-tests)
@@ -64,6 +65,22 @@ Requires: libcynara-client-commons-devel = %{version}-%{release}
client library (devel) for checking policies
#######################################################
+%package -n libcynara-client-async
+Summary: Cynara - asynchronous client library
+Requires: cynara = %{version}-%{release}
+
+%description -n libcynara-client-async
+asynchronous client library for checking policies
+
+%package -n libcynara-client-async-devel
+Summary: Cynara - asynchronous client library (devel)
+Requires: libcynara-client-async = %{version}-%{release}
+Requires: libcynara-client-commons-devel = %{version}-%{release}
+
+%description -n libcynara-client-async-devel
+asynchronous client library (devel) for checking policies
+
+#######################################################
%package -n libcynara-client-commons
Summary: Cynara - client commons library
Requires: cynara = %{version}-%{release}
@@ -214,6 +231,7 @@ cp -a %{SOURCE1008} .
cp -a %{SOURCE1009} .
cp -a %{SOURCE1010} .
cp -a %{SOURCE1011} .
+cp -a %{SOURCE1012} .
cp -a test/db/db* .
%build
@@ -290,6 +308,10 @@ fi
%postun -n libcynara-client -p /sbin/ldconfig
+%post -n libcynara-client-async -p /sbin/ldconfig
+
+%postun -n libcynara-client-async -p /sbin/ldconfig
+
%post -n libcynara-client-commons -p /sbin/ldconfig
%postun -n libcynara-client-commons -p /sbin/ldconfig
@@ -314,6 +336,10 @@ fi
%postun -n libcynara-client-devel -p /sbin/ldconfig
+%post -n libcynara-client-async-devel -p /sbin/ldconfig
+
+%postun -n libcynara-client-async-devel -p /sbin/ldconfig
+
%post -n libcynara-client-commons-devel -p /sbin/ldconfig
%postun -n libcynara-client-commons-devel -p /sbin/ldconfig
@@ -380,6 +406,16 @@ fi
%{_libdir}/pkgconfig/cynara-client.pc
%{_libdir}/libcynara-client.so
+%files -n libcynara-client-async
+%manifest libcynara-client-async.manifest
+%license LICENSE
+%{_libdir}/libcynara-client-async.so.*
+
+%files -n libcynara-client-async-devel
+%{_includedir}/cynara/cynara-client-async.h
+%{_libdir}/pkgconfig/cynara-client-async.pc
+%{_libdir}/libcynara-client-async.so
+
%files -n libcynara-client-commons
%manifest libcynara-client-commons.manifest
%license LICENSE
diff --git a/packaging/libcynara-client-async.manifest b/packaging/libcynara-client-async.manifest
new file mode 100644
index 0000000..a76fdba
--- /dev/null
+++ b/packaging/libcynara-client-async.manifest
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/pkgconfig/CMakeLists.txt b/pkgconfig/CMakeLists.txt
index 0c11631..9d4600f 100644
--- a/pkgconfig/CMakeLists.txt
+++ b/pkgconfig/CMakeLists.txt
@@ -18,6 +18,7 @@
#
ADD_SUBDIRECTORY(cynara-client)
+ADD_SUBDIRECTORY(cynara-client-async)
ADD_SUBDIRECTORY(cynara-admin)
ADD_SUBDIRECTORY(cynara-creds-commons)
ADD_SUBDIRECTORY(cynara-creds-dbus)
diff --git a/pkgconfig/cynara-client-async/CMakeLists.txt b/pkgconfig/cynara-client-async/CMakeLists.txt
new file mode 100644
index 0000000..f827ac4
--- /dev/null
+++ b/pkgconfig/cynara-client-async/CMakeLists.txt
@@ -0,0 +1,25 @@
+# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# @file CMakeLists.txt
+# @author Marcin Niesluchowski
+#
+
+CONFIGURE_FILE(cynara-client-async.pc.in cynara-client-async.pc @ONLY)
+
+INSTALL(FILES
+ ${CMAKE_BINARY_DIR}/pkgconfig/cynara-client-async/cynara-client-async.pc
+ DESTINATION
+ ${LIB_INSTALL_DIR}/pkgconfig
+ )
diff --git a/pkgconfig/cynara-client-async/cynara-client-async.pc.in b/pkgconfig/cynara-client-async/cynara-client-async.pc.in
new file mode 100644
index 0000000..cf38a83
--- /dev/null
+++ b/pkgconfig/cynara-client-async/cynara-client-async.pc.in
@@ -0,0 +1,11 @@
+prefix=@CMAKE_INSTALL_PREFIX@
+exec_prefix=${prefix}
+libdir=@LIB_INSTALL_DIR@
+includedir=${prefix}/include
+
+Name: cynara-client-async
+Description: cynara-client-async package
+Version: @CYNARA_VERSION@
+Requires:
+Libs: -L${libdir} -lcynara-client-async
+Cflags: -I${includedir}/cynara
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 66a1186..fe4d096 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -46,6 +46,7 @@ INCLUDE_DIRECTORIES(
ADD_SUBDIRECTORY(include)
ADD_SUBDIRECTORY(common)
ADD_SUBDIRECTORY(client)
+ADD_SUBDIRECTORY(client-async)
ADD_SUBDIRECTORY(client-common)
ADD_SUBDIRECTORY(admin)
ADD_SUBDIRECTORY(storage)
diff --git a/src/client-async/CMakeLists.txt b/src/client-async/CMakeLists.txt
new file mode 100644
index 0000000..3a4ce35
--- /dev/null
+++ b/src/client-async/CMakeLists.txt
@@ -0,0 +1,49 @@
+# Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+# @file CMakeLists.txt
+# @author Marcin Niesluchowski
+#
+
+SET(LIB_CYNARA_ASYNC_VERSION_MAJOR 0)
+SET(LIB_CYNARA_ASYNC_VERSION ${LIB_CYNARA_ASYNC_VERSION_MAJOR}.0.2)
+
+SET(CYNARA_LIB_CYNARA_ASYNC_PATH ${CYNARA_PATH}/client-async)
+
+INCLUDE_DIRECTORIES(
+ ${CYNARA_LIB_CYNARA_ASYNC_PATH}
+ ${CYNARA_PATH}/client-common
+ ${CYNARA_PATH}/common
+ ${CYNARA_PATH}/include
+ )
+
+SET(LIB_CYNARA_ASYNC_SOURCES
+ ${CYNARA_LIB_CYNARA_ASYNC_PATH}/api/client-async-api.cpp
+ ${CYNARA_LIB_CYNARA_ASYNC_PATH}/logic/Logic.cpp
+ )
+
+ADD_LIBRARY(${TARGET_LIB_CYNARA_ASYNC} SHARED ${LIB_CYNARA_ASYNC_SOURCES})
+
+SET_TARGET_PROPERTIES(
+ ${TARGET_LIB_CYNARA_ASYNC}
+ PROPERTIES
+ SOVERSION ${LIB_CYNARA_ASYNC_VERSION_MAJOR}
+ VERSION ${LIB_CYNARA_ASYNC_VERSION}
+ )
+
+TARGET_LINK_LIBRARIES(${TARGET_LIB_CYNARA_ASYNC}
+ ${TARGET_CYNARA_COMMON}
+ )
+
+INSTALL(TARGETS ${TARGET_LIB_CYNARA_ASYNC} DESTINATION ${LIB_INSTALL_DIR})
diff --git a/src/client-async/api/ApiInterface.h b/src/client-async/api/ApiInterface.h
new file mode 100644
index 0000000..31478da
--- /dev/null
+++ b/src/client-async/api/ApiInterface.h
@@ -0,0 +1,49 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+/**
+ * @file src/client-async/api/ApiInterface.h
+ * @author Marcin Niesluchowski
+ * @version 1.0
+ * @brief This file contains libcynara-client-async API interface definition.
+ */
+
+#ifndef SRC_CLIENT_ASYNC_API_APIINTERFACE_H_
+#define SRC_CLIENT_ASYNC_API_APIINTERFACE_H_
+
+#include
+
+#include
+
+namespace Cynara {
+
+class ApiInterface {
+public:
+ ApiInterface() = default;
+ virtual ~ApiInterface() {};
+
+ virtual int checkCache(const std::string &client, const std::string &session,
+ const std::string &user, const std::string &privilege) = 0;
+ virtual int createRequest(const std::string &client, const std::string &session,
+ const std::string &user, const std::string &privilege,
+ cynara_check_id &checkId, cynara_response_callback callback,
+ void *userResponseData) = 0;
+ virtual int process(void) = 0;
+ virtual int cancelRequest(cynara_check_id checkId) = 0;
+};
+
+} // namespace Cynara
+
+#endif /* SRC_CLIENT_ASYNC_API_APIINTERFACE_H_ */
diff --git a/src/client-async/api/client-async-api.cpp b/src/client-async/api/client-async-api.cpp
new file mode 100644
index 0000000..d350e10
--- /dev/null
+++ b/src/client-async/api/client-async-api.cpp
@@ -0,0 +1,146 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+/**
+ * @file src/client-async/api/client-async-api.cpp
+ * @author Marcin Niesluchowski
+ * @version 1.0
+ * @brief Implementation of external libcynara-client-async API
+ */
+
+#include
+
+#include
+#include
+#include
+
+#include
+#include
+#include
+
+struct cynara_async {
+ Cynara::ApiInterface *impl;
+
+ cynara_async(Cynara::ApiInterface *_impl) : impl(_impl) {
+ }
+
+ ~cynara_async() {
+ delete impl;
+ }
+};
+
+CYNARA_API
+int cynara_async_initialize(cynara_async **pp_cynara,
+ const cynara_async_configuration *p_conf UNUSED,
+ cynara_status_callback callback, void *user_status_data) {
+ if (!pp_cynara)
+ return CYNARA_API_INVALID_PARAM;
+
+ return Cynara::tryCatch([&]() {
+ *pp_cynara = new cynara_async(new Cynara::Logic(callback, user_status_data));
+
+ init_log();
+
+ LOGD("Cynara client async initialized");
+
+ return CYNARA_API_SUCCESS;
+ });
+}
+
+CYNARA_API
+void cynara_async_finish(cynara_async *p_cynara) {
+ delete p_cynara;
+}
+
+CYNARA_API
+int cynara_async_check_cache(cynara_async *p_cynara, const char *client, const char *client_session,
+ const char *user, const char *privilege) {
+ if (!p_cynara || !p_cynara->impl)
+ return CYNARA_API_INVALID_PARAM;
+ if (!client || !client_session || !user || !privilege)
+ return CYNARA_API_INVALID_PARAM;
+
+ return Cynara::tryCatch([&]() {
+ std::string clientStr;
+ std::string clientSessionStr;
+ std::string userStr;
+ std::string privilegeStr;
+
+ try {
+ clientStr = client;
+ clientSessionStr = client_session;
+ userStr = user;
+ privilegeStr = privilege;
+ } catch (const std::length_error &e) {
+ LOGE(e.what());
+ return CYNARA_API_INVALID_PARAM;
+ }
+ return p_cynara->impl->checkCache(clientStr, clientSessionStr, userStr, privilegeStr);
+ });
+}
+
+CYNARA_API
+int cynara_async_create_request(cynara_async *p_cynara, const char *client,
+ const char *client_session, const char *user, const char *privilege,
+ cynara_check_id *p_check_id, cynara_response_callback callback,
+ void *user_response_data) {
+ if (!p_cynara || !p_cynara->impl)
+ return CYNARA_API_INVALID_PARAM;
+ if (!client || !client_session || !user || !privilege)
+ return CYNARA_API_INVALID_PARAM;
+
+ return Cynara::tryCatch([&]() {
+ std::string clientStr;
+ std::string clientSessionStr;
+ std::string userStr;
+ std::string privilegeStr;
+
+ try {
+ clientStr = client;
+ clientSessionStr = client_session;
+ userStr = user;
+ privilegeStr = privilege;
+ } catch (const std::length_error &e) {
+ LOGE(e.what());
+ return CYNARA_API_INVALID_PARAM;
+ }
+ cynara_check_id checkId;
+ int ret = p_cynara->impl->createRequest(clientStr, clientSessionStr, userStr, privilegeStr,
+ checkId, callback, user_response_data);
+ if (p_check_id && ret == CYNARA_API_SUCCESS)
+ *p_check_id = checkId;
+ return ret;
+ });
+}
+
+CYNARA_API
+int cynara_async_process(cynara_async *p_cynara) {
+ if (!p_cynara || !p_cynara->impl)
+ return CYNARA_API_INVALID_PARAM;
+
+ return Cynara::tryCatch([&]() {
+ return p_cynara->impl->process();
+ });
+}
+
+CYNARA_API
+int cynara_async_cancel_request(cynara_async *p_cynara, cynara_check_id check_id) {
+ if (!p_cynara || !p_cynara->impl)
+ return CYNARA_API_INVALID_PARAM;
+
+ return Cynara::tryCatch([&]() {
+ return p_cynara->impl->cancelRequest(check_id);
+ });
+}
diff --git a/src/client-async/logic/Logic.cpp b/src/client-async/logic/Logic.cpp
new file mode 100644
index 0000000..f20a216
--- /dev/null
+++ b/src/client-async/logic/Logic.cpp
@@ -0,0 +1,59 @@
+/*
+ * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License
+ */
+/**
+ * @file src/client-async/logic/Logic.cpp
+ * @author Marcin Niesluchowski
+ * @version 1.0
+ * @brief This file contains implementation of Logic class - main
+ * libcynara-client-async class
+ */
+
+#include