#ifndef OPTIONS_H
#define OPTIONS_H

#include <glib.h>

#define  DEFAULT 100
#define YES 1
#define NO  0
#define CIPHER_3DES     0
#define CIPHER_BLOWFISH 1

typedef struct {
  /* Basic settings */
  gchar *hostname;
  gchar *username;
  gboolean usePort;
  unsigned int port;
  /* Extra settings */
  gboolean useExtra;
  /* Forwarding */
  gboolean forwardLocal;
  gint forwardLocalPortC;
  gchar *forwardLocalDest;
  gint forwardLocalPort;
  gboolean forwardRemote;
  gint forwardRemotePortC;
  gchar *forwardRemoteDest;
  gint forwardRemotePort;
  gchar *forwardX11;
  gchar *forwardAuth;
  gboolean allowRemoteConnect;
  gboolean disableKerberosForwarding;
  /* Protocol related settings */
  gchar *cipherType;
  gboolean useCustomEscape;
  gchar *customEscape;
  gchar *identityFile;
  gboolean useNonPrivilegedPort;
  gchar *allocatePseudoTTY;
  gboolean compress;
  gchar *customOptions;
  /* Command execution */
  gboolean forkToBg;
  gboolean devNull;
  gboolean execCmd;
  gchar *remoteCmd;
} SSH_Entry;

typedef struct {
  SSH_Entry *entries;
  int numEntries;
} EntryList;

typedef struct {
  EntryList *entries;
  gchar *ssh_cmd;
  gchar *term_cmd;
  gboolean save_host_name;
  gboolean save_host_settings;
  gboolean use_host_settings;
} Options;

Options *loadSettings(char *filename);
void initExtra(SSH_Entry *initThis);
int saveSettings(char *filename,Options *opts);
int importkssh(char *filename,Options *opts,gboolean append);
#endif
