Add first version
[ric-plt/sdl.git] / include / private / redis / redisgeneral.hpp
1 /*
2    Copyright (c) 2018-2019 Nokia.
3
4    Licensed under the Apache License, Version 2.0 (the "License");
5    you may not use this file except in compliance with the License.
6    You may obtain a copy of the License at
7
8        http://www.apache.org/licenses/LICENSE-2.0
9
10    Unless required by applicable law or agreed to in writing, software
11    distributed under the License is distributed on an "AS IS" BASIS,
12    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13    See the License for the specific language governing permissions and
14    limitations under the License.
15 */
16
17 #ifndef SHAREDDATALAYER_REDIS_REDISGENERAL_HPP_
18 #define SHAREDDATALAYER_REDIS_REDISGENERAL_HPP_
19
20 #include "private/databaseconfiguration.hpp"
21 #include "private/redis/asynccommanddispatcher.hpp"
22 #include "private/redis/contents.hpp"
23 #include "private/redis/contentsbuilder.hpp"
24 #include "private/redis/reply.hpp"
25 #include <system_error>
26
27 extern "C"
28 {
29     struct redisReply;
30 }
31
32 namespace shareddatalayer
33 {
34     namespace redis
35     {
36         std::string formatToClusterSyntax(const DatabaseConfiguration::Addresses& addresses);
37         const std::set<std::string>& getRequiredRedisModuleCommands();
38         std::error_code getRedisError(int redisContextErr, const char* redisContextErrstr, const redisReply* rr);
39         std::set<std::string> parseCommandListReply(const redis::Reply& reply);
40         bool checkRedisModuleCommands(const std::set<std::string>& availableCommands);
41     }
42 }
43
44 #endif