Project Wolframe
The Straight Path to Successful Projects
Home
Downloads
Documentation
Support
FAQ
Mailing lists
Contact Us
Wolframe, 0.0.3
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
langbind
authorizationFunction.hpp
Go to the documentation of this file.
1
/************************************************************************
2
Copyright (C) 2011 - 2014 Project Wolframe.
3
All rights reserved.
4
5
This file is part of Project Wolframe.
6
7
Commercial Usage
8
Licensees holding valid Project Wolframe Commercial licenses may
9
use this file in accordance with the Project Wolframe
10
Commercial License Agreement provided with the Software or,
11
alternatively, in accordance with the terms contained
12
in a written agreement between the licensee and Project Wolframe.
13
14
GNU General Public License Usage
15
Alternatively, you can redistribute this file and/or modify it
16
under the terms of the GNU General Public License as published by
17
the Free Software Foundation, either version 3 of the License, or
18
(at your option) any later version.
19
20
Wolframe is distributed in the hope that it will be useful,
21
but WITHOUT ANY WARRANTY; without even the implied warranty of
22
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23
GNU General Public License for more details.
24
25
You should have received a copy of the GNU General Public License
26
along with Wolframe. If not, see <http://www.gnu.org/licenses/>.
27
28
If you have questions regarding the use of this file, please contact
29
Project Wolframe.
30
31
************************************************************************/
34
35
#ifndef _Wolframe_LANGBIND_AUTHORIZATION_FUNCTION_HPP_INCLUDED
36
#define _Wolframe_LANGBIND_AUTHORIZATION_FUNCTION_HPP_INCLUDED
37
#include "
types/variant.hpp
"
38
#include <string>
39
#include <vector>
40
#include <boost/shared_ptr.hpp>
41
42
namespace
_Wolframe {
43
namespace
proc {
45
class
ExecContext;
46
}
47
namespace
langbind {
48
51
class
AuthorizationFunction
52
{
53
public
:
55
AuthorizationFunction
(){}
57
virtual
~AuthorizationFunction
(){}
58
61
struct
Attribute
62
{
63
std::string
name
;
64
types::Variant
value
;
65
66
Attribute
(){}
67
Attribute
(
const
Attribute
& o)
68
:
name
(o.
name
),
value
(o.
value
){}
69
Attribute
(
const
std::string& name_,
const
types::Variant
& value_)
70
:
name
(name_),
value
(value_){}
71
};
72
73
virtual
bool
call
(
proc::ExecContext
* ctx,
const
std::string& resource, std::vector<Attribute>& attributes)
const
=0;
74
};
75
77
typedef
boost::shared_ptr<AuthorizationFunction>
AuthorizationFunctionR
;
78
79
}}
//namespace
80
#endif
81
_Wolframe::langbind::AuthorizationFunction::Attribute::Attribute
Attribute(const std::string &name_, const types::Variant &value_)
Definition:
authorizationFunction.hpp:69
_Wolframe::langbind::AuthorizationFunction::call
virtual bool call(proc::ExecContext *ctx, const std::string &resource, std::vector< Attribute > &attributes) const =0
_Wolframe::langbind::AuthorizationFunction::Attribute::Attribute
Attribute(const Attribute &o)
Definition:
authorizationFunction.hpp:67
_Wolframe::proc::ExecContext
Execution context passed to functions for referencing resources and to define authorization dependend...
Definition:
execContext.hpp:47
_Wolframe::langbind::AuthorizationFunction
Interface of a an authorization function.
Definition:
authorizationFunction.hpp:51
_Wolframe::langbind::AuthorizationFunction::Attribute::value
types::Variant value
Definition:
authorizationFunction.hpp:64
_Wolframe::langbind::AuthorizationFunction::AuthorizationFunction
AuthorizationFunction()
Default constructor.
Definition:
authorizationFunction.hpp:55
_Wolframe::types::Variant
Forward declaration.
Definition:
variant.hpp:65
_Wolframe::langbind::AuthorizationFunction::Attribute
Key value pair as authorization function result.
Definition:
authorizationFunction.hpp:61
variant.hpp
Variant value type.
_Wolframe::langbind::AuthorizationFunction::Attribute::name
std::string name
Definition:
authorizationFunction.hpp:63
_Wolframe::langbind::AuthorizationFunction::Attribute::Attribute
Attribute()
Definition:
authorizationFunction.hpp:66
_Wolframe::langbind::AuthorizationFunctionR
boost::shared_ptr< AuthorizationFunction > AuthorizationFunctionR
shared ownership reference of an authorization function
Definition:
authorizationFunction.hpp:77
_Wolframe::langbind::AuthorizationFunction::~AuthorizationFunction
virtual ~AuthorizationFunction()
Destructor.
Definition:
authorizationFunction.hpp:57
Generated on Fri Aug 29 2014 16:25:53 for Wolframe by
1.8.7
Copyright © 2014 -
Project Wolframe
- All Rights Reserved
Copyrights and credits