Leosac  0.8.0
Open Source Access Control
Auth.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2014-2016 Leosac
3 
4  This file is part of Leosac.
5 
6  Leosac is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Affero General Public License as published by
8  the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  Leosac is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Affero General Public License for more details.
15 
16  You should have received a copy of the GNU Affero General Public License
17  along with this program. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #pragma once
21 #include "AuthFwd.hpp"
22 #include <zmqpp/message.hpp>
23 
24 namespace Leosac
25 {
26 namespace Auth
27 {
28 
29 enum class SourceType : uint8_t
30 {
35  SIMPLE_WIEGAND = 1,
36 
40  WIEGAND_PIN = 2,
41 
45  WIEGAND_CARD_PIN = 3,
46 
51  SIMPLE_CSN = 4,
52 };
53 
54 enum class AccessStatus : uint8_t
55 {
56  GRANTED = 1,
57  DENIED = 2,
58 };
59 }
60 }
61 
62 zmqpp::message &operator>>(zmqpp::message &msg, Leosac::Auth::SourceType &t);
63 
64 zmqpp::message &operator<<(zmqpp::message &msg, const Leosac::Auth::SourceType &t);
65 
66 zmqpp::message &operator>>(zmqpp::message &msg, Leosac::Auth::AccessStatus &st);
67 
68 zmqpp::message &operator<<(zmqpp::message &msg,
69  const Leosac::Auth::AccessStatus &st);
operator<<
zmqpp::message & operator<<(zmqpp::message &msg, const Leosac::Auth::SourceType &t)
Definition: Auth.cpp:22
AuthFwd.hpp
Leosac::Auth::SourceType::WIEGAND_PIN
@ WIEGAND_PIN
Message formatting when using a simple PIN code.
Leosac::Auth::SourceType::WIEGAND_CARD_PIN
@ WIEGAND_CARD_PIN
When reading both a card an a PIN code.
Leosac::Auth::AccessStatus::GRANTED
@ GRANTED
Leosac
This is the header file for a generated source file, GitSHA1.cpp.
Definition: APIStatusCode.hpp:22
Leosac::Auth::AccessStatus
AccessStatus
Definition: Auth.hpp:54
Leosac::Auth::SourceType::SIMPLE_CSN
@ SIMPLE_CSN
A simple Card Serial Number.
Leosac::Auth::AccessStatus::DENIED
@ DENIED
Leosac::Auth::SourceType
SourceType
Definition: Auth.hpp:29
Leosac::Auth::SourceType::SIMPLE_WIEGAND
@ SIMPLE_WIEGAND
This define message formatting for data source SIMPLE_WIEGAND.
operator>>
zmqpp::message & operator>>(zmqpp::message &msg, Leosac::Auth::SourceType &t)
Definition: Auth.cpp:31