Main Page | Class Hierarchy | Class List | File List | Class Members

CoreBundle.h

00001 // tacppd support for join several tacppd to one bundle
00002 // (c) Copyright in 2000-2005 by tacppd team and contributors
00003 // see http://tacppd.org for more information
00004 //
00005 //  This program is free software; you can redistribute it and/or modify
00006 //  it under the terms of the GNU General Public License as published by
00007 //  the Free Software Foundation; either version 2 of the License, or
00008 //  (at your option) any later version.
00009 //
00010 //  This program is distributed in the hope that it will be useful,
00011 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
00012 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00013 //  GNU General Public License for more details.
00014 //
00015 //  You should have received a copy of the GNU General Public License
00016 //  along with this program; if not, write to the Free Software
00017 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00018 
00019 // all comments which start from /** - this is comments for KDoc
00020 //  for classes
00021 //    @short [short description of the class]
00022 //    @author [class author]
00023 //    @version [class version]
00024 //    @see [references to other classes or methods]
00025 //  for methods
00026 //    @see [references]
00027 //    @return [sentence describing the return value]
00028 //    @exception [list the exeptions that could be thrown]
00029 //    @param [name id] [description]    - can be multiple
00030 
00031 #ifndef __CORE_BUNDLE_H__
00032 #define __CORE_BUNDLE_H__
00033 
00034 #include "global.h"
00035 
00036 namespace tacpp {
00037 
00043 class CoreBundle : public Core_data {
00046   pthread_mutex_t Mutex_;
00049   void lock();
00052   void unlock();
00055   ipaddr mgroup_;
00058   unsigned int port_;
00061   int ttl_;
00064   int priority_;
00067   string key_;
00070   time_t keepalive_time_;
00071  public:
00074   CoreBundle(const string,const string);
00077   ~CoreBundle();
00080   bool isBundle();
00083   ipaddr getMgroup();
00086   unsigned int getPort();
00089   int getTtl();
00092   int getPri();
00095   string getKey();
00098   void del();
00101   void modifyMgroup(ipaddr);
00104   void modifyPort(unsigned int);
00107   void modifyKey(const string);
00110   void modifyTtl(int);
00113   void modifyPri(int);
00116   string buildcfstr(int);
00119   string applycf(char * const*mask,const string cmdname,const list<string>paramList,Command * cmd=NULL)throw (CmdErr);
00122   void periodic();
00123 };
00124 
00130 class BundleProcessor {
00131  public:
00134   BundleProcessor(ipaddr,unsigned int,char*);
00135 };
00136 
00137 };
00138 
00139 #endif // __CORE_BUNDLE_H__

Generated on Thu Jul 21 23:09:45 2005 for tacppd.kdevelop by doxygen 1.3.5