/*
 * netconfig_menu.h:
 *
 * See the README file for copyright information and how to reach the author.
 *
 * $Id: netconfig_menu.h,v 1.1.1.1 2005/06/27 13:37:56 cm Exp $
 */

#ifndef __NCMENU_H
#define __NCMENU_H

#include <vdr/osd.h>
#include <vdr/menuitems.h>
#include <vdr/menu.h>
#include "netconfig_conf.h"
#include "netconfig_net.h"
#include "addritem.h"

enum eInterfaceMode { imDHCP = 0, imStatic, imUnset };

class cNetconfigMenuEditParameter : public cOsdMenu {
  private:
    char key[101], value[101];
    cNetconfigParameter *po_parameter;
  public:
    cNetconfigMenuEditParameter(cNetconfigParameter *parameter);
    ~cNetconfigMenuEditParameter();
    eOSState ProcessKey(eKeys Key);
    void Set(void);
};

class cNetconfigMenuDetails : public cMenuText {
  public:
    cNetconfigMenuDetails(const char *device);
    ~cNetconfigMenuDetails();
    void Set(const char *device);
};

class cNetconfigMenuSamba: public cOsdMenu {
  public:
    cNetconfigMenuSamba();
    ~cNetconfigMenuSamba();
    eOSState ProcessKey(eKeys Key);
    void Set(void);
};

class cNetconfigMenuConfig : public cOsdMenu {
  private:
    char hostname[31];
    char domain[31];
    const char **pp_devices;
    unsigned long gateway;
    unsigned long nameserver;
    unsigned long addr;
    int mask;
    int selectedDevice;
    int prevDevice;
    int mode;
  public:
    cNetconfigMenuConfig();
    ~cNetconfigMenuConfig();
   eOSState ProcessKey(eKeys Key);
    void Set(void);
};

class cNetconfigMenuState : public cOsdMenu {
  private:
    cNetconfigNetDevice oNetDev;
  public:
    cNetconfigMenuState(void);
    ~cNetconfigMenuState(void);
    eOSState ProcessKey(eKeys Key);
    void Set();
};

class cNetconfigMenu : public cOsdMenu {
  public:
    cNetconfigMenu();
    ~cNetconfigMenu();
    eOSState ProcessKey(eKeys Key);
    void Set();
};

class cNetconfigSetupMenu : public cMenuSetupPage {
  private:
    int newMenuEntry;
  protected:
    void Store(void);
  public:
    cNetconfigSetupMenu();
};

#endif
