00001 #ifndef QPID_ACL_ACLDATA_H
00002 #define QPID_ACL_ACLDATA_H
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #include "qpid/broker/AclModule.h"
00024 #include <vector>
00025
00026
00027 namespace qpid {
00028 namespace acl {
00029
00030 class AclData {
00031
00032
00033 public:
00034
00035 typedef std::map<qpid::acl::Property, std::string> propertyMap;
00036 typedef propertyMap::const_iterator propertyMapItr;
00037 struct rule {
00038
00039 bool log;
00040 bool logOnly;
00041
00042
00043
00044 propertyMap props;
00045
00046
00047 rule (propertyMap& p):log(false),logOnly(false),props(p) {};
00048 };
00049 typedef std::vector<rule> ruleSet;
00050 typedef ruleSet::const_iterator ruleSetItr;
00051 typedef std::map<std::string, ruleSet > actionObject;
00052 typedef actionObject::iterator actObjItr;
00053 typedef actionObject* aclAction;
00054
00055
00056 aclAction* actionList[qpid::acl::ACTIONSIZE];
00057 qpid::acl::AclResult decisionMode;
00058 bool transferAcl;
00059
00060 AclResult lookup(const std::string& id, const Action& action, const ObjectType& objType, const std::string& name, std::map<Property, std::string>* params=0);
00061 AclResult lookup(const std::string& id, const Action& action, const ObjectType& objType, const std::string& ExchangeName, const std::string& RoutingKey);
00062 AclResult getACLResult(bool logOnly, bool log);
00063
00064 bool matchProp(const std::string & src, const std::string& src1);
00065 void clear ();
00066
00067 AclData();
00068 virtual ~AclData();
00069 };
00070
00071 }}
00072
00073 #endif // QPID_ACL_ACLDATA_H