s3-spoolss: add rpccli_spoolss_getprinterdriver convenience wrapper.
[ira/wip.git] / source3 / include / proto.h
index c40b4b6e730504c2994f78c5be7f5697c2be0d62..7f4907cd9674df9702646f8e672d236d5db19bf6 100644 (file)
@@ -466,6 +466,7 @@ void debug_message(struct messaging_context *msg_ctx, void *private_data, uint32
 void debug_init(void);
 void debug_register_msgs(struct messaging_context *msg_ctx);
 void setup_logging(const char *pname, bool interactive);
+void setup_logging_stdout( void );
 void debug_set_logfile(const char *name);
 bool reopen_logs( void );
 void force_check_log_size( void );
@@ -1418,6 +1419,16 @@ struct tevent_req *getaddrinfo_send(TALLOC_CTX *mem_ctx,
                                    const char *service,
                                    const struct addrinfo *hints);
 int getaddrinfo_recv(struct tevent_req *req, struct addrinfo **res);
+struct tevent_req *tstream_read_packet_send(TALLOC_CTX *mem_ctx,
+                                           struct tevent_context *ev,
+                                           struct tstream_context *stream,
+                                           size_t initial,
+                                           ssize_t (*more)(uint8_t *buf,
+                                                           size_t buflen,
+                                                           void *private_data),
+                                           void *private_data);
+ssize_t tstream_read_packet_recv(struct tevent_req *req, TALLOC_CTX *mem_ctx,
+                                uint8_t **pbuf, int *perrno);
 
 /* The following definitions come from lib/util_str.c  */
 
@@ -2249,7 +2260,7 @@ bool cli_dfs_get_referral(TALLOC_CTX *ctx,
                        const char *path,
                        CLIENT_DFS_REFERRAL**refs,
                        size_t *num_refs,
-                       uint16 *consumed);
+                       size_t *consumed);
 bool cli_resolve_path(TALLOC_CTX *ctx,
                        const char *mountpt,
                        const struct user_auth_info *dfs_auth_info,
@@ -4585,7 +4596,7 @@ bool pdb_uid_to_sid(uid_t uid, DOM_SID *sid);
 bool pdb_gid_to_sid(gid_t gid, DOM_SID *sid);
 bool pdb_sid_to_id(const DOM_SID *sid, union unid_t *id,
                   enum lsa_SidType *type);
-bool pdb_rid_algorithm(void);
+uint32_t pdb_capabilities(void);
 bool pdb_new_rid(uint32 *rid);
 bool initialize_password_db(bool reload, struct event_context *event_ctx);
 struct pdb_search *pdb_search_init(TALLOC_CTX *mem_ctx,
@@ -5422,6 +5433,13 @@ WERROR rpccli_spoolss_openprinter_ex(struct rpc_pipe_client *cli,
                                     const char *printername,
                                     uint32_t access_desired,
                                     struct policy_handle *handle);
+WERROR rpccli_spoolss_getprinterdriver(struct rpc_pipe_client *cli,
+                                      TALLOC_CTX *mem_ctx,
+                                      struct policy_handle *handle,
+                                      const char *architecture,
+                                      uint32_t level,
+                                      uint32_t offered,
+                                      union spoolss_DriverInfo *info);
 WERROR rpccli_spoolss_getprinterdriver2(struct rpc_pipe_client *cli,
                                        TALLOC_CTX *mem_ctx,
                                        struct policy_handle *handle,
@@ -5561,32 +5579,6 @@ NTSTATUS serverinfo_to_SamInfo3(struct auth_serversupplied_info *server_info,
                                uint8_t *pipe_session_key,
                                size_t pipe_session_key_len,
                                struct netr_SamInfo3 *sam3);
-void init_netr_IdentityInfo(struct netr_IdentityInfo *r,
-                           const char *domain_name,
-                           uint32_t parameter_control,
-                           uint32_t logon_id_low,
-                           uint32_t logon_id_high,
-                           const char *account_name,
-                           const char *workstation);
-void init_netr_NetworkInfo(struct netr_NetworkInfo *r,
-                          const char *domain_name,
-                          uint32_t parameter_control,
-                          uint32_t logon_id_low,
-                          uint32_t logon_id_high,
-                          const char *account_name,
-                          const char *workstation,
-                          uint8_t challenge[8],
-                          struct netr_ChallengeResponse nt,
-                          struct netr_ChallengeResponse lm);
-void init_netr_PasswordInfo(struct netr_PasswordInfo *r,
-                           const char *domain_name,
-                           uint32_t parameter_control,
-                           uint32_t logon_id_low,
-                           uint32_t logon_id_high,
-                           const char *account_name,
-                           const char *workstation,
-                           struct samr_Password lmpassword,
-                           struct samr_Password ntpassword);
 void init_netr_CryptPassword(const char *pwd,
                             unsigned char session_key[16],
                             struct netr_CryptPassword *pwd_buf);
@@ -6250,7 +6242,7 @@ int file_set_dosmode(connection_struct *conn, const char *fname,
                     const char *parent_dir,
                     bool newfile);
 int file_ntimes(connection_struct *conn, const char *fname,
-               struct smb_file_time *ft);
+               struct smb_file_time *ft, const SMB_STRUCT_STAT *psbuf);
 bool set_sticky_write_time_path(connection_struct *conn, const char *fname,
                         struct file_id fileid, const struct timespec mtime);
 bool set_sticky_write_time_fsp(struct files_struct *fsp, const struct timespec mtime);
@@ -6294,7 +6286,8 @@ bool can_delete_file_in_directory(connection_struct *conn,
 bool can_access_file_data(connection_struct *conn,
                          const struct smb_filename *smb_fname,
                          uint32 access_mask);
-bool can_write_to_file(connection_struct *conn, const char *fname, const SMB_STRUCT_STAT *psbuf);
+bool can_write_to_file(connection_struct *conn,
+                      const struct smb_filename *smb_fname);
 bool directory_has_default_acl(connection_struct *conn, const char *fname);
 
 /* The following definitions come from smbd/fileio.c  */
@@ -6480,14 +6473,22 @@ void reply_negprot(struct smb_request *req);
 /* The following definitions come from smbd/notify.c  */
 
 void change_notify_reply(connection_struct *conn,
-                        struct smb_request *req, uint32 max_param,
-                        struct notify_change_buf *notify_buf);
+                        struct smb_request *req,
+                        NTSTATUS error_code,
+                        uint32_t max_param,
+                        struct notify_change_buf *notify_buf,
+                        void (*reply_fn)(struct smb_request *req,
+                               NTSTATUS error_code,
+                               uint8_t *buf, size_t len));
 NTSTATUS change_notify_create(struct files_struct *fsp, uint32 filter,
                              bool recursive);
 NTSTATUS change_notify_add_request(struct smb_request *req,
                                uint32 max_param,
                                uint32 filter, bool recursive,
-                               struct files_struct *fsp);
+                               struct files_struct *fsp,
+                               void (*reply_fn)(struct smb_request *req,
+                                       NTSTATUS error_code,
+                                       uint8_t *buf, size_t len));
 void remove_pending_change_notify_requests_by_mid(uint16 mid);
 void remove_pending_change_notify_requests_by_fid(files_struct *fsp,
                                                  NTSTATUS status);
@@ -7030,7 +7031,8 @@ NTSTATUS get_ea_value(TALLOC_CTX *mem_ctx, connection_struct *conn,
 NTSTATUS get_ea_names_from_file(TALLOC_CTX *mem_ctx, connection_struct *conn,
                                files_struct *fsp, const char *fname,
                                char ***pnames, size_t *pnum_names);
-NTSTATUS set_ea(connection_struct *conn, files_struct *fsp, const char *fname, struct ea_list *ea_list);
+NTSTATUS set_ea(connection_struct *conn, files_struct *fsp,
+               const struct smb_filename *smb_fname, struct ea_list *ea_list);
 struct ea_list *read_ea_list_entry(TALLOC_CTX *ctx, const char *pdata, size_t data_size, size_t *pbytes_used);
 void send_trans2_replies(connection_struct *conn,
                        struct smb_request *req,