selftest/knownfail: move some parts to expectedfail.d/ntlm-auth
[Samba.git] / source3 / rpc_client / wsp_cli.h
blob3159bd29e5bbef020022c7fb304b97c9d3d8ca4b
1 /*
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 __LIBCLI_WSP_WSP_CLI
22 #define __LIBCLI_WSP_WSP_CLI
24 #include "libcli/wsp/wsp_aqs.h"
26 enum search_kind {
27 CALENDAR,
28 COMMUNICATION,
29 CONTACT,
30 DOCUMENT,
31 EMAIL,
32 FEED,
33 FOLDER,
34 GAME,
35 INSTANTMESSAGE,
36 JOURNAL,
37 LINK,
38 MOVIE,
39 MUSIC,
40 NOTE,
41 PICTURE,
42 PROGRAM,
43 RECORDEDTV,
44 SEARCHFOLDER,
45 TASK,
46 VIDEO,
47 WEBHISTORY,
48 NONE,
49 UNKNOWN,
52 enum search_kind get_kind(const char* kind_str);
54 struct wsp_cpmcreatequeryin;
55 struct wsp_cpmsetbindingsin;
56 struct wsp_cpmgetrowsin;
57 struct dcerpc_binding_handle;
59 bool init_connectin_request(TALLOC_CTX *ctx,
60 struct wsp_request* request,
61 const char* clientmachine,
62 const char* clientuser,
63 const char* server);
65 bool create_querysearch_request(TALLOC_CTX * ctx,
66 struct wsp_request* request,
67 t_select_stmt *sql);
69 bool create_setbindings_request(TALLOC_CTX * ctx,
70 struct wsp_request* request,
71 t_select_stmt *sql,
72 uint32_t cursor,
73 bool is_64bit);
75 void create_seekat_getrows_request(TALLOC_CTX * ctx,
76 struct wsp_request* request,
77 uint32_t cursor,
78 uint32_t bookmark,
79 uint32_t skip,
80 uint32_t rows,
81 uint32_t cbreserved,
82 uint32_t ulclientbase,
83 uint32_t cbrowwidth,
84 uint32_t fbwdfetch);
86 enum ndr_err_code extract_rowsarray(TALLOC_CTX * ctx,
87 DATA_BLOB *rows_buf,
88 bool is_64bit,
89 struct wsp_cpmsetbindingsin *bindingsin,
90 uint32_t cbreserved,
91 uint64_t baseaddress,
92 uint32_t rows,
93 struct wsp_cbasestoragevariant **rowsarray);
95 struct wsp_client_ctx;
96 struct cli_credentials;
98 NTSTATUS wsp_server_connect(TALLOC_CTX *mem_ctx,
99 const char *servername,
100 struct tevent_context *ev_ctx,
101 struct loadparm_context *lp_ctx,
102 struct cli_credentials *credential,
103 struct cli_state *cli,
104 struct wsp_client_ctx **ctx);
106 /* simple sync api */
107 NTSTATUS wsp_request_response(TALLOC_CTX* ctx,
108 struct wsp_client_ctx *wsp_ctx,
109 struct wsp_request* request,
110 struct wsp_response *response,
111 DATA_BLOB *unread);
113 struct dcerpc_binding_handle* get_wsp_pipe(struct wsp_client_ctx *ctx);
114 #endif