conexus logo

addresscontainer.h

Go to the documentation of this file.
00001 /***************************************************************************
00002  *   Copyright (C) 2001 by Rick L. Vinyard, Jr.                            *
00003  *   rvinyard@cs.nmsu.edu                                                  *
00004  *                                                                         *
00005  *   This file is part of the conexus library.                             *
00006  *                                                                         *
00007  *   The conexus library is free software; you can redistribute it and/or  *
00008  *   modify it under the terms of the GNU General Public License           *
00009  *   version 3 as published by the Free Software Foundation.               *
00010  *                                                                         *
00011  *   The conexus library is distributed in the hope that it will be        *
00012  *   useful, but WITHOUT ANY WARRANTY; without even the implied warranty   *
00013  *   of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU   *
00014  *   General Public License for more details.                              *
00015  *                                                                         *
00016  *   You should have received a copy of the GNU General Public License     *
00017  *   along with this software. If not see <http://www.gnu.org/licenses/>.  *
00018  ***************************************************************************/
00019 #ifndef CONEXUSGTKMMADDRESSENTRY_H
00020 #define CONEXUSGTKMMADDRESSENTRY_H
00021 
00022 #include <set>
00023 #include <conexus.h>
00024 
00025 
00026 namespace Conexus
00027 {
00028   namespace Gtk
00029   {
00030 
00034     class AddressContainer
00035     {
00036       public:
00037 
00038         typedef std::set<Conexus::IPv4::Address*> IPv4Addresses;
00039         typedef std::set<Conexus::IPv4::Address*>::iterator IPv4Iterator;
00040         typedef std::set<Conexus::IPv6::Address*> IPv6Addresses;
00041         typedef std::set<Conexus::IPv6::Address*>::iterator IPv6Iterator;
00042         typedef enum ValidateType { IPV4=1, IPV6=2 } ValidateType;
00043 
00044         AddressContainer ( unsigned validate=IPV4|IPV6 );
00045 
00046         virtual ~AddressContainer();
00047 
00048         void connect ( Conexus::IPv4::Address& address );
00049         void disconnect ( Conexus::IPv4::Address& address );
00050         void connect ( Conexus::IPv6::Address& address );
00051         void disconnect ( Conexus::IPv6::Address& address );
00052 
00053         unsigned validate_type();
00054         void set_validate_type ( unsigned validate );
00055 
00056       protected:
00057         unsigned m_validate_type;
00058         IPv4Addresses m_ipv4_address;
00059         IPv6Addresses m_ipv6_address;
00060 
00061         virtual void on_connect ( Conexus::IPv4::Address& address );
00062         virtual void on_disconnect ( Conexus::IPv4::Address& address );
00063         virtual void on_connect ( Conexus::IPv6::Address& address );
00064         virtual void on_disconnect ( Conexus::IPv6::Address& address );
00065         virtual void on_validate_type_changed();
00066 
00067     };
00068 
00069   }
00070 
00071 }
00072 
00073 #endif

Generated on Tue Jun 9 10:01:55 2009 for conexus by doxygen 1.5.7.1