/***************************************************************************
* CVSID: $Id$
*
* main.c - Main dbus interface of the hald runner
*
* Copyright (C) 2006 Sjoerd Simons, <sjoerd@luon.net>
*
* Licensed under the Academic Free License version 2.1
*
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*
**************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#define DBUS_API_SUBJECT_TO_CHANGE
#include <dbus/dbus-glib-lowlevel.h>
#include <glib.h>
#include "utils.h"
#include "runner.h"
static gboolean
{
char *tmpstr;
/* First should be the device UDI */
goto malformed;
/* Then the environment array */
goto malformed;
/* Add default path for the programs we start */
/* Then argv */
goto malformed;
return TRUE;
return FALSE;
}
static void
{
run_request *r;
char *tmpstr;
r = new_run_request();
goto malformed;
/* Next a string of what should be written to stdin */
goto malformed;
/* Then an bool to indicate if we should grab stderr */
goto malformed;
/* Then an uint32 timeout for it */
goto malformed;
/* let run_request_run handle the reply */
return;
del_run_request(r);
"Malformed run request");
}
static void
{
run_request *r;
r = new_run_request();
goto malformed;
} else {
"Start request failed");
}
return ;
del_run_request(r);
"Malformed start request");
}
static void
{
char *udi;
dbus_error_init (&error);
"Malformed kill message");
return;
}
/* always successfull */
}
static DBusHandlerResult
{
return DBUS_HANDLER_RESULT_HANDLED;
return DBUS_HANDLER_RESULT_HANDLED;
return DBUS_HANDLER_RESULT_HANDLED;
run_kill_all();
/* alwasy successfull */
return DBUS_HANDLER_RESULT_HANDLED;
}
}
int
{
DBusConnection *c;
char *dbus_address;
run_init();
if (c == NULL)
goto error;
return -1;
}