feisty meow concerns codebase 2.140
simple_entity_registry.h
Go to the documentation of this file.
1#ifndef SIMPLE_CLIENT_REGISTRY_CLASS
2#define SIMPLE_CLIENT_REGISTRY_CLASS
3
4/*****************************************************************************\
5* *
6* Name : simple_entity_registry *
7* Author : Chris Koeritz *
8* *
9*******************************************************************************
10* Copyright (c) 2002-$now By Author. This program is free software; you can *
11* redistribute it and/or modify it under the terms of the GNU General Public *
12* License as published by the Free Software Foundation; either version 2 of *
13* the License or (at your option) any later version. This is online at: *
14* http://www.fsf.org/copyleft/gpl.html *
15* Please send any updates to: fred@gruntose.com *
16\*****************************************************************************/
17
18#include "entity_registry.h"
19
20namespace octopi {
21
22// forward.
23class octopus_entity;
24class recognized_entity;
25class recognized_entity_list;
26
28
40{
41public:
44
45 virtual bool authorized(const octopus_entity &entity);
47
48 virtual bool locate_entity(const octopus_entity &entity,
49 timely::time_stamp &last_active, basis::byte_array &verification);
51
53 virtual bool add_entity(const octopus_entity &entity,
54 const basis::byte_array &verification);
56
60 virtual bool refresh_entity(const octopus_entity &entity);
62
65 virtual bool zap_entity(const octopus_entity &entity);
67
69 virtual basis::astring text_form();
71
72private:
73 basis::mutex *_secure_lock;
74 recognized_entity_list *_entities;
75};
76
77} //namespace.
78
79#endif
80
Provides a dynamically resizable ASCII character string.
Definition astring.h:35
A very common template for a dynamic array of bytes.
Definition byte_array.h:36
Provides a security model for the octopus.
Provides a way of identifying users of an octopus object.
Definition entity_defs.h:35
Provides a basic implementation of an entity_registry for octopus.
virtual bool locate_entity(const octopus_entity &entity, timely::time_stamp &last_active, basis::byte_array &verification)
retrieves the "security_record" for the "entity" if it exists.
virtual bool zap_entity(const octopus_entity &entity)
removes an "entity" if the entity can be found.
virtual bool refresh_entity(const octopus_entity &entity)
this should be used to refresh the entity's health record.
virtual bool add_entity(const octopus_entity &entity, const basis::byte_array &verification)
adds the "entity" to the list of authorized users.
virtual basis::astring text_form()
shows the contents of the registry.
virtual bool authorized(const octopus_entity &entity)
returns true if the "entity" is a registered and authorized entity.
Represents a point in time relative to the operating system startup time.
Definition time_stamp.h:38