2 * Unix SMB/CIFS implementation.
4 * Window Search Service
6 * Copyright (c) Noel Power
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
21 #ifndef __LIBRPC_WSP_UTIL_H__
22 #define __LIBRPC_WSP_UTIL_H__
24 #include "librpc/gen_ndr/misc.h"
26 struct safearraybound
;
27 struct wsp_cfullpropspec
;
28 struct wsp_cbasestoragevariant
;
29 struct wsp_crestriction
;
31 struct full_propset_info
{
36 bool in_inverted_index
;
38 bool can_col_be_indexed
;
42 struct full_guid_propset
{
44 const struct full_propset_info
*prop_info
;
47 extern const struct full_guid_propset full_propertyset
[];
49 char *prop_from_fullprop(TALLOC_CTX
*ctx
, struct wsp_cfullpropspec
*fullprop
);
50 const struct full_propset_info
*get_prop_info(const char *prop_name
);
51 const struct full_propset_info
*get_propset_info_with_guid(
52 const char *prop_name
,
54 const char * get_vtype_name(uint32_t type
);
55 bool is_variable_size(uint16_t vtype
);
56 const char *get_store_status(uint8_t status_byte
);
58 bool is_operator(struct wsp_crestriction
*restriction
);
59 const char *op_as_string(struct wsp_crestriction
*restriction
);
60 const char *genmeth_to_string(uint32_t genmethod
);
61 const char *variant_as_string(TALLOC_CTX
*ctx
,
62 struct wsp_cbasestoragevariant
*value
,
64 void set_variant_lpwstr(TALLOC_CTX
*ctx
,
65 struct wsp_cbasestoragevariant
*vvalue
,
66 const char *string_val
);
67 void set_variant_i4(TALLOC_CTX
*ctx
,
68 struct wsp_cbasestoragevariant
*vvalue
,
70 void set_variant_vt_bool(TALLOC_CTX
*ctx
,
71 struct wsp_cbasestoragevariant
*variant
,
73 void set_variant_bstr(TALLOC_CTX
*ctx
, struct wsp_cbasestoragevariant
*variant
,
74 const char *string_val
);
75 void set_variant_lpwstr_vector(TALLOC_CTX
*ctx
,
76 struct wsp_cbasestoragevariant
*variant
,
77 const char **string_vals
, uint32_t elems
);
78 void set_variant_array_bstr(TALLOC_CTX
*ctx
,
79 struct wsp_cbasestoragevariant
*variant
,
80 const char **string_vals
, uint16_t elems
);
81 void set_variant_i4_vector(TALLOC_CTX
*ctx
,
82 struct wsp_cbasestoragevariant
*variant
,
83 int32_t* ivector
, uint32_t elems
);
84 void set_variant_array_i4(TALLOC_CTX
*ctx
,
85 struct wsp_cbasestoragevariant
*variant
,
86 int32_t *vals
, uint16_t elems
);
88 struct wsp_cfullpropspec
*get_full_prop(struct wsp_crestriction
*restriction
);
89 #endif /* __LIBRPC_WSP_UTIL_H__ */