%{_libdir}/libcynara-commons.so.*
%files -n libcynara-commons-devel
+%{_includedir}/cynara/cynara-policy-types.h
%{_includedir}/cynara/types/PolicyResult.h
%{_includedir}/cynara/types/PolicyType.h
%{_libdir}/libcynara-commons.so
SET(COMMON_PATH ${CYNARA_PATH}/common)
+INCLUDE_DIRECTORIES(
+ ${CYNARA_PATH}/include
+ )
+
SET(COMMON_SOURCES
${COMMON_PATH}/containers/BinaryQueue.cpp
${COMMON_PATH}/log/log.cpp
#include <cstdint>
#include <string>
+#include <cynara-policy-types.h>
+
namespace Cynara {
typedef std::uint16_t PolicyType;
namespace PredefinedPolicyType {
- const PolicyType DENY = 0;
- const PolicyType NONE = 1;
- const PolicyType BUCKET = 0xFFFE;
- const PolicyType ALLOW = 0xFFFF;
+ const PolicyType DENY = CYNARA_ADMIN_DENY;
+ const PolicyType NONE = CYNARA_ADMIN_NONE;
+ const PolicyType BUCKET = CYNARA_ADMIN_BUCKET;
+ const PolicyType ALLOW = CYNARA_ADMIN_ALLOW;
};
class PolicyResult;
${CYNARA_PATH}/include/cynara-creds-socket.h
${CYNARA_PATH}/include/cynara-error.h
${CYNARA_PATH}/include/cynara-plugin.h
+ ${CYNARA_PATH}/include/cynara-policy-types.h
${CYNARA_PATH}/include/cynara-session.h
DESTINATION ${INCLUDE_INSTALL_DIR}/cynara
)
*/
#define CYNARA_ADMIN_DEFAULT_BUCKET ""
-/**
- * \name Operation Codes
- * operation codes that define action type to be taken in below defined functions
- * they are used mostly to define policy result
- * @{
- */
-
-/*! \brief a policy or bucket should be removed */
-#define CYNARA_ADMIN_DELETE -1
-
-/*! \brief set policy result or bucket's default policy to DENY */
-#define CYNARA_ADMIN_DENY 0
-
-/*! \brief set bucket's default policy to NONE */
-#define CYNARA_ADMIN_NONE 1
-
-/*! \brief set policy result or bucket's default policy to ALLOW */
-#define CYNARA_ADMIN_ALLOW 2
-
-/*! \brief set policy to point into another bucket */
-#define CYNARA_ADMIN_BUCKET 3
-/** @}*/
-
#ifdef __cplusplus
}
#endif
#include <cynara-admin-types.h>
#include <cynara-error.h>
+#include <cynara-policy-types.h>
#ifdef __cplusplus
extern "C" {
#include <cynara-admin-types.h>
#include <cynara-error.h>
+#include <cynara-policy-types.h>
#ifdef __cplusplus
extern "C" {
--- /dev/null
+/*
+ * 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-policy-types.h
+ * \author Lukasz Wojciechowski <l.wojciechow@partner.samsung.com>
+ * \version 1.0
+ * \brief This file contains policy types / operations definitions.
+ */
+
+#ifndef CYNARA_POLICY_TYPES_H
+#define CYNARA_POLICY_TYPES_H
+
+/**
+ * \name Operation Codes
+ * operation codes that define action type to be taken in below defined functions
+ * they are used mostly to define policy result
+ * @{
+ */
+
+/*! \brief a policy or bucket should be removed */
+#define CYNARA_ADMIN_DELETE -1
+
+/*! \brief set policy result or bucket's default policy to DENY */
+#define CYNARA_ADMIN_DENY 0
+
+/*! \brief set bucket's default policy to NONE */
+#define CYNARA_ADMIN_NONE 1
+
+/*! \brief set policy to point into another bucket */
+#define CYNARA_ADMIN_BUCKET 0xFFFE
+
+/*! \brief set policy result or bucket's default policy to ALLOW */
+#define CYNARA_ADMIN_ALLOW 0xFFFF
+/** @}*/
+
+#endif /* CYNARA_POLICY_TYPES_H */