/*
Authors:
Stef Walter <stefw@redhat.com>
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2014 Red Hat
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 "config.h"
#include "sbus/sssd_dbus.h"
#include "sbus/sssd_dbus_meta.h"
#include "sbus/sssd_dbus_private.h"
#include "sbus/sssd_dbus_invokers.h"
const char *__sig; \
goto label; \
} \
} while (0)
struct iface_properties {
};
struct sbus_vtable *
sbus_properties_vtable(void)
{
/* Properties.Get */
{ "interface_name", "s" },
{ "property_name", "s" },
{ NULL, }
};
{ "value", "v" },
{ NULL, }
};
/* Properties.Set */
{ "interface_name", "s" },
{ "property_name", "s" },
{ "value", "v" },
{ NULL, }
};
/* Properties.GetAll */
{ "interface_name", "s" },
{ NULL, }
};
{ "props", "a{sv}" },
{ NULL, }
};
{
"Get", /* name */
NULL, /* no invoker */
},
{
"Set", /* name */
NULL, /* no out_args */
NULL, /* no invoker */
},
{
"GetAll", /* name */
NULL, /* no invoker */
},
{ NULL, }
};
"org.freedesktop.DBus.Properties", /* name */
NULL, /* no signals */
NULL, /* no properties */
NULL, /* no GetAll invoker */
};
{ &iface_meta, 0 },
};
}
static struct sbus_request *
struct sbus_interface *iface)
{
/* Create new sbus_request to so it contain given interface. The
* old sbus_request talloc context will be attached to this new one
* so it is freed together. */
if (sbus_subreq == NULL) {
return NULL;
}
return sbus_subreq;
}
{
const char *interface_name;
const char *property_name;
bool bret;
if (!bret) {
/* request was handled */
return EOK;
}
/* find interface */
"Unknown interface");
goto fail;
}
/* find property handler */
"Unknown property");
goto fail;
}
"Property is not readable");
goto fail;
}
if (handler_fn == NULL) {
"Getter is not implemented");
goto fail;
}
if (sbus_subreq == NULL) {
goto fail;
}
return EOK;
fail:
}
/*
* We don't implement any handlers for setters yet. This code is for future
* use and it is likely it will need some changes.
*/
{
const char *interface_name;
const char *property_name;
const char *variant_sig;
/* get interface and property */
/* find interface */
"Unknown interface");
goto fail;
}
/* find property handler */
"Unknown property");
goto fail;
}
"Property is not writable");
goto fail;
}
if (handler_fn == NULL) {
"Setter is not implemented");
goto fail;
}
/* check variant type */
"Invalid data type for property");
goto fail;
}
if (sbus_subreq == NULL) {
goto fail;
}
return EOK;
fail:
}
{
const char *interface_name;
bool bret;
if (!bret) {
/* request was handled */
return EOK;
}
/* find interface */
"Unknown interface");
goto fail;
}
if (sbus_subreq == NULL) {
goto fail;
}
"using the default one\n");
} else {
}
return EOK;
fail:
}