/*
Authors:
Pavel Březina <pbrezina@redhat.com>
Copyright (C) 2016 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 <tevent.h>
#include "sbus/sssd_dbus_errors.h"
#include "providers/data_provider/dp_private.h"
#include "util/dlinklist.h"
struct dp_req {
const char *name;
void *request_data;
/* Active request list. */
};
const char *description,
void *ptr)
{
void *tmp;
/* If ptr is NULL we still return true since it is valid case. */
return true;
}
return false;
}
void *request_data)
{
return false;
}
return false;
}
return true;
}
{
return 0;
}
return 0;
}
struct data_provider *provider,
const char *name,
{
/* If we run out of numbers we simply overflow. */
return ENOMEM;
}
/* Attach this request to active request list. */
"New request. Flags [%#.4x].", dp_flags);
return EOK;
}
static errno_t
struct data_provider *provider,
const char *domainname,
const char *name,
enum dp_targets target,
enum dp_methods method,
void *request_data,
struct tevent_req *req,
{
/* We set output even for error to simplify code flow in the caller. */
return ENOMEM;
}
return ret;
}
/* Now the request is created. We will return it even in case of error
* so we can get better debug messages. */
if (domainname != NULL) {
return ERR_DOMAIN_NOT_FOUND;
}
}
return ret;
}
static errno_t
struct data_provider *provider,
const char *domainname,
const char *name,
enum dp_targets target,
enum dp_methods method,
void *request_data,
struct tevent_req *req,
{
goto done;
}
/* DP request is already created. We will always return it to get nice
* debug messages. */
/* Check that provided data are of correct type. */
goto done;
}
/* Process data provider flags */
ret = ERR_OFFLINE;
goto done;
}
/* File request */
goto done;
}
goto done;
}
done:
return ret;
}
struct dp_req_state {
void *output_data;
};
struct data_provider *provider,
const char *domain,
const char *name,
enum dp_targets target,
enum dp_methods method,
void *request_data,
const char **_request_name)
{
const char *request_name;
return NULL;
}
/* An error occurred before request could be created. */
if (_request_name != NULL) {
*_request_name = "Request Not Yet Created";
}
goto immediately;
}
if (_request_name != NULL) {
if (request_name == NULL) {
*_request_name = "Request Not Yet Created";
goto immediately;
}
}
goto immediately;
}
goto immediately;
}
return req;
} else {
}
return req;
}
{
/* subreq is the same as dp_req->handler_req */
return;
}
}
struct tevent_req *req,
const char *output_dtype,
void **_output_data)
{
"Receiving request data.");
} else {
/* dp_req may be NULL in case we error when filing request */
"Receiving data of prematurely interrupted request!\n");
}
return ERR_INVALID_DATA_TYPE;
}
return EOK;
}
{
/* This may occur when the handler already finished but the caller
* return here. */
return;
}
/* We will end the handler request and mark dp request as terminated. */
}
const char *domain)
{
return;
}
}
}
}
{
}
const char *domain)
{
"for domain [%s]\n", domain);
return;
}
}