Will marshall calls with a client cookie
This commit is contained in:
parent
f97c4ab165
commit
486220b828
|
@ -23,6 +23,11 @@
|
||||||
|
|
||||||
/* AppServer */
|
/* AppServer */
|
||||||
/* types */
|
/* types */
|
||||||
|
typedef void AppServerClient;
|
||||||
|
|
||||||
|
typedef unsigned int AppServerOptions;
|
||||||
|
# define ASO_REGISTER 0x1
|
||||||
|
|
||||||
typedef struct _AppServer AppServer;
|
typedef struct _AppServer AppServer;
|
||||||
|
|
||||||
|
|
||||||
|
@ -31,9 +36,10 @@ typedef struct _AppServer AppServer;
|
||||||
|
|
||||||
|
|
||||||
/* functions */
|
/* functions */
|
||||||
AppServer * appserver_new(char const * app, char const * name);
|
AppServer * appserver_new(AppServerOptions options, char const * app,
|
||||||
AppServer * appserver_new_event(char const * app, char const * name,
|
char const * name);
|
||||||
Event * event);
|
AppServer * appserver_new_event(AppServerOptions options, char const * app,
|
||||||
|
char const * name, Event * event);
|
||||||
void appserver_delete(AppServer * appserver);
|
void appserver_delete(AppServer * appserver);
|
||||||
|
|
||||||
/* accessors */
|
/* accessors */
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
/* Copyright (c) 2011-2012 Pierre Pronchery <khorben@defora.org> */
|
/* Copyright (c) 2011-2014 Pierre Pronchery <khorben@defora.org> */
|
||||||
/* This file is part of DeforaOS System libApp */
|
/* This file is part of DeforaOS System libApp */
|
||||||
/* This program is free software: you can redistribute it and/or modify
|
/* This program is free software: you can redistribute it and/or modify
|
||||||
* it under the terms of the GNU General Public License as published by
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
@ -102,7 +102,7 @@ static int _appbroker_foreach_call(char const * key, Hash * value, void * data)
|
||||||
int i;
|
int i;
|
||||||
char buf[8];
|
char buf[8];
|
||||||
char const * p;
|
char const * p;
|
||||||
char const * sep = "";
|
const char sep[] = ", ";
|
||||||
|
|
||||||
if(key == NULL || key[0] == '\0')
|
if(key == NULL || key[0] == '\0')
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -112,7 +112,7 @@ static int _appbroker_foreach_call(char const * key, Hash * value, void * data)
|
||||||
if((p = hash_get(value, "ret")) == NULL)
|
if((p = hash_get(value, "ret")) == NULL)
|
||||||
p = "void";
|
p = "void";
|
||||||
fprintf(appbroker->fp, "%s%s%s%s%s%s", p, " ", appbroker->prefix, "_",
|
fprintf(appbroker->fp, "%s%s%s%s%s%s", p, " ", appbroker->prefix, "_",
|
||||||
key, "(");
|
key, "(AppServerClient * client");
|
||||||
for(i = 0; i < APPSERVER_MAX_ARGUMENTS; i++)
|
for(i = 0; i < APPSERVER_MAX_ARGUMENTS; i++)
|
||||||
{
|
{
|
||||||
snprintf(buf, sizeof(buf), "arg%d", i + 1);
|
snprintf(buf, sizeof(buf), "arg%d", i + 1);
|
||||||
|
@ -120,7 +120,6 @@ static int _appbroker_foreach_call(char const * key, Hash * value, void * data)
|
||||||
break;
|
break;
|
||||||
if(_appbroker_foreach_call_arg(appbroker, sep, p) != 0)
|
if(_appbroker_foreach_call_arg(appbroker, sep, p) != 0)
|
||||||
return 1;
|
return 1;
|
||||||
sep = ", ";
|
|
||||||
}
|
}
|
||||||
fprintf(appbroker->fp, "%s", ");\n");
|
fprintf(appbroker->fp, "%s", ");\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user