This repository has been archived by the owner on Dec 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
cevent.h
81 lines (49 loc) · 1.66 KB
/
cevent.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
/* Copyright 2008,2009,2010 Edwin Eefting (edwin@datux.nl)
This file is part of Synapse.
Synapse is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Synapse is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Synapse. If not, see <http://www.gnu.org/licenses/>. */
#ifndef CEVENT_H
#define CEVENT_H
#include <string>
#include "cgroup.h"
#include "cuser.h"
#include <boost/shared_ptr.hpp>
namespace synapse
{
using namespace boost;
using namespace std;
/**
@author
*/
class Cevent{
public:
Cevent(const CgroupPtr & modifyGroup, const CgroupPtr & sendGroup, const CgroupPtr & recvGroup );
~Cevent();
bool isSendAllowed(const CuserPtr & user);
bool isRecvAllowed(const CuserPtr & user);
bool isSendAllowed(const CgroupPtr & group);
bool isRecvAllowed(const CgroupPtr & group);
bool isModifyAllowed(const CuserPtr & user);
void setRecvGroup(const CgroupPtr & group);
void setSendGroup(const CgroupPtr & group);
void setModifyGroup(const CgroupPtr & group);
void print();
CgroupPtr getRecvGroup();
CgroupPtr getSendGroup();
CgroupPtr getModifyGroup();
private:
CgroupPtr sendGroup;
CgroupPtr recvGroup;
CgroupPtr modifyGroup;
};
typedef boost::shared_ptr<Cevent> CeventPtr;
}
#endif