sssd_dbus_introspect.c revision dff909d473f43a6bd0f0286fa2d279c0ebe945c6
/*
Authors:
Jakub Hrozek <jhrozek@redhat.com>
Copyright (C) 2014 Red Hat
SBUS: Interface introspection
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 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, see <http://www.gnu.org/licenses/>.
*/
#include "sbus/sssd_dbus.h"
#include "sbus/sssd_dbus_private.h"
#include "sbus/sssd_dbus_meta.h"
static const struct sbus_arg_meta introspect_method_arg_out[] = {
{ "data", "s" },
{ NULL, }
};
const struct sbus_method_meta introspect_method =
#define SSS_INTROSPECT_DOCTYPE \
"<!DOCTYPE node PUBLIC \"-//freedesktop//DTD D-BUS Object Introspection 1.0//EN\"\n" \
#define SSS_INTROSPECT_INTERFACE_INTROSPECTABLE \
" <interface name=\"org.freedesktop.DBus.Introspectable\">\n" \
" <method name=\"Introspect\">\n" \
" <arg name=\"data\" type=\"s\" direction=\"out\"/>\n" \
" </method>\n" \
" </interface>\n"
struct introspect_ctx {
FILE *f;
char *buf;
const struct sbus_interface_meta *iface;
};
{
return 0;
}
{
return ENOMEM;
}
return EOK;
}
const struct sbus_arg_meta *a,
const char *direction)
{
" <arg type=\"%s\" name=\"%s\"",
if (direction) {
}
return EOK;
}
const struct sbus_method_meta *m)
{
int i;
continue;
}
}
}
continue;
}
}
}
return EOK;
}
{
int i;
/* An interface with no methods */
return EOK;
}
continue;
}
}
return EOK;
}
const struct sbus_signal_meta *s)
{
int i;
continue;
}
}
}
return EOK;
}
{
int i;
/* An interface with no signals */
return EOK;
}
continue;
}
}
return EOK;
}
const struct sbus_property_meta *p)
{
return EOK;
}
{
int i;
/* An interface with no properties */
return EOK;
}
continue;
}
}
return EOK;
}
{
return EOK;
}
const struct sbus_interface_meta *iface)
{
struct introspect_ctx *ictx;
return NULL;
}
goto done;
}
goto done;
}
goto done;
}
"introspect_add_properties failed: %d\n", ret);
goto done;
}
goto done;
}
done:
return buf_out;
}
{
char *xml;
const struct sbus_interface_meta *iface;
struct sbus_introspect_ctx *ictx;
}
"Failed to generate introspection data\n");
}
}