libndr: add some stubs for push functions
[metze/samba/wb-ndr.git] / source / lib / ndr / ndr_push.c
1 /*
2    NDR library used by pidl bindings
3
4    Copyright (C) Stefan Metzmacher 2007
5
6      ** NOTE! The following LGPL license applies to the ndr
7      ** library. This does NOT imply that all of Samba is released
8      ** under the LGPL
9
10    This library is free software; you can redistribute it and/or
11    modify it under the terms of the GNU Lesser General Public
12    License as published by the Free Software Foundation; either
13    version 3 of the License, or (at your option) any later version.
14
15    This library is distributed in the hope that it will be useful,
16    but WITHOUT ANY WARRANTY; without even the implied warranty of
17    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
18    Lesser General Public License for more details.
19
20    You should have received a copy of the GNU Lesser General Public
21    License along with this library; if not, see <http://www.gnu.org/licenses/>.
22 */
23
24 #include "includes.h" /* TODO: remove this! */
25
26 #include "libndr.h"
27
28 struct ndr_push *ndr_push_init_ctx(TALLOC_CTX *mem_ctx)
29 {
30         return talloc_zero(mem_ctx, struct ndr_push);
31 }
32
33 DATA_BLOB ndr_push_blob(struct ndr_push *push)
34 {
35         return data_blob_const(push->data, push->offset);
36 }
37
38 enum ndr_err_code ndr_push_zero(struct ndr_push *push, size_t len)
39 {
40         return NDR_ERR_FOOBAR;
41 }
42
43 enum ndr_err_code ndr_push_align(struct ndr_push *push, size_t len)
44 {
45         return NDR_ERR_FOOBAR;
46 }
47
48 enum ndr_err_code ndr_push_bytes(struct ndr_push *push, const uint8_t *data, size_t len)
49 {
50         return NDR_ERR_FOOBAR;
51 }