/* ***********************IMPORTANT *********************************************
 *  Copyright (C) 2004-2007 Thierry Lagarde <tlagarde@users.sourceforge.net>
 *  This program is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU General Public License as published by
 *  the Free Software Foundation; either version 2 of the License.
 *
 *
 *                      ********************
 *
 *
 *  This program is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Library General Public License for more details.
 *
 *
 *                      ********************
 *
 *
 * You are highly encouraged to send your changes to <tlagarde@users.sourceforge.net>
 * for possible incorporation into the main distribution.
 * By sending these changes to <tlagarde@users.sourceforge.net>,
 * it is assumed that you are offering <tlagarde@users.sourceforge.net>
 * the unlimited, non-exclusive right to reuse, modify, and relicense the code.
 *
 *
 *                      ********************
 *
 *  You should have received a copy of the GNU General Public License
 *  along with this program; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 **************************************************************************************/
#ifndef         __SETTINGS_SIGNATURE
#define         __SETTINGS_SIGNATURE

#include <libxml/tree.h>
#include <libxml/parser.h>

enum {
	COL_NAME = 0,
	COL_MD5,
	POINTER,	
	NUM_COLS
};

enum enum_Etat_Autre {
	AUTRE_INDIFFERENT = 0,
	AUTRE_YES,		
	AUTRE_NO
};

enum enum_Etat_Port_Signature {
	CLOSED = 0,
	INDIFFERENT,
	CAN_BE_OPENED,	

	MUST_BE_OPENED
};

enum enum_Etat_Snmp_Signature {
	SNMP_INDIFFERENT = 0,
	SNMP_CAN_BE_OPENED,	

	SNMP_MUST_BE_OPENED,
	SNMP_NULL
};
struct Struct_Signature {
	GtkTreeIter ID_Arbre_Ligne;
	gint      Nb_Fils;
	gpointer *Signature_Pere;
	gchar    *System_Name;
	gchar    *Md5_Signature;
	gchar    *Icon;
	GdkPixbuf *icone;
	GdkPixbuf *icone_grise;
	gint      Equipment_Type;
	gint      Open_Port;
	gint      Close_Port;
	gint  Snmp;
	gboolean  Firewall;
	gint  Smb;
	gint  Sip;
	gint  Printer;
	gint  JetDirect;
	gint  GateWay;
	gint  Routage;
	gchar    *MAC;
	gchar	 *UDP;
	gchar	 *Snmp_Name;
	gint      Etat_Snmp_Name;
	gchar	 *Snmp_Description;
	gint      Etat_Snmp_Description;
	gchar	 *Snmp_Device;
	gint      Etat_Snmp_Device;
	gchar    *Header_FTP;
	gint      Etat_FTP;
	gchar    *Header_HTTP;
	gint      Etat_HTTP;
	gchar    *Header_HTTPS;
	gint      Etat_HTTPS;
	gchar    *Header_IMAP;
	gint      Etat_IMAP;
	gchar    *Header_SMTP;
	gint      Etat_SMTP;
	gchar    *Header_SSH;
	gint      Etat_SSH;
	gchar    *Header_TELNET;
	gint      Etat_TELNET;
};

struct Struct_Signature *Signature_Modification, *Signature_Selectionner;
GtkWidget *treeview_Liste_Signature;
gboolean  Liste_Signatures_Modification_Interface;

void      Rajouter_Nouvelle_Signature (gchar * Nom, gchar * Signature_Md5, gint Type, gchar * icon, gchar * Entete_FTP, gchar * Entete_HTTP,gchar * Entete_HTTPS, gchar * Entete_IMAP, gchar * Entete_SMTP, gchar * Entete_SSH, gchar * Entete_TELNET, gboolean GateWay, gboolean Routage);
void      Enregistrement_Donnee_Xml_Signature (void);
void      Supprime_Signature_liste (struct Struct_Signature *Signature);
struct Struct_Signature *Liste_Signature_Recherche_Orphelin (gchar * Md5_Signature);
void      Modifie_Ajoute_Nouvelle_Signature (void);
void      Liste_Signature_Efface_Champs (void);
void      Liste_Signature_Sensible (gboolean bool);
void      Initialisation_Liste_Signature (void);
void      Lit_Donnee_Xml_Signature (xmlNodePtr xmlnode, struct Struct_Signature *Signature_Pere);
void      Lit_Xml_Signature (xmlDocPtr doc);
gboolean  Lit_Xml_Signature_Fichier (char *fname);
void      Afficher_Liste_Signature (void);
void      Create_Liste_Signature (void);
#endif
