uint32_t offered,
uint32_t *count,
struct spoolss_PrinterEnumValues **info);
-WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, const char *keyname,
- REGVAL_CTR *ctr);
/* The following definitions come from rpc_client/init_spoolss.c */
uint32 spoolss_size_printer_enum_values(PRINTER_ENUM_VALUES *p);
bool make_spoolss_buffer5(TALLOC_CTX *mem_ctx, BUFFER5 *buf5, uint32 len, uint16 *src);
-bool make_spoolss_q_enumprinterdataex(SPOOL_Q_ENUMPRINTERDATAEX *q_u,
- const POLICY_HND *hnd, const char *key,
- uint32 size);
bool spoolss_io_q_enumprinterdataex(const char *desc, SPOOL_Q_ENUMPRINTERDATAEX *q_u, prs_struct *ps, int depth);
bool spoolss_io_r_enumprinterdataex(const char *desc, SPOOL_R_ENUMPRINTERDATAEX *r_u, prs_struct *ps, int depth);
return werror;
}
-
-
-/*********************************************************************
- Decode various spoolss rpc's and info levels
- ********************************************************************/
-
-/**********************************************************************
-**********************************************************************/
-
-WERROR rpccli_spoolss_enumprinterdataex(struct rpc_pipe_client *cli, TALLOC_CTX *mem_ctx,
- POLICY_HND *hnd, const char *keyname,
- REGVAL_CTR *ctr)
-{
- prs_struct qbuf, rbuf;
- SPOOL_Q_ENUMPRINTERDATAEX in;
- SPOOL_R_ENUMPRINTERDATAEX out;
- int i;
- uint32 offered;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- offered = 0;
- make_spoolss_q_enumprinterdataex( &in, hnd, keyname, offered );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPRINTERDATAEX,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_enumprinterdataex,
- spoolss_io_r_enumprinterdataex,
- WERR_GENERAL_FAILURE );
-
- if ( W_ERROR_EQUAL( out.status, WERR_MORE_DATA ) ) {
- offered = out.needed;
-
- ZERO_STRUCT(in);
- ZERO_STRUCT(out);
-
- make_spoolss_q_enumprinterdataex( &in, hnd, keyname, offered );
-
- CLI_DO_RPC_WERR( cli, mem_ctx, &syntax_spoolss, SPOOLSS_ENUMPRINTERDATAEX,
- in, out,
- qbuf, rbuf,
- spoolss_io_q_enumprinterdataex,
- spoolss_io_r_enumprinterdataex,
- WERR_GENERAL_FAILURE );
- }
-
- if (!W_ERROR_IS_OK(out.status))
- return out.status;
-
- for (i = 0; i < out.returned; i++) {
- PRINTER_ENUM_VALUES *v = &out.ctr.values[i];
- fstring name;
-
- rpcstr_pull(name, v->valuename.buffer, sizeof(name), -1,
- STR_TERMINATE);
- regval_ctr_addvalue(ctr, name, v->type, (const char *)v->data, v->data_len);
- }
-
- return out.status;
-}
-
-/** @} **/