Merge branch '3205_eta'
[midnight-commander.git] / src / background.h
blob2b25facd286ca00f4c6cb2198dff813325e1b1f0
1 /** \file background.h
2 * \brief Header: Background support
3 */
5 #ifndef MC__BACKGROUND_H
6 #define MC__BACKGROUND_H
8 #include <sys/types.h> /* pid_t */
9 #include "filemanager/filegui.h"
11 /*** typedefs(not structures) and defined constants **********************************************/
13 enum TaskState
15 Task_Running,
16 Task_Stopped
19 typedef struct TaskList
21 int fd;
22 int to_child_fd;
23 pid_t pid;
24 int state;
25 char *info;
26 struct TaskList *next;
27 } TaskList;
29 /*** enums ***************************************************************************************/
31 /*** structures declarations (and typedefs of structures)*****************************************/
33 /*** global variables defined in .c file *********************************************************/
35 extern TaskList *task_list;
37 /*** declarations of public functions ************************************************************/
39 int do_background (file_op_context_t * ctx, char *info);
40 int parent_call (void *routine, file_op_context_t * ctx, int argc, ...);
41 char *parent_call_string (void *routine, int argc, ...);
43 void unregister_task_running (pid_t pid, int fd);
44 void unregister_task_with_pid (pid_t pid);
46 gboolean background_parent_call (const gchar * event_group_name, const gchar * event_name,
47 gpointer init_data, gpointer data);
49 gboolean
50 background_parent_call_string (const gchar * event_group_name, const gchar * event_name,
51 gpointer init_data, gpointer data);
53 /*** inline functions ****************************************************************************/
55 #endif /* MC__BACKGROUND_H */