1 /* 2 3 Firewall Builder 4 5 Copyright (C) 2008 NetCitadel, LLC 6 7 Author: Vadim Kurland vadim@fwbuilder.org 8 9 $Id$ 10 11 12 This program is free software which we release under the GNU General Public 13 License. You may redistribute and/or modify this program under the terms 14 of that license as published by the Free Software Foundation; either 15 version 2 of the License, or (at your option) any later version. 16 17 This program is distributed in the hope that it will be useful, 18 but WITHOUT ANY WARRANTY; without even the implied warranty of 19 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 20 GNU General Public License for more details. 21 22 To get a copy of the GNU General Public License, write to the Free Software 23 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 24 25 */ 26 27 28 29 30 #ifndef __USERSERVICE_HH_FLAG__ 31 #define __USERSERVICE_HH_FLAG__ 32 33 #include "fwbuilder/Service.h" 34 35 #include <map> 36 37 namespace libfwbuilder 38 { 39 40 class UserService : public Service 41 { 42 private: 43 44 std::string userid; 45 46 public: 47 48 UserService(); 49 virtual ~UserService(); 50 51 virtual void fromXML(xmlNodePtr parent) throw(FWException); 52 virtual xmlNodePtr toXML(xmlNodePtr parent) throw(FWException); 53 virtual bool cmp(const FWObject *obj, bool recursive=false) throw(FWException); 54 55 virtual FWObject& shallowDuplicate(const FWObject *obj, bool preserve_id = true) throw(FWException); 56 57 DECLARE_FWOBJECT_SUBTYPE(UserService); 58 59 DECLARE_DISPATCH_METHODS(UserService); 60 61 virtual std::string getProtocolName() const; 62 virtual int getProtocolNumber() const; 63 getUserId()64 const std::string& getUserId() const { return userid; } setUserId(const std::string & uid)65 void setUserId(const std::string& uid) { userid = uid; } 66 }; 67 68 } 69 70 #endif 71 72 73 74 75