1*2912Sartem /*************************************************************************** 2*2912Sartem * CVSID: $Id$ 3*2912Sartem * 4*2912Sartem * runner.h - Process running interface 5*2912Sartem * 6*2912Sartem * Copyright (C) 2006 Sjoerd Simons, <sjoerd@luon.net> 7*2912Sartem * 8*2912Sartem * Licensed under the Academic Free License version 2.1 9*2912Sartem * 10*2912Sartem * This program is free software; you can redistribute it and/or modify 11*2912Sartem * it under the terms of the GNU General Public License as published by 12*2912Sartem * the Free Software Foundation; either version 2 of the License, or 13*2912Sartem * (at your option) any later version. 14*2912Sartem * 15*2912Sartem * This program is distributed in the hope that it will be useful, 16*2912Sartem * but WITHOUT ANY WARRANTY; without even the implied warranty of 17*2912Sartem * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 18*2912Sartem * GNU General Public License for more details. 19*2912Sartem * 20*2912Sartem * You should have received a copy of the GNU General Public License 21*2912Sartem * along with this program; if not, write to the Free Software 22*2912Sartem * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 23*2912Sartem * 24*2912Sartem **************************************************************************/ 25*2912Sartem #ifndef RUNNER_H 26*2912Sartem #define RUNNER_H 27*2912Sartem 28*2912Sartem #define DBUS_API_SUBJECT_TO_CHANGE 29*2912Sartem #include <dbus/dbus-glib-lowlevel.h> 30*2912Sartem 31*2912Sartem #include <glib.h> 32*2912Sartem 33*2912Sartem typedef struct { 34*2912Sartem gchar *udi; 35*2912Sartem gchar **environment; 36*2912Sartem gchar **argv; 37*2912Sartem gchar *input; 38*2912Sartem gboolean error_on_stderr; 39*2912Sartem guint32 timeout; 40*2912Sartem } run_request; 41*2912Sartem 42*2912Sartem run_request *new_run_request(void); 43*2912Sartem void del_run_request(run_request *r); 44*2912Sartem 45*2912Sartem /* Run the given request and reply it's result on msg */ 46*2912Sartem gboolean run_request_run(run_request *r, DBusConnection *con, DBusMessage *msg, GPid *out_pid); 47*2912Sartem 48*2912Sartem /* Kill all running request for a udi */ 49*2912Sartem void run_kill_udi(gchar *udi); 50*2912Sartem 51*2912Sartem /* Kill all running request*/ 52*2912Sartem void run_kill_all(); 53*2912Sartem 54*2912Sartem /* initialise the actual runner data */ 55*2912Sartem void run_init(); 56*2912Sartem 57*2912Sartem #endif /* RUNNER_H */ 58