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/fileopctx.h"
  10 /*** typedefs(not structures) and defined constants **********************************************/
  11 
  12 enum TaskState
  13 {
  14     Task_Running,
  15     Task_Stopped
  16 };
  17 
  18 typedef struct TaskList
  19 {
  20     int fd;
  21     int to_child_fd;
  22     pid_t pid;
  23     int state;
  24     char *info;
  25     struct TaskList *next;
  26 } TaskList;
  27 
  28 /*** enums ***************************************************************************************/
  29 
  30 /*** structures declarations (and typedefs of structures)*****************************************/
  31 
  32 /*** global variables defined in .c file *********************************************************/
  33 
  34 extern TaskList *task_list;
  35 
  36 /*** declarations of public functions ************************************************************/
  37 
  38 int do_background (file_op_context_t * ctx, char *info);
  39 int parent_call (void *routine, file_op_context_t * ctx, int argc, ...);
  40 char *parent_call_string (void *routine, int argc, ...);
  41 
  42 void unregister_task_running (pid_t pid, int fd);
  43 void unregister_task_with_pid (pid_t pid);
  44 
  45 gboolean background_parent_call (const gchar * event_group_name, const gchar * event_name,
  46                                  gpointer init_data, gpointer data);
  47 
  48 gboolean
  49 background_parent_call_string (const gchar * event_group_name, const gchar * event_name,
  50                                gpointer init_data, gpointer data);
  51 
  52 /*** inline functions ****************************************************************************/
  53 
  54 #endif /* MC__BACKGROUND_H */

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