/*
 * This file is part of DesktopBSD, see the README file.
 *
 * Author: Peter Hofer <ph@desktopbsd.net>
 *         (C) 2004, 2005
 *
 * Copyright: BSD, see the COPYING file included in this distribution
 *
 */

#ifndef __WLAN_H
#define __WLAN_H

#include <lan.h>

#include <wepmode.h>
#include <ipv4addr.h>
#include <ipv4netmask.h>
#include <accesspoint.h>

#include <qstring.h>
#include <qptrlist.h>

/** @brief A wireless lan connection profile.
  *
  * This extends the LAN connection profile and adds
  * fields for wireless properties, such as SSID and
  * WEP mode.
  *
  * Like LAN, it's serializable.
  */
class WLAN : public LAN {
public:
   WLAN(const QString &,  WEPMode,  const  QString &);
   WLAN(const AccessPoint &,  const QString &  = "");
   WLAN(const IPv4Addr &,  const IPv4Netmask &,  const IPv4Addr &,
        const QPtrList<IPv4Addr> &,  const QString &,  WEPMode,  const QString &);


   virtual  ~WLAN() {};

   static   WLAN     fromString(const QString &);
   virtual  QString  toString();

   QString  getBSSID()    const { return bssID;   }
   QString  getSSID()     const { return ssID;    }
   WEPMode  getWEPMode()  const { return wepMode; }
   QString  getWEPKey()   const { return wepKey;  }

   void   setAP(const  AccessPoint &);

   bool  setSSID(const QString &);
   bool  setWEPKey(const QString &);
   void  setWEPKeyNull();
   void  setWEPMode(WEPMode);

private:
   /** MAC Address of the access point, "BSSID" */
   QString   bssID;

   /** Network ID String, "SSID" */
   QString   ssID;

   WEPMode   wepMode;

   /** WEP Key as hex number (!) */
   QString   wepKey;
};

#endif /* __WLAN_H */
