2 Unix SMB/CIFS implementation.
3 Main metadata server / Spotlight routines
5 Copyright (C) Ralph Boehme 2015
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program. If not, see <http://www.gnu.org/licenses/>.
21 #ifndef _MDSSVC_MARSHALLING_H
22 #define _MDSSVC_MARSHALLING_H
25 #include "libcli/util/ntstatus.h"
26 #include "lib/util/data_blob.h"
27 #include "librpc/gen_ndr/mdssvc.h"
29 #define MAX_SL_FRAGMENT_SIZE 0xFFFFF
30 #define MAX_MDSCMD_SIZE 0xFFFFFF
32 /* Can be ored and used as flags */
33 #define SL_ENC_LITTLE_ENDIAN 1
34 #define SL_ENC_BIG_ENDIAN 2
35 #define SL_ENC_UTF_16 4
37 typedef DALLOC_CTX sl_array_t
; /* an array of elements */
38 typedef DALLOC_CTX sl_dict_t
; /* an array of key/value elements */
39 typedef DALLOC_CTX sl_filemeta_t
; /* contains one sl_array_t */
40 typedef int sl_nil_t
; /* a nil element */
41 typedef bool sl_bool_t
;
42 typedef struct timeval sl_time_t
;
50 } sl_cnids_t
; /* an array of CNIDs */
52 /******************************************************************************
53 * Function declarations
54 ******************************************************************************/
56 extern NTSTATUS
sl_pack_alloc(TALLOC_CTX
*mem_ctx
,
58 struct mdssvc_blob
*b
,
59 size_t max_fragment_size
);
61 extern bool sl_unpack(DALLOC_CTX
*query
, const char *buf
, size_t bufsize
);