00001 // -*- C++ -*- 00002 // vim:ts=8 sts=4 sw=4 00003 00004 // ***** BEGIN LICENSE BLOCK ***** 00005 // Version: MPL 1.1/GPL 2.0/LGPL 2.1 00006 // 00007 // The contents of this file are subject to the Mozilla Public License 00008 // Version 1.1 (the "License"); you may not use this file except in 00009 // compliance with the License. You may obtain a copy of the License at 00010 // http://www.mozilla.org/MPL/ 00011 // 00012 // Software distributed under the License is distributed on an "AS IS" 00013 // basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See 00014 // the License for the specific language governing rights and limitations 00015 // under the License. 00016 // 00017 // The Original Code is the consmgr network/serial-line monitoring package. 00018 // 00019 // The Initial Developer of the Original Code is Chris P. Ross. 00020 // Portions created by the Initial Developer are Copyright (C) 2000-2008 00021 // the Initial Developer. All Rights Reserved. 00022 // 00023 // Contributor(s): 00024 // Geoff Adams 00025 // 00026 // Alternatively, the contents of this file may be used under the terms of 00027 // either the GNU General Public License Version 2 or later (the "GPL"), or 00028 // the GNU Lesser General Public License Version 2.1 or later (the "LGPL"), 00029 // in which case the provisions of the GPL or the LGPL are applicable instead 00030 // of those above. If you wish to allow use of your version of this file only 00031 // under the terms of either the GPL or the LGPL, and not to allow others to 00032 // use your version of this file under the terms of the MPL, indicate your 00033 // decision by deleting the provisions above and replace them with the notice 00034 // and other provisions required by the GPL or the LGPL. If you do not delete 00035 // the provisions above, a recipient may use your version of this file under 00036 // the terms of any one of the MPL, the GPL or the LGPL. 00037 // 00038 // ***** END LICENSE BLOCK ***** 00039 00040 #ifndef __LISTENER_H 00041 #define __LISTENER_H 00042 00043 #include <loki/SmartPtr.h> 00044 00045 #include "connector.h" 00046 00084 class Listener 00085 { 00086 public: 00090 virtual ~Listener() { }; 00091 00097 virtual ConnectorP listen_for_incoming() = 0; 00098 00100 virtual void disconnect() = 0; 00101 00103 virtual std::string get_id(void) const = 0; 00104 virtual std::string class_name(void) const = 0; 00105 00106 }; 00107 00112 typedef Loki::SmartPtr<Listener, 00113 Loki::RefCountedMTAdj<Loki::ObjectLevelLockable>::RefCountedMT> 00114 ListenerP; 00115 00118 #endif /* __LISTENER_H */