2 * Copyright (c) 2014 Samsung Electronics Co., Ltd All Rights Reserved
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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
17 * @file ApiInterface.h
18 * @author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
20 * @brief This file contains libcynara-admin API interface definition.
23 #ifndef SRC_ADMIN_API_APIINTERFACE_H_
24 #define SRC_ADMIN_API_APIINTERFACE_H_
30 #include <types/Policy.h>
31 #include <types/PolicyBucketId.h>
32 #include <types/PolicyKey.h>
33 #include <types/PolicyResult.h>
35 #include <cynara-admin.h>
41 ApiInterface() = default;
42 virtual ~ApiInterface() {};
44 virtual int setPolicies(const std::map<PolicyBucketId, std::vector<Policy>> &insertOrUpdate,
45 const std::map<PolicyBucketId, std::vector<PolicyKey>> &remove) noexcept = 0;
46 virtual int insertOrUpdateBucket(const PolicyBucketId &bucket, const PolicyResult &policyResult)
48 virtual int removeBucket(const PolicyBucketId &bucket) noexcept = 0;
53 #endif /* SRC_ADMIN_API_APIINTERFACE_H_ */