home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / oclsrc15.zip / OCL / Include / OIP_Address.hpp < prev    next >
C/C++ Source or Header  |  1996-08-12  |  3KB  |  95 lines

  1. // OCL - OS/2 Class Library
  2. // (c) Cubus 1996
  3. // (c) 1982, 1985, 1986 Regents of the University of California.
  4. // (c) Raoul Gema 1996
  5. // All Rights Reserved
  6. // OIP_Address.hpp
  7.  
  8. /*
  9.  * Redistribution and use in source and binary forms, with or without
  10.  * modification, are permitted provided that the following conditions
  11.  * are met:
  12.  * 1. Redistributions of source code must retain the above copyright
  13.  *    notice, this list of conditions and the following disclaimer.
  14.  * 2. Neither the name Cubus nor the name Team OCL may be used to
  15.  *    endorse or promote products derived from this software
  16.  *    without specific prior written permission.
  17.  * 3. See OCL.INF for a detailed copyright notice.
  18.  *
  19.  *              THIS SOFTWARE IS PROVIDED ``AS IS'' AND
  20.  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  21.  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  22.  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  23.  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  24.  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  25.  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  26.  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  27.  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  28.  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  29.  * SUCH DAMAGE.
  30.  */
  31.  
  32.  
  33. // $Header: W:/Projects/OCL/Include/rcs/OIP_Address.hpp 1.50 1996/08/11 23:47:15 B.STEIN Release $
  34.  
  35.  
  36. #ifndef OIP_ADDRESS_INCLUDED
  37.    #define OIP_ADDRESS_INCLUDED
  38.  
  39.  
  40. #ifndef OIP_INCLUDED
  41.   #include <OIP.hpp>
  42. #endif
  43.  
  44. typedef class OIP_Address *pOIP_Address;
  45.  
  46. class __CPP_EXPORT__ OIP_Address
  47.   : public OCLObject
  48. {
  49.  public:
  50.  
  51.      OIP_Address         ();
  52.  
  53.      OIP_Address         (UCHAR i1,
  54.                           UCHAR i2,
  55.                           UCHAR i3,
  56.                           UCHAR i4);
  57.  
  58.      OIP_Address         (ULONG addr);
  59.  
  60.      virtual
  61.        ~OIP_Address      ();
  62.  
  63.      virtual
  64.        PSZ isOfType      () const;
  65.  
  66.  
  67.      void
  68.        Set_s_addr        (UCHAR i1,
  69.                           UCHAR i2,
  70.                           UCHAR i3,
  71.                           UCHAR i4);
  72.  
  73.      int
  74.        Set_s_addr        (PSZ   addrtext);
  75.  
  76.      ULONG
  77.        Set_s_addr        (ULONG addr),
  78.        Get_s_addr        ();
  79.  
  80.      void
  81.        Get_inet_addr     (PSZ adress);
  82.  
  83.      operator ULONG      ();
  84.      operator =          (ULONG addr);
  85.  
  86.  
  87.  protected:
  88.      in_addr             addr_data;
  89.  
  90. };
  91.  
  92.  
  93. #endif    // OIP_ADDRESS_INCLUDED
  94.  
  95.