first check-in of feisty meow codebase. many things broken still due to recent
[feisty_meow.git] / octopi / library / octopus / identity_infoton.h
1 #ifndef IDENTITY_INFOTON_CLASS
2 #define IDENTITY_INFOTON_CLASS
3
4 /*****************************************************************************\
5 *                                                                             *
6 *  Name   : identity_infoton                                                  *
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_defs.h"
19 #include "infoton.h"
20
21 namespace octopi {
22
23 //! Encapsulates just the action of identifying an octopus user.
24 /*!
25   This must be done for an entity before it can begin to request octopus
26   services when there is strong security in place.  By default, the octopus
27   does not require this.
28 */
29
30 class identity_infoton : public infoton
31 {
32 public:
33   octopus_entity _new_name;
34
35   identity_infoton();
36   identity_infoton(const octopus_entity &name);
37   identity_infoton(const identity_infoton &to_copy);
38
39   virtual ~identity_infoton();
40
41   DEFINE_CLASS_NAME("identity_infoton");
42
43   identity_infoton &operator = (const identity_infoton &to_copy);
44
45   static const structures::string_array &identity_classifier();
46     //!< returns the classifier for this type of infoton.
47
48   virtual void text_form(basis::base_string &fill) const;
49
50   virtual int packed_size() const;
51   virtual void pack(basis::byte_array &packed_form) const;
52   virtual bool unpack(basis::byte_array &packed_form);
53
54   virtual clonable *clone() const;
55 };
56
57 } //namespace.
58
59 #endif
60