sssd_dbus_signals.c revision ae7247551b78a05a5397d3c790afad7ef51b0d9d
/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2015 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 <talloc.h>
#include <dhash.h>
#include "sbus/sssd_dbus.h"
#include "sbus/sssd_dbus_private.h"
{
return 0;
}
static struct sbus_incoming_signal *
{
struct sbus_incoming_signal *signal;
return NULL;
}
return signal;
}
struct sbus_incoming_signal_data {
void *handler_data;
};
{
}
static errno_t
const char *iface,
const char *signal,
void *handler_data)
{
struct sbus_incoming_signal_data *data;
bool has_key;
int hret;
return ENOMEM;
}
goto done;
}
if (has_key) {
goto done;
}
goto done;
}
if (hret != HASH_SUCCESS) {
goto done;
}
done:
return ret;
}
static struct sbus_incoming_signal_data *
const char *iface,
const char *signal)
{
struct sbus_incoming_signal_data *data;
int hret;
return NULL;
}
if (hret == HASH_ERROR_KEY_NOT_FOUND) {
goto done;
} else if (hret != HASH_SUCCESS) {
"Unable to search hash table: hret=%d\n", hret);
goto done;
}
done:
return data;
}
const char *iface,
const char *signal,
void *handler_data)
{
const char *rule;
return ENOMEM;
}
goto done;
}
goto done;
}
if (dbus_error_is_set(&error)) {
goto done;
}
done:
return ret;
}
static void
void *handler_data)
{
struct tevent_req *req;
struct sbus_connection *conn;
struct sbus_incoming_signal *signal;
const char *sender;
int type;
if (type != DBUS_MESSAGE_TYPE_SIGNAL) {
/* We ignore other types here. */
}
/* we have a valid handler, create D-Bus request */
return DBUS_HANDLER_RESULT_NEED_MEMORY;
}
/* now get the sender ID */
return DBUS_HANDLER_RESULT_NEED_MEMORY;
}
return DBUS_HANDLER_RESULT_HANDLED;
}
static void
{
struct sbus_incoming_signal_data *signal_data;
struct sbus_incoming_signal *signal;
goto done;
}
if (signal_data == NULL) {
goto done;
}
done:
}