feisty meow concerns codebase 2.140
login_tentacle.h
Go to the documentation of this file.
1#ifndef LOGIN_TENTACLE_CLASS
2#define LOGIN_TENTACLE_CLASS
3
4/*****************************************************************************\
5* *
6* Name : login_tentacle *
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 "security_infoton.h"
19
21
22namespace octopi {
23
24// forward.
25class entity_registry;
26class octopus_request_id;
27
29
35: public tentacle_helper<security_infoton>
36{
37public:
39 int dormancy_period = 7 * basis::MINUTE_ms);
41
46 virtual ~login_tentacle();
47
48 DEFINE_CLASS_NAME("login_tentacle");
49
51 basis::byte_array &packed_form, infoton * &reformed);
53
57 virtual basis::outcome consume(infoton &to_chow, const octopus_request_id &item_id,
58 basis::byte_array &transformed);
60
64 virtual void expunge(const octopus_entity &to_remove);
66
67private:
68 entity_registry &_security;
69 int _dormancy_period;
70};
71
72} //namespace.
73
74#endif
75
A very common template for a dynamic array of bytes.
Definition byte_array.h:36
Outcomes describe the state of completion for an operation.
Definition outcome.h:31
Provides a security model for the octopus.
An infoton is an individual request parcel with accompanying information.
Definition infoton.h:32
Provides rudimentary login services.
DEFINE_CLASS_NAME("login_tentacle")
virtual basis::outcome consume(infoton &to_chow, const octopus_request_id &item_id, basis::byte_array &transformed)
the base login_tentacle allows anyone to log in.
virtual void expunge(const octopus_entity &to_remove)
trashes the records we were keeping for the entity.
virtual basis::outcome reconstitute(const structures::string_array &classifier, basis::byte_array &packed_form, infoton *&reformed)
recreates a "reformed" infoton from the packed data.
Provides a way of identifying users of an octopus object.
Definition entity_defs.h:35
Identifies requests made on an octopus by users.
provides prefab implementations for parts of the tentacle object.
An array of strings with some additional helpful methods.
const int MINUTE_ms
Number of milliseconds in a minute.
Automates some common tasks for tentacle implementations. This template provides some default impleme...