summaryrefslogtreecommitdiff
path: root/source3/include
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>1998-10-04 09:42:51 +0000
committerAndrew Tridgell <tridge@samba.org>1998-10-04 09:42:51 +0000
commit6760e69a68571e01ee57b959193a56278962a23c (patch)
treecab4036d3fcb04cd2ab1ee3ab1eedcd3a1fd2b79 /source3/include
parentce843e9735742626bb03cbea61041fff5d215930 (diff)
downloadsamba-6760e69a68571e01ee57b959193a56278962a23c.tar.gz
samba-6760e69a68571e01ee57b959193a56278962a23c.tar.bz2
samba-6760e69a68571e01ee57b959193a56278962a23c.zip
added support for printing via smbwrapper
You can print using "cp filename /smb/SERVER/PRINTER/jobname" You can list the current printqueue using ls (This used to be commit 080fb61b69620e26e8122705383dc2bd0468a519)
Diffstat (limited to 'source3/include')
-rw-r--r--source3/include/client.h15
-rw-r--r--source3/include/proto.h7
2 files changed, 20 insertions, 2 deletions
diff --git a/source3/include/client.h b/source3/include/client.h
index 79fb96dad2..495780cbaa 100644
--- a/source3/include/client.h
+++ b/source3/include/client.h
@@ -25,8 +25,9 @@
#define _CLIENT_H
/* the client asks for a smaller buffer to save ram and also to get more
- overlap on the wire */
-#define CLI_BUFFER_SIZE (0x4000)
+ overlap on the wire. This size gives us a nice read/write size, which
+ will be a multiple of the page size on almost any system */
+#define CLI_BUFFER_SIZE (0x4400)
/*
* These definitions depend on smb.h
@@ -45,6 +46,16 @@ typedef struct file_info
pstring name;
} file_info;
+struct print_job_info
+{
+ uint16 id;
+ uint16 priority;
+ size_t size;
+ fstring user;
+ fstring name;
+ time_t t;
+};
+
struct pwd_info
{
BOOL null_pwd;
diff --git a/source3/include/proto.h b/source3/include/proto.h
index 78863b5984..29803cdbbc 100644
--- a/source3/include/proto.h
+++ b/source3/include/proto.h
@@ -321,6 +321,7 @@ struct hostent *Get_Hostbyname(char *name);
BOOL process_exists(int pid);
char *uidtoname(uid_t uid);
char *gidtoname(gid_t gid);
+uid_t nametouid(const char *name);
void smb_panic(char *why);
char *readdirname(void *p);
BOOL is_in_path(char *name, name_compare_entry *namelist);
@@ -417,6 +418,8 @@ BOOL cli_establish_connection(struct cli_state *cli,
struct nmb_name *calling, struct nmb_name *called,
char *service, char *service_type,
BOOL do_shutdown, BOOL do_tcon);
+int cli_print_queue(struct cli_state *cli,
+ void (*fn)(struct print_job_info *));
/*The following definitions come from libsmb/credentials.c */
@@ -2294,6 +2297,8 @@ int smbw_utime(const char *fname, void *buf);
int smbw_chown(const char *fname, uid_t owner, gid_t group);
int smbw_chmod(const char *fname, mode_t newmode);
off_t smbw_lseek(int fd, off_t offset, int whence);
+int smbw_dup(int fd);
+int smbw_dup2(int fd, int fd2);
/*The following definitions come from smbwrapper/smbw_dir.c */
@@ -2321,6 +2326,8 @@ void smbw_setup_stat(struct stat *st, char *fname, size_t size, int mode);
BOOL smbw_getatr(struct smbw_server *srv, char *path,
uint32 *mode, size_t *size,
time_t *c_time, time_t *a_time, time_t *m_time);
+int smbw_stat_printjob(struct smbw_server *srv,char *path,
+ size_t *size, time_t *m_time);
int smbw_fstat(int fd, struct stat *st);
int smbw_stat(const char *fname, struct stat *st);