sync with 0.7.5cvs19
[claws.git] / src / automaton.h
index d954e0472a084f6e392b196e4195d3c5018e2aae..41910cd91dd5a7cef26981bdcc4d6f776a0fd709 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 1999,2000 Hiroyuki Yamamoto
+ * Copyright (C) 1999-2002 Hiroyuki Yamamoto
  *
  * 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
 
 #include <glib.h>
 
+#include "socket.h"
+
 typedef struct _AtmState       AtmState;
 typedef struct _Automaton      Automaton;
 
-typedef gint   (*AtmHandler)   (gint source, gpointer data);
+typedef gint   (*AtmHandler)   (SockInfo       *source,
+                                gpointer        data);
+typedef void   (*AtmUIFunc)    (gpointer        data,
+                                gint            state);
 
 struct _AtmState
 {
        GdkInputCondition condition;
-       gint (*handler)(gint source, gpointer data);
+       gint (*handler) (SockInfo       *source,
+                        gpointer        data);
 };
 
 struct _Automaton
@@ -41,14 +47,22 @@ struct _Automaton
        guint timeout_tag;
        guint elapsed;
        gboolean terminated;
+
        gpointer data;
        AtmState *state;
-       gint (*terminate)(gint source, gpointer data);
+
+       gint (*terminate)       (SockInfo       *source,
+                                gpointer        data);
+
+       AtmUIFunc ui_func;
+
+       SockInfo *help_sock;
 };
 
-Automaton *automaton_create(gint num);
-void automaton_destroy(Automaton *atm);
-void automaton_input_cb(gpointer data, gint source,
-                       GdkInputCondition condition);
+Automaton *automaton_create    (gint                    num);
+void automaton_destroy         (Automaton              *atm);
+void automaton_input_cb                (gpointer                data,
+                                gint                    dummy_source,
+                                GdkInputCondition       condition);
 
 #endif /* __AUTOMATON_H__ */