00001 #ifndef UNHANDLED_REQUEST_CLASS 00002 #define UNHANDLED_REQUEST_CLASS 00003 00004 /*****************************************************************************\ 00005 * * 00006 * Name : unhandled_request * 00007 * Author : Chris Koeritz * 00008 * * 00009 ******************************************************************************* 00010 * Copyright (c) 2004-$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 "entity_defs.h" 00019 #include "infoton.h" 00020 #include "tentacle_helper.h" 00021 00022 // forward. 00023 class octopus_request_id; 00024 00026 00035 class OCTOPUS_CLASS_STYLE unhandled_request : public infoton 00036 { 00037 public: 00038 // these members are informational so they're exposed out in public. 00039 octopus_request_id _original_id; 00040 string_array _original_classifier; 00041 outcome _reason; 00042 00043 unhandled_request(const octopus_request_id &id = octopus_request_id(), 00044 const string_array &original_classifier = string_array(), 00045 const outcome &reason = common::NO_HANDLER); 00046 00047 IMPLEMENT_CLASS_NAME("unhandled_request"); 00048 00049 static string_array the_classifier(); 00051 00055 virtual void pack(byte_array &packed_form) const; 00056 virtual bool unpack(byte_array &packed_form); 00057 virtual clonable *clone() const; 00058 virtual int packed_size() const; 00059 }; 00060 00062 00063 class OCTOPUS_CLASS_STYLE unhandled_request_tentacle 00064 : public tentacle_helper<unhandled_request> 00065 { 00066 public: 00067 unhandled_request_tentacle(bool backgrounded = false) 00068 : tentacle_helper<unhandled_request>(unhandled_request::the_classifier(), 00069 backgrounded) {} 00070 }; 00071 00072 #endif 00073
1.5.1