/*
Authors:
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 <string.h>
#include <dhash.h>
#include "lib/sifp/sss_sifp.h"
#include "lib/sifp/sss_sifp_private.h"
goto done; \
} \
} while (0)
do { \
\
goto done; \
} \
\
\
ret = SSS_SIFP_OK; \
} while (0)
do { \
unsigned int i; \
\
if (attr->num_values == 0) { \
ret = SSS_SIFP_OK; \
goto done; \
} \
\
goto done; \
} \
\
for (i = 0; i < attr->num_values; i++) { \
\
goto done; \
} \
} \
\
ret = SSS_SIFP_OK; \
} while (0)
static unsigned int
{
unsigned int size;
return 0;
}
size = 0;
do {
size++;
} while (dbus_message_iter_next(&array_iter));
return size;
}
void *pvt)
{
int i;
return;
}
}
}
static sss_sifp_error
{
unsigned int i;
unsigned int num_values;
int hret;
/* get the key */
goto done;
}
if (!dbus_message_iter_next(&dict_iter)) {
goto done;
}
/* now read the value */
switch (dbus_message_iter_get_arg_type(&dict_iter)) {
case DBUS_TYPE_STRING:
goto done;
}
goto done;
}
ret = SSS_SIFP_OK;
break;
case DBUS_TYPE_ARRAY:
if (num_values == 0) {
ret = SSS_SIFP_OK;
goto done;
}
!= DBUS_TYPE_STRING) {
goto done;
}
goto done;
}
for (i = 0; i < num_values; i++) {
goto done;
}
}
ret = SSS_SIFP_OK;
break;
default:
break;
}
if (hret == HASH_ERROR_NO_MEMORY) {
} else if (hret != HASH_SUCCESS) {
}
done:
}
if (ret != SSS_SIFP_OK) {
}
}
}
return ret;
}
static sss_sifp_error
{
switch (dbus_message_iter_get_arg_type(iter)) {
case DBUS_TYPE_BOOLEAN:
break;
case DBUS_TYPE_INT16:
break;
case DBUS_TYPE_UINT16:
break;
case DBUS_TYPE_INT32:
break;
case DBUS_TYPE_UINT32:
break;
case DBUS_TYPE_INT64:
break;
case DBUS_TYPE_UINT64:
break;
case DBUS_TYPE_STRING:
case DBUS_TYPE_OBJECT_PATH: ;
goto done;
}
goto done;
}
ret = SSS_SIFP_OK;
break;
default:
break;
}
done:
return ret;
}
static sss_sifp_error
{
int hret;
switch (dbus_message_iter_get_element_type(iter)) {
case DBUS_TYPE_BOOLEAN:
break;
case DBUS_TYPE_INT16:
break;
case DBUS_TYPE_UINT16:
break;
case DBUS_TYPE_INT32:
break;
case DBUS_TYPE_UINT32:
break;
case DBUS_TYPE_INT64:
break;
case DBUS_TYPE_UINT64:
break;
case DBUS_TYPE_STRING:
case DBUS_TYPE_OBJECT_PATH: ;
const char *val;
unsigned int i;
if (attr->num_values == 0) {
ret = SSS_SIFP_OK;
goto done;
}
goto done;
}
for (i = 0; i < attr->num_values; i++) {
goto done;
}
if (!dbus_message_iter_next(&array_iter)
goto done;
}
}
ret = SSS_SIFP_OK;
break;
case DBUS_TYPE_DICT_ENTRY:
if (attr->num_values == 0) {
ret = SSS_SIFP_OK;
goto done;
}
if (hret != HASH_SUCCESS) {
goto done;
}
for (i = 0; i < attr->num_values; i++) {
if (ret != SSS_SIFP_OK) {
goto done;
}
if (!dbus_message_iter_next(&array_iter)
goto done;
}
}
ret = SSS_SIFP_OK;
break;
default:
break;
}
done:
if (ret != SSS_SIFP_OK) {
for (unsigned int i = 0;
i++) {
}
}
}
return ret;
}
static sss_sifp_error
{
int type;
if (dbus_type_is_basic(type)) {
} else {
/* container types */
switch (type) {
/* case DBUS_TYPE_DICT_ENTRY may only be contained within an array
* in variant */
case DBUS_TYPE_ARRAY:
break;
default:
break;
}
}
done:
return ret;
}
/**
* DBusMessage format:
* variant:value
*
* Iterator has to point to the variant but not inside the variant.
*/
static sss_sifp_error
const char *name,
{
goto done;
}
goto done;
}
if (ret != SSS_SIFP_OK) {
}
done:
return ret;
}
/**
* DBusMessage format:
* variant:value
*/
const char *name,
sss_sifp_attr ***_attrs)
{
goto done;
}
if (ret != SSS_SIFP_OK) {
goto done;
}
ret = SSS_SIFP_OK;
done:
if (ret != SSS_SIFP_OK) {
}
return ret;
}
/**
* DBusMessage format:
* array of dict_entry(string:attr_name, variant:value)
*/
sss_sifp_attr ***_attrs)
{
unsigned int num_values;
unsigned int i;
goto done;
}
goto done;
}
for (i = 0; i < num_values; i++) {
/* get the key */
if (!dbus_message_iter_next(&dict_iter)) {
goto done;
}
/* now read the value */
if (ret != SSS_SIFP_OK) {
goto done;
}
}
ret = SSS_SIFP_OK;
done:
if (ret != SSS_SIFP_OK) {
}
return ret;
}
char **_object_path)
{
if (!bret) {
goto done;
}
if (object_path == NULL) {
goto done;
}
ret = SSS_SIFP_OK;
done:
return ret;
}
char ***_object_paths)
{
int num_paths;
int i;
&dbus_paths, &num_paths,
if (!bret) {
goto done;
}
if (object_paths == NULL) {
goto done;
}
for (i = 0; i < num_paths; i++) {
if (object_paths[i] == NULL) {
goto done;
}
}
ret = SSS_SIFP_OK;
done:
}
return ret;
}