summaryrefslogtreecommitdiff
path: root/source3/include/wbc_async.h
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2009-02-09 16:51:46 +0100
committerJelmer Vernooij <jelmer@samba.org>2009-02-09 16:51:46 +0100
commit9b366d703210b493aa1389bbdd288a2b00958766 (patch)
tree12acaf89af2c6bd2610018d267e2d8030d9b4bd6 /source3/include/wbc_async.h
parent6d139ca4680abcbda5110f2f0886aa038ff62088 (diff)
parent1dadf17be847e3f93b72988bcc7e8620a8d5908c (diff)
downloadsamba-9b366d703210b493aa1389bbdd288a2b00958766.tar.gz
samba-9b366d703210b493aa1389bbdd288a2b00958766.tar.bz2
samba-9b366d703210b493aa1389bbdd288a2b00958766.zip
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source3/include/wbc_async.h')
-rw-r--r--source3/include/wbc_async.h68
1 files changed, 68 insertions, 0 deletions
diff --git a/source3/include/wbc_async.h b/source3/include/wbc_async.h
new file mode 100644
index 0000000000..7a8768029a
--- /dev/null
+++ b/source3/include/wbc_async.h
@@ -0,0 +1,68 @@
+/*
+ Unix SMB/CIFS implementation.
+ Headers for the async winbind client library
+ Copyright (C) Kai Blin 2009
+
+ This program is free software; you can redistribute it and/or modify
+ 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/>.
+*/
+
+#ifndef _WBC_ASYNC_H_
+#define _WBC_ASYNC_H_
+
+#include "nsswitch/libwbclient/wbclient.h"
+
+struct wb_context {
+ struct async_req_queue *queue;
+ int fd;
+ bool is_priv;
+};
+
+struct async_req *wb_trans_send(TALLOC_CTX *mem_ctx, struct tevent_context *ev,
+ struct wb_context *wb_ctx, bool need_priv,
+ const struct winbindd_request *wb_req);
+wbcErr wb_trans_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presponse);
+struct wb_context *wb_context_init(TALLOC_CTX *mem_ctx);
+
+/* Definitions from wb_reqtrans.c */
+bool async_req_is_wbcerr(struct async_req *req, wbcErr *pwbc_err);
+wbcErr map_wbc_err_from_errno(int error);
+wbcErr async_req_simple_recv_wbcerr(struct async_req *req);
+
+struct async_req *wb_req_read_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev,
+ int fd, size_t max_extra_data);
+
+wbcErr wb_req_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_request **preq);
+
+struct async_req *wb_req_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd,
+ struct winbindd_request *wb_req);
+
+wbcErr wb_req_write_recv(struct async_req *req);
+
+struct async_req *wb_resp_read_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd);
+
+wbcErr wb_resp_read_recv(struct async_req *req, TALLOC_CTX *mem_ctx,
+ struct winbindd_response **presp);
+
+struct async_req *wb_resp_write_send(TALLOC_CTX *mem_ctx,
+ struct tevent_context *ev, int fd,
+ struct winbindd_response *wb_resp);
+
+wbcErr wb_resp_write_recv(struct async_req *req);
+
+#endif /*_WBC_ASYNC_H_*/