00001 #ifndef SECURITY_INFOTON_CLASS 00002 #define SECURITY_INFOTON_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : security_infoton * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 2002-$now By Author. This program is free software; you can * 00011 * redistribute it and/or modify it under the terms of the GNU General Public * 00012 * License as published by the Free Software Foundation; either version 2 of * 00013 * the License or (at your option) any later version. This is online at: * 00014 * http://www.fsf.org/copyleft/gpl.html * 00015 * Please send any updates to: fred@gruntose.com * 00016 \*****************************************************************************/ 00017 00018 #include "dll_tentacles.h" 00019 00020 #include <octopus/infoton.h> 00021 00023 00024 class TENTACLES_CLASS_STYLE security_infoton : public infoton 00025 { 00026 public: 00027 enum login_modes { 00028 LI_LOGIN, 00029 LI_LOGOUT, 00030 LI_REFRESH 00031 }; 00032 00033 login_modes _mode; 00034 outcome _success; 00035 00036 security_infoton(); 00037 security_infoton(login_modes mode, const outcome &success, 00038 const byte_array &verification); 00039 security_infoton(const security_infoton &to_copy); 00040 00041 virtual ~security_infoton(); 00042 00043 IMPLEMENT_CLASS_NAME("security_infoton"); 00044 00045 security_infoton &operator =(const security_infoton &to_copy); 00046 00047 // observes or modifies the verification token. 00048 const byte_array &verification() const; 00049 byte_array &verification(); 00050 00051 static const string_array &security_classifier(); 00053 00054 virtual void pack(byte_array &packed_form) const; 00055 virtual bool unpack(byte_array &packed_form); 00056 00057 virtual clonable *clone() const; 00058 00059 virtual int packed_size() const; 00060 00061 private: 00062 byte_array *_verification; 00063 }; 00064 00065 #endif 00066
1.5.1