root/src/background.h

/* [previous][next][first][last][top][bottom][index][help]  */

INCLUDED FROM


   1 /** \file background.h
   2  *  \brief Header: Background support
   3  */
   4 
   5 #ifndef MC__BACKGROUND_H
   6 #define MC__BACKGROUND_H
   7 
   8 #include <sys/types.h>          /* pid_t */
   9 #include "filemanager/filegui.h"
  10 
  11 /*** typedefs(not structures) and defined constants **********************************************/
  12 
  13 enum TaskState
  14 {
  15     Task_Running,
  16     Task_Stopped
  17 };
  18 
  19 typedef struct TaskList
  20 {
  21     int fd;
  22     int to_child_fd;
  23     pid_t pid;
  24     int state;
  25     char *info;
  26     struct TaskList *next;
  27 } TaskList;
  28 
  29 /*** enums ***************************************************************************************/
  30 
  31 /*** structures declarations (and typedefs of structures)*****************************************/
  32 
  33 /*** global variables defined in .c file *********************************************************/
  34 
  35 extern TaskList *task_list;
  36 
  37 /*** declarations of public functions ************************************************************/
  38 
  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, ...);
  42 
  43 void unregister_task_running (pid_t pid, int fd);
  44 void unregister_task_with_pid (pid_t pid);
  45 
  46 gboolean background_parent_call (const gchar * event_group_name, const gchar * event_name,
  47                                  gpointer init_data, gpointer data);
  48 
  49 gboolean
  50 background_parent_call_string (const gchar * event_group_name, const gchar * event_name,
  51                                gpointer init_data, gpointer data);
  52 
  53 /*** inline functions ****************************************************************************/
  54 
  55 #endif /* MC__BACKGROUND_H */

/* [previous][next][first][last][top][bottom][index][help]  */