summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--source4/include/libsmb_internal.h67
-rw-r--r--source4/include/libsmbclient.h1073
-rw-r--r--source4/include/nt_printing.h482
-rw-r--r--source4/include/ntdomain.h12
-rw-r--r--source4/include/printing.h102
-rw-r--r--source4/include/vt_mode.h48
6 files changed, 0 insertions, 1784 deletions
diff --git a/source4/include/libsmb_internal.h b/source4/include/libsmb_internal.h
deleted file mode 100644
index 21fe47d4b2..0000000000
--- a/source4/include/libsmb_internal.h
+++ /dev/null
@@ -1,67 +0,0 @@
-#ifndef _LIBSMB_INTERNAL_H_
-#define _LIBSMB_INTERNAL_H_
-
-#define SMBC_MAX_NAME 1023
-#define SMBC_FILE_MODE (S_IFREG | 0444)
-#define SMBC_DIR_MODE (S_IFDIR | 0555)
-
-
-#include "../include/libsmbclient.h"
-
-
-struct _SMBCSRV {
- struct cli_state cli;
- dev_t dev;
- BOOL no_pathinfo2;
- int server_fd;
-
- SMBCSRV *next, *prev;
-
-};
-
-/*
- * Keep directory entries in a list
- */
-struct smbc_dir_list {
- struct smbc_dir_list *next;
- struct smbc_dirent *dirent;
-};
-
-
-/*
- * Structure for open file management
- */
-struct _SMBCFILE {
- int cli_fd;
- char *fname;
- off_t offset;
- struct _SMBCSRV *srv;
- BOOL file;
- struct smbc_dir_list *dir_list, *dir_end, *dir_next;
- int dir_type, dir_error;
-
- SMBCFILE *next, *prev;
-};
-
-
-struct smbc_internal_data {
-
- /** INTERNAL: is this handle initialized ?
- */
- int _initialized;
-
- /** INTERNAL: dirent pointer location
- */
- char _dirent[512];
-
- /** INTERNAL: server connection list
- */
- SMBCSRV * _servers;
-
- /** INTERNAL: open file/dir list
- */
- SMBCFILE * _files;
-};
-
-
-#endif
diff --git a/source4/include/libsmbclient.h b/source4/include/libsmbclient.h
deleted file mode 100644
index 0c905edcbc..0000000000
--- a/source4/include/libsmbclient.h
+++ /dev/null
@@ -1,1073 +0,0 @@
-/*=====================================================================
- Unix SMB/Netbios implementation.
- SMB client library API definitions
- Copyright (C) Andrew Tridgell 1998
- Copyright (C) Richard Sharpe 2000
- Copyright (C) John Terpsra 2000
- Copyright (C) Tom Jansen (Ninja ISD) 2002
-
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
- =====================================================================*/
-
-#ifndef SMBCLIENT_H_INCLUDED
-#define SMBCLIENT_H_INCLUDED
-
-/*-------------------------------------------------------------------*/
-/* The following are special comments to instruct DOXYGEN (automated
- * documentation tool:
-*/
-/** \defgroup libsmbclient
-*/
-/** \defgroup structure Data Structures Type and Constants
-* \ingroup libsmbclient
-* Data structures, types, and constants
-*/
-/** \defgroup callback Callback function types
-* \ingroup libsmbclient
-* Callback functions
-*/
-/** \defgroup file File Functions
-* \ingroup libsmbclient
-* Functions used to access individual file contents
-*/
-/** \defgroup directory Directory Functions
-* \ingroup libsmbclient
-* Functions used to access directory entries
-*/
-/** \defgroup attribute Attributes Functions
-* \ingroup libsmbclient
-* Functions used to view or change file and directory attributes
-*/
-/** \defgroup print Print Functions
-* \ingroup libsmbclient
-* Functions used to access printing functionality
-*/
-/** \defgroup misc Miscellaneous Functions
-* \ingroup libsmbclient
-* Functions that don't fit in to other categories
-*/
-/*-------------------------------------------------------------------*/
-
-/* Make sure we have the following includes for now ... */
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-
-#define SMBC_WORKGROUP 1
-#define SMBC_SERVER 2
-#define SMBC_FILE_SHARE 3
-#define SMBC_PRINTER_SHARE 4
-#define SMBC_COMMS_SHARE 5
-#define SMBC_IPC_SHARE 6
-#define SMBC_DIR 7
-#define SMBC_FILE 8
-#define SMBC_LINK 9
-
-/**@ingroup structure
- * Structure that represents a directory entry.
- *
- */
-struct smbc_dirent
-{
- /** Type of entity.
- SMBC_WORKGROUP=1,
- SMBC_SERVER=2,
- SMBC_FILE_SHARE=3,
- SMBC_PRINTER_SHARE=4,
- SMBC_COMMS_SHARE=5,
- SMBC_IPC_SHARE=6,
- SMBC_DIR=7,
- SMBC_FILE=8,
- SMBC_LINK=9,*/
- unsigned int smbc_type;
-
- /** Length of this smbc_dirent in bytes
- */
- unsigned int dirlen;
- /** The length of the comment string in bytes (includes null
- * terminator)
- */
- unsigned int commentlen;
- /** Points to the null terminated comment string
- */
- char *comment;
- /** The length of the name string in bytes (includes null
- * terminator)
- */
- unsigned int namelen;
- /** Points to the null terminated name string
- */
- char name[1];
-};
-
-
-/**@ingroup structure
- * Structure that represents a print job.
- *
- */
-#ifndef _CLIENT_H
-struct print_job_info
-{
- /** numeric ID of the print job
- */
- unsigned short id;
-
- /** represents print job priority (lower numbers mean higher priority)
- */
- unsigned short priority;
-
- /** Size of the print job
- */
- size_t size;
-
- /** Name of the user that owns the print job
- */
- char user[128];
-
- /** Name of the print job. This will have no name if an anonymous print
- * file was opened. Ie smb://server/printer
- */
- char name[128];
-
- /** Time the print job was spooled
- */
- time_t t;
-};
-#endif /* _CLIENT_H */
-
-
-/**@ingroup structure
- * Server handle
- */
-typedef struct _SMBCSRV SMBCSRV;
-
-/**@ingroup structure
- * File or directory handle
- */
-typedef struct _SMBCFILE SMBCFILE;
-
-/**@ingroup structure
- * File or directory handle
- */
-typedef struct _SMBCCTX SMBCCTX;
-
-
-
-
-
-/**@ingroup callback
- * Authentication callback function type.
- *
- * Type for the the authentication function called by the library to
- * obtain authentication credentals
- *
- * @param srv Server being authenticated to
- *
- * @param shr Share being authenticated to
- *
- * @param wg Pointer to buffer containing a "hint" for the
- * workgroup to be authenticated. Should be filled in
- * with the correct workgroup if the hint is wrong.
- *
- * @param wglen The size of the workgroup buffer in bytes
- *
- * @param un Pointer to buffer containing a "hint" for the
- * user name to be use for authentication. Should be
- * filled in with the correct workgroup if the hint is
- * wrong.
- *
- * @param unlen The size of the username buffer in bytes
- *
- * @param pw Pointer to buffer containing to which password
- * copied
- *
- * @param pwlen The size of the password buffer in bytes
- *
- */
-typedef void (*smbc_get_auth_data_fn)(const char *srv,
- const char *shr,
- char *wg, int wglen,
- char *un, int unlen,
- char *pw, int pwlen);
-
-
-/**@ingroup callback
- * Print job info callback function type.
- *
- * @param i pointer to print job information structure
- *
- */
-typedef void (*smbc_list_print_job_fn)(struct print_job_info *i);
-
-
-/**@ingroup callback
- * Check if a server is still good
- *
- * @param c pointer to smb context
- *
- * @param srv pointer to server to check
- *
- * @return 0 when connection is good. 1 on error.
- *
- */
-typedef int (*smbc_check_server_fn)(SMBCCTX * c, SMBCSRV *srv);
-
-/**@ingroup callback
- * Remove a server if unused
- *
- * @param c pointer to smb context
- *
- * @param srv pointer to server to remove
- *
- * @return 0 on success. 1 on failure.
- *
- */
-typedef int (*smbc_remove_unused_server_fn)(SMBCCTX * c, SMBCSRV *srv);
-
-
-/**@ingroup callback
- * Add a server to the cache system
- *
- * @param c pointer to smb context
- *
- * @param srv pointer to server to add
- *
- * @param server server name
- *
- * @param share share name
- *
- * @param workgroup workgroup used to connect
- *
- * @param username username used to connect
- *
- * @return 0 on success. 1 on failure.
- *
- */
-typedef int (*smbc_add_cached_srv_fn) (SMBCCTX * c, SMBCSRV *srv,
- char * server, char * share,
- char * workgroup, char * username);
-
-
-/**@ingroup callback
- * Look up a server in the cache system
- *
- * @param c pointer to smb context
- *
- * @param server server name to match
- *
- * @param share share name to match
- *
- * @param workgroup workgroup to match
- *
- * @param username username to match
- *
- * @return pointer to SMBCSRV on success. NULL on failure.
- *
- */
-typedef SMBCSRV * (*smbc_get_cached_srv_fn) (SMBCCTX * c, char * server,
- char * share, char * workgroup, char * username);
-
-
-/**@ingroup callback
- * Check if a server is still good
- *
- * @param c pointer to smb context
- *
- * @param srv pointer to server to remove
- *
- * @return 0 when found and removed. 1 on failure.
- *
- */
-typedef int (*smbc_remove_cached_srv_fn)(SMBCCTX * c, SMBCSRV *srv);
-
-
-/**@ingroup callback
- * Try to remove all servers from the cache system and disconnect
- *
- * @param c pointer to smb context
- *
- * @return 0 when found and removed. 1 on failure.
- *
- */
-typedef int (*smbc_purge_cached_fn) (SMBCCTX * c);
-
-
-
-
-/**@ingroup structure
- * Structure that contains a client context information
- * This structure is know as SMBCCTX
- */
-struct _SMBCCTX {
- /** debug level
- */
- int debug;
-
- /** netbios name used for making connections
- */
- char * netbios_name;
-
- /** workgroup name used for making connections
- */
- char * workgroup;
-
- /** username used for making connections
- */
- char * user;
-
- /** timeout used for waiting on connections / response data (in milliseconds)
- */
- int timeout;
-
- /** callable functions for files:
- * For usage and return values see the smbc_* functions
- */
- SMBCFILE * (*open) (SMBCCTX *c, const char *fname, int flags, mode_t mode);
- SMBCFILE * (*creat) (SMBCCTX *c, const char *path, mode_t mode);
- ssize_t (*read) (SMBCCTX *c, SMBCFILE *file, void *buf, size_t count);
- ssize_t (*write) (SMBCCTX *c, SMBCFILE *file, void *buf, size_t count);
- int (*unlink) (SMBCCTX *c, const char *fname);
- int (*rename) (SMBCCTX *ocontext, const char *oname,
- SMBCCTX *ncontext, const char *nname);
- off_t (*lseek) (SMBCCTX *c, SMBCFILE * file, off_t offset, int whence);
- int (*stat) (SMBCCTX *c, const char *fname, struct stat *st);
- int (*fstat) (SMBCCTX *c, SMBCFILE *file, struct stat *st);
- int (*close) (SMBCCTX *c, SMBCFILE *file);
-
- /** callable functions for dirs
- */
- SMBCFILE * (*opendir) (SMBCCTX *c, const char *fname);
- int (*closedir)(SMBCCTX *c, SMBCFILE *dir);
- struct smbc_dirent * (*readdir)(SMBCCTX *c, SMBCFILE *dir);
- int (*getdents)(SMBCCTX *c, SMBCFILE *dir,
- struct smbc_dirent *dirp, int count);
- int (*mkdir) (SMBCCTX *c, const char *fname, mode_t mode);
- int (*rmdir) (SMBCCTX *c, const char *fname);
- off_t (*telldir) (SMBCCTX *c, SMBCFILE *dir);
- int (*lseekdir)(SMBCCTX *c, SMBCFILE *dir, off_t offset);
- int (*fstatdir)(SMBCCTX *c, SMBCFILE *dir, struct stat *st);
-
- /** callable functions for printing
- */
- int (*print_file)(SMBCCTX *c_file, const char *fname,
- SMBCCTX *c_print, const char *printq);
- SMBCFILE * (*open_print_job)(SMBCCTX *c, const char *fname);
- int (*list_print_jobs)(SMBCCTX *c, const char *fname, smbc_list_print_job_fn fn);
- int (*unlink_print_job)(SMBCCTX *c, const char *fname, int id);
-
-
- /** Callbacks
- * These callbacks _always_ have to be initialized because they will not be checked
- * at dereference for increased speed.
- */
- struct _smbc_callbacks {
- /** authentication function callback: called upon auth requests
- */
- smbc_get_auth_data_fn auth_fn;
-
- /** check if a server is still good
- */
- smbc_check_server_fn check_server_fn;
-
- /** remove a server if unused
- */
- smbc_remove_unused_server_fn remove_unused_server_fn;
-
- /** Cache subsystem
- * For an example cache system see samba/source/libsmb/libsmb_cache.c
- * Cache subsystem functions follow.
- */
-
- /** server cache addition
- */
- smbc_add_cached_srv_fn add_cached_srv_fn;
-
- /** server cache lookup
- */
- smbc_get_cached_srv_fn get_cached_srv_fn;
-
- /** server cache removal
- */
- smbc_remove_cached_srv_fn remove_cached_srv_fn;
-
- /** server cache purging, try to remove all cached servers (disconnect)
- */
- smbc_purge_cached_fn purge_cached_fn;
- } callbacks;
-
-
- /** Space to store private data of the server cache.
- */
- struct smbc_server_cache * server_cache;
-
- /** INTERNAL DATA
- * do _NOT_ touch this from your program !
- */
- struct smbc_internal_data * internal;
-
-};
-
-
-/**@ingroup misc
- * Create a new SBMCCTX (a context).
- *
- * Must be called before the context is passed to smbc_context_init()
- *
- * @return The given SMBCCTX pointer on success, NULL on error with errno set:
- * - ENOMEM Out of memory
- *
- * @see smbc_free_context(), smbc_init_context()
- *
- * @note Do not forget to smbc_init_context() the returned SMBCCTX pointer !
- */
-SMBCCTX * smbc_new_context(void);
-
-/**@ingroup misc
- * Delete a SBMCCTX (a context) acquired from smbc_new_context().
- *
- * The context will be deleted if possible.
- *
- * @param context A pointer to a SMBCCTX obtained from smbc_new_context()
- *
- * @param shutdown_ctx If 1, all connections and files will be closed even if they are busy.
- *
- *
- * @return Returns 0 on succes. Returns 1 on failure with errno set:
- * - EBUSY Server connections are still used, Files are open or cache
- * could not be purged
- * - EBADF context == NULL
- *
- * @see smbc_new_context()
- *
- * @note It is advised to clean up all the contexts with shutdown_ctx set to 1
- * just before exit()'ing. When shutdown_ctx is 0, this function can be
- * use in periodical cleanup functions for example.
- */
-int smbc_free_context(SMBCCTX * context, int shutdown_ctx);
-
-
-/**@ingroup misc
- * Initialize a SBMCCTX (a context).
- *
- * Must be called before using any SMBCCTX API function
- *
- * @param context A pointer to a SMBCCTX obtained from smbc_new_context()
- *
- * @return A pointer to the given SMBCCTX on success, NULL on error with errno set:
- * - EBADF NULL context given
- * - ENOMEM Out of memory
- * - ENOENT The smb.conf file would not load
- *
- * @see smbc_new_context()
- *
- * @note my_context = smbc_init_context(smbc_new_context()) is perfectly safe,
- * but it might leak memory on smbc_context_init() failure. Avoid this.
- * You'll have to call smbc_free_context() yourself on failure.
- */
-
-SMBCCTX * smbc_init_context(SMBCCTX * context);
-
-/**@ingroup misc
- * Initialize the samba client library.
- *
- * Must be called before using any of the smbclient API function
- *
- * @param fn The function that will be called to obtaion
- * authentication credentials.
- *
- * @param debug Allows caller to set the debug level. Can be
- * changed in smb.conf file. Allows caller to set
- * debugging if no smb.conf.
- *
- * @return 0 on success, < 0 on error with errno set:
- * - ENOMEM Out of memory
- * - ENOENT The smb.conf file would not load
- *
- */
-
-int smbc_init(smbc_get_auth_data_fn fn, int debug);
-
-/**@ingroup file
- * Open a file on an SMB server.
- *
- * @param furl The smb url of the file to be opened.
- *
- * @param flags Is one of O_RDONLY, O_WRONLY or O_RDWR which
- * request opening the file read-only,write-only
- * or read/write. flags may also be bitwise-or'd with
- * one or more of the following:
- * O_CREAT - If the file does not exist it will be
- * created.
- * O_EXCL - When used with O_CREAT, if the file
- * already exists it is an error and the open will
- * fail.
- * O_TRUNC - If the file already exists it will be
- * truncated.
- * O_APPEND The file is opened in append mode
- *
- * @param mode mode specifies the permissions to use if a new
- * file is created. It is modified by the
- * process's umask in the usual way: the permissions
- * of the created file are (mode & ~umask)
- *
- * Not currently use, but there for future use.
- * We will map this to SYSTEM, HIDDEN, etc bits
- * that reverses the mapping that smbc_fstat does.
- *
- * @return Valid file handle, < 0 on error with errno set:
- * - ENOMEM Out of memory
- * - EINVAL if an invalid parameter passed, like no
- * file, or smbc_init not called.
- * - EEXIST pathname already exists and O_CREAT and
- * O_EXCL were used.
- * - EISDIR pathname refers to a directory and
- * the access requested involved writing.
- * - EACCES The requested access to the file is not
- * allowed
- * - ENODEV The requested share does not exist
- * - ENOTDIR A file on the path is not a directory
- * - ENOENT A directory component in pathname does
- * not exist.
- *
- * @see smbc_creat()
- *
- * @note This call uses an underlying routine that may create
- * a new connection to the server specified in the URL.
- * If the credentials supplied in the URL, or via the
- * auth_fn in the smbc_init call, fail, this call will
- * try again with an empty username and password. This
- * often gets mapped to the guest account on some machines.
- */
-
-int smbc_open(const char *furl, int flags, mode_t mode);
-
-/**@ingroup file
- * Create a file on an SMB server.
- *
- * Same as calling smbc_open() with flags = O_CREAT|O_WRONLY|O_TRUNC
- *
- * @param furl The smb url of the file to be created
- *
- * @param mode mode specifies the permissions to use if a new
- * file is created. It is modified by the
- * process's umask in the usual way: the permissions
- * of the created file are (mode & ~umask)
- *
- * NOTE, the above is not true. We are dealing with
- * an SMB server, which has no concept of a umask!
- *
- * @return Valid file handle, < 0 on error with errno set:
- * - ENOMEM Out of memory
- * - EINVAL if an invalid parameter passed, like no
- * file, or smbc_init not called.
- * - EEXIST pathname already exists and O_CREAT and
- * O_EXCL were used.
- * - EISDIR pathname refers to a directory and
- * the access requested involved writing.
- * - EACCES The requested access to the file is not
- * allowed
- * - ENOENT A directory component in pathname does
- * not exist.
- * - ENODEV The requested share does not exist.
- * @see smbc_open()
- *
- */
-
-int smbc_creat(const char *furl, mode_t mode);
-
-/**@ingroup file
- * Read from a file using an opened file handle.
- *
- * @param fd Open file handle from smbc_open() or smbc_creat()
- *
- * @param buf Pointer to buffer to recieve read data
- *
- * @param bufsize Size of buf in bytes
- *
- * @return Number of bytes read, < 0 on error with errno set:
- * - EISDIR fd refers to a directory
- * - EBADF fd is not a valid file descriptor or
- * is not open for reading.
- * - EINVAL fd is attached to an object which is
- * unsuitable for reading, or no buffer passed or
- * smbc_init not called.
- *
- * @see smbc_open(), smbc_write()
- *
- */
-ssize_t smbc_read(int fd, void *buf, size_t bufsize);
-
-
-/**@ingroup file
- * Write to a file using an opened file handle.
- *
- * @param fd Open file handle from smbc_open() or smbc_creat()
- *
- * @param buf Pointer to buffer to recieve read data
- *
- * @param bufsize Size of buf in bytes
- *
- * @return Number of bytes written, < 0 on error with errno set:
- * - EISDIR fd refers to a directory.
- * - EBADF fd is not a valid file descriptor or
- * is not open for reading.
- * - EINVAL fd is attached to an object which is
- * unsuitable for reading, or no buffer passed or
- * smbc_init not called.
- *
- * @see smbc_open(), smbc_read()
- *
- */
-ssize_t smbc_write(int fd, void *buf, size_t bufsize);
-
-
-/**@ingroup file
- * Seek to a specific location in a file.
- *
- * @param fd Open file handle from smbc_open() or smbc_creat()
- *
- * @param offset Offset in bytes from whence
- *
- * @param whence A location in the file:
- * - SEEK_SET The offset is set to offset bytes from
- * the beginning of the file
- * - SEEK_CUR The offset is set to current location
- * plus offset bytes.
- * - SEEK_END The offset is set to the size of the
- * file plus offset bytes.
- *
- * @return Upon successful completion, lseek returns the
- * resulting offset location as measured in bytes
- * from the beginning of the file. Otherwise, a value
- * of (off_t)-1 is returned and errno is set to
- * indicate the error:
- * - EBADF Fildes is not an open file descriptor.
- * - EINVAL Whence is not a proper value or smbc_init
- * not called.
- *
- * @todo Are all the whence values really supported?
- *
- * @todo Are errno values complete and correct?
- */
-off_t smbc_lseek(int fd, off_t offset, int whence);
-
-
-/**@ingroup file
- * Close an open file handle.
- *
- * @param fd The file handle to close
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EBADF fd isn't a valid open file descriptor
- * - EINVAL smbc_init() failed or has not been called
- *
- * @see smbc_open(), smbc_creat()
- */
-int smbc_close(int fd);
-
-
-/**@ingroup directory
- * Unlink (delete) a file or directory.
- *
- * @param furl The smb url of the file to delete
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EACCES or EPERM Write access to the directory
- * containing pathname is not allowed or one
- * of the directories in pathname did not allow
- * search (execute) permission
- * - ENOENT A directory component in pathname does
- * not exist
- * - EINVAL NULL was passed in the file param or
- * smbc_init not called.
- * - EACCES You do not have access to the file
- * - ENOMEM Insufficient kernel memory was available
- *
- * @see smbc_rmdir()s
- *
- * @todo Are errno values complete and correct?
- */
-int smbc_unlink(const char *furl);
-
-
-/**@ingroup directory
- * Rename or move a file or directory.
- *
- * @param ourl The original smb url (source url) of file or
- * directory to be moved
- *
- * @param nurl The new smb url (destination url) of the file
- * or directory after the move. Currently nurl must
- * be on the same share as ourl.
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EISDIR nurl is an existing directory, but ourl is
- * not a directory.
- * - EEXIST nurl is a non-empty directory,
- * i.e., contains entries other than "." and ".."
- * - EINVAL The new url contained a path prefix
- * of the old, or, more generally, an attempt was
- * made to make a directory a subdirectory of itself
- * or smbc_init not called.
- * - ENOTDIR A component used as a directory in ourl
- * or nurl path is not, in fact, a directory. Or,
- * ourl is a directory, and newpath exists but is not
- * a directory.
- * - EACCES or EPERM Write access to the directory
- * containing ourl or nurl is not allowed for the
- * process's effective uid, or one of the
- * directories in ourl or nurl did not allow search
- * (execute) permission, or ourl was a directory
- * and did not allow write permission.
- * - ENOENT A directory component in ourl or nurl
- * does not exist.
- * - EXDEV Rename across shares not supported.
- * - ENOMEM Insufficient kernel memory was available.
- * - EEXIST The target file, nurl, already exists.
- *
- *
- * @todo Are we going to support copying when urls are not on the same
- * share? I say no... NOTE. I agree for the moment.
- *
- */
-int smbc_rename(const char *ourl, const char *nurl);
-
-
-/**@ingroup directory
- * Open a directory used to obtain directory entries.
- *
- * @param durl The smb url of the directory to open
- *
- * @return Valid directory handle. < 0 on error with errno set:
- * - EACCES Permission denied.
- * - EINVAL A NULL file/URL was passed, or the URL would
- * not parse, or was of incorrect form or smbc_init not
- * called.
- * - ENOENT durl does not exist, or name is an
- * - ENOMEM Insufficient memory to complete the
- * operation.
- * - ENOTDIR name is not a directory.
- * - EPERM the workgroup could not be found.
- * - ENODEV the workgroup or server could not be found.
- *
- * @see smbc_getdents(), smbc_readdir(), smbc_closedir()
- *
- */
-int smbc_opendir(const char *durl);
-
-
-/**@ingroup directory
- * Close a directory handle opened by smbc_opendir().
- *
- * @param dh Directory handle to close
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EBADF dh is an invalid directory handle
- *
- * @see smbc_opendir()
- */
-int smbc_closedir(int dh);
-
-
-/**@ingroup directory
- * Get multiple directory entries.
- *
- * smbc_getdents() reads as many dirent structures from the an open
- * directory handle into a specified memory area as will fit.
- *
- * @param dh Valid directory as returned by smbc_opendir()
- *
- * @param dirp pointer to buffer that will receive the directory
- * entries.
- *
- * @param count The size of the dirp buffer in bytes
- *
- * @returns If any dirents returned, return will indicate the
- * total size. If there were no more dirents available,
- * 0 is returned. < 0 indicates an error.
- * - EBADF Invalid directory handle
- * - EINVAL Result buffer is too small or smbc_init
- * not called.
- * - ENOENT No such directory.
- * @see , smbc_dirent, smbc_readdir(), smbc_open()
- *
- * @todo Are errno values complete and correct?
- *
- * @todo Add example code so people know how to parse buffers.
- */
-int smbc_getdents(unsigned int dh, struct smbc_dirent *dirp, int count);
-
-
-/**@ingroup directory
- * Get a single directory entry.
- *
- * @param dh Valid directory as returned by smbc_opendir()
- *
- * @return A pointer to a smbc_dirent structure, or NULL if an
- * error occurs or end-of-directory is reached:
- * - EBADF Invalid directory handle
- * - EINVAL smbc_init() failed or has not been called
- *
- * @see smbc_dirent, smbc_getdents(), smbc_open()
- */
-struct smbc_dirent* smbc_readdir(unsigned int dh);
-
-
-/**@ingroup directory
- * Get the current directory offset.
- *
- * smbc_telldir() may be used in conjunction with smbc_readdir() and
- * smbc_lseekdir().
- *
- * @param dh Valid directory as returned by smbc_opendir()
- *
- * @return The current location in the directory stream or -1
- * if an error occur. The current location is not
- * an offset. Becuase of the implementation, it is a
- * handle that allows the library to find the entry
- * later.
- * - EBADF dh is not a valid directory handle
- * - EINVAL smbc_init() failed or has not been called
- * - ENOTDIR if dh is not a directory
- *
- * @see smbc_readdir()
- *
- */
-off_t smbc_telldir(int dh);
-
-
-/**@ingroup directory
- * lseek on directories.
- *
- * smbc_lseekdir() may be used in conjunction with smbc_readdir() and
- * smbc_telldir(). (rewind by smbc_lseekdir(fd, NULL))
- *
- * @param fd Valid directory as returned by smbc_opendir()
- *
- * @param offset The offset (as returned by smbc_telldir). Can be
- * NULL, in which case we will rewind
- *
- * @return 0 on success, -1 on failure
- * - EBADF dh is not a valid directory handle
- * - ENOTDIR if dh is not a directory
- * - EINVAL offset did not refer to a valid dirent or
- * smbc_init not called.
- *
- * @see smbc_telldir()
- *
- *
- * @todo In what does the reture and errno values mean?
- */
-int smbc_lseekdir(int fd, off_t offset);
-
-/**@ingroup directory
- * Create a directory.
- *
- * @param durl The url of the directory to create
- *
- * @param mode Specifies the permissions to use. It is modified
- * by the process's umask in the usual way: the
- * permissions of the created file are (mode & ~umask).
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EEXIST directory url already exists
- * - EACCES The parent directory does not allow write
- * permission to the process, or one of the directories
- * - ENOENT A directory component in pathname does not
- * exist.
- * - EINVAL NULL durl passed or smbc_init not called.
- * - ENOMEM Insufficient memory was available.
- *
- * @see smbc_rmdir()
- *
- */
-int smbc_mkdir(const char *durl, mode_t mode);
-
-
-/**@ingroup directory
- * Remove a directory.
- *
- * @param durl The smb url of the directory to remove
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EACCES or EPERM Write access to the directory
- * containing pathname was not allowed.
- * - EINVAL durl is NULL or smbc_init not called.
- * - ENOENT A directory component in pathname does not
- * exist.
- * - ENOTEMPTY directory contains entries.
- * - ENOMEM Insufficient kernel memory was available.
- *
- * @see smbc_mkdir(), smbc_unlink()
- *
- * @todo Are errno values complete and correct?
- */
-int smbc_rmdir(const char *durl);
-
-
-/**@ingroup attribute
- * Get information about a file or directory.
- *
- * @param url The smb url to get information for
- *
- * @param st pointer to a buffer that will be filled with
- * standard Unix struct stat information.
- *
- * @return 0 on success, < 0 on error with errno set:
- * - ENOENT A component of the path file_name does not
- * exist.
- * - EINVAL a NULL url was passed or smbc_init not called.
- * - EACCES Permission denied.
- * - ENOMEM Out of memory
- * - ENOTDIR The target dir, url, is not a directory.
- *
- * @see Unix stat()
- *
- */
-int smbc_stat(const char *url, struct stat *st);
-
-
-/**@ingroup attribute
- * Get file information via an file descriptor.
- *
- * @param fd Open file handle from smbc_open() or smbc_creat()
- *
- * @param st pointer to a buffer that will be filled with
- * standard Unix struct stat information.
- *
- * @return EBADF filedes is bad.
- * - EACCES Permission denied.
- * - EBADF fd is not a valid file descriptor
- * - EINVAL Problems occurred in the underlying routines
- * or smbc_init not called.
- * - ENOMEM Out of memory
- *
- * @see smbc_stat(), Unix stat()
- *
- */
-int smbc_fstat(int fd, struct stat *st);
-
-
-/**@ingroup attribue
- * Change the ownership of a file or directory.
- *
- * @param url The smb url of the file or directory to change
- * ownership of.
- *
- * @param owner I have no idea?
- *
- * @param group I have not idea?
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EPERM The effective UID does not match the owner
- * of the file, and is not zero; or the owner or group
- * were specified incorrectly.
- * - ENOENT The file does not exist.
- * - ENOMEM Insufficient was available.
- * - ENOENT file or directory does not exist
- *
- * @todo Are we actually going to be able to implement this function
- *
- * @todo How do we abstract owner and group uid and gid?
- *
- */
-int smbc_chown(const char *url, uid_t owner, gid_t group);
-
-
-/**@ingroup attribute
- * Change the permissions of a file.
- *
- * @param url The smb url of the file or directory to change
- * permissions of
- *
- * @param mode The permissions to set:
- * - Put good explaination of permissions here!
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EPERM The effective UID does not match the owner
- * of the file, and is not zero
- * - ENOENT The file does not exist.
- * - ENOMEM Insufficient was available.
- * - ENOENT file or directory does not exist
- *
- * @todo Actually implement this fuction?
- *
- * @todo Are errno values complete and correct?
- */
-int smbc_chmod(const char *url, mode_t mode);
-
-
-/**@ingroup print
- * Print a file given the name in fname. It would be a URL ...
- *
- * @param fname The URL of a file on a remote SMB server that the
- * caller wants printed
- *
- * @param printq The URL of the print share to print the file to.
- *
- * @return 0 on success, < 0 on error with errno set:
- *
- * - EINVAL fname or printq was NULL or smbc_init not
- * not called.
- * and errors returned by smbc_open
- *
- */
-int smbc_print_file(const char *fname, const char *printq);
-
-/**@ingroup print
- * Open a print file that can be written to by other calls. This simply
- * does an smbc_open call after checking if there is a file name on the
- * URI. If not, a temporary name is added ...
- *
- * @param fname The URL of the print share to print to?
- *
- * @returns A file handle for the print file if successful.
- * Returns -1 if an error ocurred and errno has the values
- * - EINVAL fname was NULL or smbc_init not called.
- * - all errors returned by smbc_open
- *
- */
-int smbc_open_print_job(const char *fname);
-
-/**@ingroup print
- * List the print jobs on a print share, for the moment, pass a callback
- *
- * @param purl The url of the print share to list the jobs of
- *
- * @param fn Callback function the receives printjob info
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EINVAL fname was NULL or smbc_init not called
- * - EACCES ???
- */
-int smbc_list_print_jobs(const char *purl, smbc_list_print_job_fn fn);
-
-/**@ingroup print
- * Delete a print job
- *
- * @param purl Url of the print share
- *
- * @param id The id of the job to delete
- *
- * @return 0 on success, < 0 on error with errno set:
- * - EINVAL fname was NULL or smbc_init not called
- *
- * @todo what errno values are possible here?
- */
-int smbc_unlink_print_job(const char *purl, int id);
-
-
-#endif /* SMBCLIENT_H_INCLUDED */
diff --git a/source4/include/nt_printing.h b/source4/include/nt_printing.h
deleted file mode 100644
index ca65a40d48..0000000000
--- a/source4/include/nt_printing.h
+++ /dev/null
@@ -1,482 +0,0 @@
-/*
- Unix SMB/Netbios implementation.
- Version 1.9.
- SMB parameters and setup
- Copyright (C) Andrew Tridgell 1992-2000,
- Copyright (C) Jean Francois Micouleau 1998-2000.
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#ifndef NT_PRINTING_H_
-#define NT_PRINTING_H_
-
-#define ORIENTATION 0x00000001L
-#define PAPERSIZE 0x00000002L
-#define PAPERLENGTH 0x00000004L
-#define PAPERWIDTH 0x00000008L
-#define SCALE 0x00000010L
-#define COPIES 0x00000100L
-#define DEFAULTSOURCE 0x00000200L
-#define PRINTQUALITY 0x00000400L
-#define COLOR 0x00000800L
-#define DUPLEX 0x00001000L
-#define YRESOLUTION 0x00002000L
-#define TTOPTION 0x00004000L
-#define COLLATE 0x00008000L
-#define FORMNAME 0x00010000L
-#define LOGPIXELS 0x00020000L
-#define BITSPERPEL 0x00040000L
-#define PELSWIDTH 0x00080000L
-#define PELSHEIGHT 0x00100000L
-#define DISPLAYFLAGS 0x00200000L
-#define DISPLAYFREQUENCY 0x00400000L
-#define PANNINGWIDTH 0x00800000L
-#define PANNINGHEIGHT 0x01000000L
-
-#define ORIENT_PORTRAIT 1
-#define ORIENT_LANDSCAPE 2
-
-#define PAPER_FIRST PAPER_LETTER
-#define PAPER_LETTER 1 /* Letter 8 1/2 x 11 in */
-#define PAPER_LETTERSMALL 2 /* Letter Small 8 1/2 x 11 in */
-#define PAPER_TABLOID 3 /* Tabloid 11 x 17 in */
-#define PAPER_LEDGER 4 /* Ledger 17 x 11 in */
-#define PAPER_LEGAL 5 /* Legal 8 1/2 x 14 in */
-#define PAPER_STATEMENT 6 /* Statement 5 1/2 x 8 1/2 in */
-#define PAPER_EXECUTIVE 7 /* Executive 7 1/4 x 10 1/2 in */
-#define PAPER_A3 8 /* A3 297 x 420 mm */
-#define PAPER_A4 9 /* A4 210 x 297 mm */
-#define PAPER_A4SMALL 10 /* A4 Small 210 x 297 mm */
-#define PAPER_A5 11 /* A5 148 x 210 mm */
-#define PAPER_B4 12 /* B4 (JIS) 250 x 354 */
-#define PAPER_B5 13 /* B5 (JIS) 182 x 257 mm */
-#define PAPER_FOLIO 14 /* Folio 8 1/2 x 13 in */
-#define PAPER_QUARTO 15 /* Quarto 215 x 275 mm */
-#define PAPER_10X14 16 /* 10x14 in */
-#define PAPER_11X17 17 /* 11x17 in */
-#define PAPER_NOTE 18 /* Note 8 1/2 x 11 in */
-#define PAPER_ENV_9 19 /* Envelope #9 3 7/8 x 8 7/8 */
-#define PAPER_ENV_10 20 /* Envelope #10 4 1/8 x 9 1/2 */
-#define PAPER_ENV_11 21 /* Envelope #11 4 1/2 x 10 3/8 */
-#define PAPER_ENV_12 22 /* Envelope #12 4 \276 x 11 */
-#define PAPER_ENV_14 23 /* Envelope #14 5 x 11 1/2 */
-#define PAPER_CSHEET 24 /* C size sheet */
-#define PAPER_DSHEET 25 /* D size sheet */
-#define PAPER_ESHEET 26 /* E size sheet */
-#define PAPER_ENV_DL 27 /* Envelope DL 110 x 220mm */
-#define PAPER_ENV_C5 28 /* Envelope C5 162 x 229 mm */
-#define PAPER_ENV_C3 29 /* Envelope C3 324 x 458 mm */
-#define PAPER_ENV_C4 30 /* Envelope C4 229 x 324 mm */
-#define PAPER_ENV_C6 31 /* Envelope C6 114 x 162 mm */
-#define PAPER_ENV_C65 32 /* Envelope C65 114 x 229 mm */
-#define PAPER_ENV_B4 33 /* Envelope B4 250 x 353 mm */
-#define PAPER_ENV_B5 34 /* Envelope B5 176 x 250 mm */
-#define PAPER_ENV_B6 35 /* Envelope B6 176 x 125 mm */
-#define PAPER_ENV_ITALY 36 /* Envelope 110 x 230 mm */
-#define PAPER_ENV_MONARCH 37 /* Envelope Monarch 3.875 x 7.5 in */
-#define PAPER_ENV_PERSONAL 38 /* 6 3/4 Envelope 3 5/8 x 6 1/2 in */
-#define PAPER_FANFOLD_US 39 /* US Std Fanfold 14 7/8 x 11 in */
-#define PAPER_FANFOLD_STD_GERMAN 40 /* German Std Fanfold 8 1/2 x 12 in */
-#define PAPER_FANFOLD_LGL_GERMAN 41 /* German Legal Fanfold 8 1/2 x 13 in */
-
-#define PAPER_LAST PAPER_FANFOLD_LGL_GERMAN
-#define PAPER_USER 256
-
-#define BIN_FIRST BIN_UPPER
-#define BIN_UPPER 1
-#define BIN_ONLYONE 1
-#define BIN_LOWER 2
-#define BIN_MIDDLE 3
-#define BIN_MANUAL 4
-#define BIN_ENVELOPE 5
-#define BIN_ENVMANUAL 6
-#define BIN_AUTO 7
-#define BIN_TRACTOR 8
-#define BIN_SMALLFMT 9
-#define BIN_LARGEFMT 10
-#define BIN_LARGECAPACITY 11
-#define BIN_CASSETTE 14
-#define BIN_FORMSOURCE 15
-#define BIN_LAST BIN_FORMSOURCE
-
-#define BIN_USER 256 /* device specific bins start here */
-
-#define RES_DRAFT (-1)
-#define RES_LOW (-2)
-#define RES_MEDIUM (-3)
-#define RES_HIGH (-4)
-
-#define COLOR_MONOCHROME 1
-#define COLOR_COLOR 2
-
-#define DUP_SIMPLEX 1
-#define DUP_VERTICAL 2
-#define DUP_HORIZONTAL 3
-
-#define TT_BITMAP 1 /* print TT fonts as graphics */
-#define TT_DOWNLOAD 2 /* download TT fonts as soft fonts */
-#define TT_SUBDEV 3 /* substitute device fonts for TT fonts */
-
-#define COLLATE_FALSE 0
-#define COLLATE_TRUE 1
-
-typedef struct nt_printer_driver_info_level_3
-{
- uint32 cversion;
-
- fstring name;
- fstring environment;
- fstring driverpath;
- fstring datafile;
- fstring configfile;
- fstring helpfile;
- fstring monitorname;
- fstring defaultdatatype;
- fstring *dependentfiles;
-} NT_PRINTER_DRIVER_INFO_LEVEL_3;
-
-/* SPOOL_PRINTER_DRIVER_INFO_LEVEL_6 structure */
-typedef struct {
- uint32 version;
- fstring name;
- fstring environment;
- fstring driverpath;
- fstring datafile;
- fstring configfile;
- fstring helpfile;
- fstring monitorname;
- fstring defaultdatatype;
- fstring mfgname;
- fstring oemurl;
- fstring hardwareid;
- fstring provider;
- fstring *dependentfiles;
- fstring *previousnames;
-} NT_PRINTER_DRIVER_INFO_LEVEL_6;
-
-
-typedef struct nt_printer_driver_info_level
-{
- NT_PRINTER_DRIVER_INFO_LEVEL_3 *info_3;
- NT_PRINTER_DRIVER_INFO_LEVEL_6 *info_6;
-} NT_PRINTER_DRIVER_INFO_LEVEL;
-
-/* predefined registry key names for printer data */
-
-#define SPOOL_PRINTERDATA_KEY "PrinterDriverData"
-#define SPOOL_DSSPOOLER_KEY "DsSpooler"
-#define SPOOL_DSDRIVER_KEY "DsDriver"
-#define SPOOL_DSUSER_KEY "DsUser"
-#define SPOOL_PNPDATA_KEY "PnPData"
-#define SPOOL_OID_KEY "OID"
-
-/* predefined value names for printer data */
-#define SPOOL_REG_ASSETNUMBER "assetNumber"
-#define SPOOL_REG_BYTESPERMINUTE "bytesPerMinute"
-#define SPOOL_REG_DEFAULTPRIORITY "defaultPriority"
-#define SPOOL_REG_DESCRIPTION "description"
-#define SPOOL_REG_DRIVERNAME "driverName"
-#define SPOOL_REG_DRIVERVERSION "driverVersion"
-#define SPOOL_REG_FLAGS "flags"
-#define SPOOL_REG_LOCATION "location"
-#define SPOOL_REG_OPERATINGSYSTEM "operatingSystem"
-#define SPOOL_REG_OPERATINGSYSTEMHOTFIX "operatingSystemHotfix"
-#define SPOOL_REG_OPERATINGSYSTEMSERVICEPACK "operatingSystemServicePack"
-#define SPOOL_REG_OPERATINGSYSTEMVERSION "operatingSystemVersion"
-#define SPOOL_REG_PORTNAME "portName"
-#define SPOOL_REG_PRINTATTRIBUTES "printAttributes"
-#define SPOOL_REG_PRINTBINNAMES "printBinNames"
-#define SPOOL_REG_PRINTCOLLATE "printCollate"
-#define SPOOL_REG_PRINTCOLOR "printColor"
-#define SPOOL_REG_PRINTDUPLEXSUPPORTED "printDuplexSupported"
-#define SPOOL_REG_PRINTENDTIME "printEndTime"
-#define SPOOL_REG_PRINTERNAME "printerName"
-#define SPOOL_REG_PRINTFORMNAME "printFormName"
-#define SPOOL_REG_PRINTKEEPPRINTEDJOBS "printKeepPrintedJobs"
-#define SPOOL_REG_PRINTLANGUAGE "printLanguage"
-#define SPOOL_REG_PRINTMACADDRESS "printMACAddress"
-#define SPOOL_REG_PRINTMAXCOPIES "printMaxCopies"
-#define SPOOL_REG_PRINTMAXRESOLUTIONSUPPORTED "printMaxResolutionSupported"
-#define SPOOL_REG_PRINTMAXXEXTENT "printMaxXExtent"
-#define SPOOL_REG_PRINTMAXYEXTENT "printMaxYExtent"
-#define SPOOL_REG_PRINTMEDIAREADY "printMediaReady"
-#define SPOOL_REG_PRINTMEDIASUPPORTED "printMediaSupported"
-#define SPOOL_REG_PRINTMEMORY "printMemory"
-#define SPOOL_REG_PRINTMINXEXTENT "printMinXExtent"
-#define SPOOL_REG_PRINTMINYEXTENT "printMinYExtent"
-#define SPOOL_REG_PRINTNETWORKADDRESS "printNetworkAddress"
-#define SPOOL_REG_PRINTNOTIFY "printNotify"
-#define SPOOL_REG_PRINTNUMBERUP "printNumberUp"
-#define SPOOL_REG_PRINTORIENTATIONSSUPPORTED "printOrientationsSupported"
-#define SPOOL_REG_PRINTOWNER "printOwner"
-#define SPOOL_REG_PRINTPAGESPERMINUTE "printPagesPerMinute"
-#define SPOOL_REG_PRINTRATE "printRate"
-#define SPOOL_REG_PRINTRATEUNIT "printRateUnit"
-#define SPOOL_REG_PRINTSEPARATORFILE "printSeparatorFile"
-#define SPOOL_REG_PRINTSHARENAME "printShareName"
-#define SPOOL_REG_PRINTSPOOLING "printSpooling"
-#define SPOOL_REGVAL_PRINTWHILESPOOLING "PrintWhileSpooling"
-#define SPOOL_REGVAL_PRINTAFTERSPOOLED "PrintAfterSpooled"
-#define SPOOL_REGVAL_PRINTDIRECT "PrintDirect"
-#define SPOOL_REG_PRINTSTAPLINGSUPPORTED "printStaplingSupported"
-#define SPOOL_REG_PRINTSTARTTIME "printStartTime"
-#define SPOOL_REG_PRINTSTATUS "printStatus"
-#define SPOOL_REG_PRIORITY "priority"
-#define SPOOL_REG_SERVERNAME "serverName"
-#define SPOOL_REG_SHORTSERVERNAME "shortServerName"
-#define SPOOL_REG_UNCNAME "uNCName"
-#define SPOOL_REG_URL "url"
-#define SPOOL_REG_VERSIONNUMBER "versionNumber"
-
-/* container for a single registry key */
-
-typedef struct {
- char *name;
- REGVAL_CTR values;
-} NT_PRINTER_KEY;
-
-/* container for all printer data */
-
-typedef struct {
- int num_keys;
- NT_PRINTER_KEY *keys;
-} NT_PRINTER_DATA;
-
-typedef struct ntdevicemode
-{
- fstring devicename;
- fstring formname;
-
- uint16 specversion;
- uint16 driverversion;
- uint16 size;
- uint16 driverextra;
- uint16 orientation;
- uint16 papersize;
- uint16 paperlength;
- uint16 paperwidth;
- uint16 scale;
- uint16 copies;
- uint16 defaultsource;
- uint16 printquality;
- uint16 color;
- uint16 duplex;
- uint16 yresolution;
- uint16 ttoption;
- uint16 collate;
- uint16 logpixels;
-
- uint32 fields;
- uint32 bitsperpel;
- uint32 pelswidth;
- uint32 pelsheight;
- uint32 displayflags;
- uint32 displayfrequency;
- uint32 icmmethod;
- uint32 icmintent;
- uint32 mediatype;
- uint32 dithertype;
- uint32 reserved1;
- uint32 reserved2;
- uint32 panningwidth;
- uint32 panningheight;
- uint8 *private;
-} NT_DEVICEMODE;
-
-typedef struct nt_printer_info_level_2
-{
- uint32 attributes;
- uint32 priority;
- uint32 default_priority;
- uint32 starttime;
- uint32 untiltime;
- uint32 status;
- uint32 cjobs;
- uint32 averageppm;
- fstring servername;
- fstring printername;
- fstring sharename;
- fstring portname;
- fstring drivername;
- pstring comment;
- fstring location;
- NT_DEVICEMODE *devmode;
- fstring sepfile;
- fstring printprocessor;
- fstring datatype;
- fstring parameters;
- NT_PRINTER_DATA data;
- SEC_DESC_BUF *secdesc_buf;
- uint32 changeid;
- uint32 c_setprinter;
- uint32 setuptime;
-} NT_PRINTER_INFO_LEVEL_2;
-
-typedef struct nt_printer_info_level
-{
- NT_PRINTER_INFO_LEVEL_2 *info_2;
-} NT_PRINTER_INFO_LEVEL;
-
-typedef struct
-{
- fstring name;
- uint32 flag;
- uint32 width;
- uint32 length;
- uint32 left;
- uint32 top;
- uint32 right;
- uint32 bottom;
-} nt_forms_struct;
-
-/*
-typedef struct _form
-{
- uint32 flags;
- uint32 name_ptr;
- uint32 size_x;
- uint32 size_y;
- uint32 left;
- uint32 top;
- uint32 right;
- uint32 bottom;
- UNISTR2 name;
-} FORM;
-*/
-
-#ifndef SAMBA_PRINTER_PORT_NAME
-#define SAMBA_PRINTER_PORT_NAME "Samba Printer Port"
-#endif
-
-/* DOS header format */
-#define DOS_HEADER_SIZE 64
-#define DOS_HEADER_MAGIC_OFFSET 0
-#define DOS_HEADER_MAGIC 0x5A4D
-#define DOS_HEADER_LFANEW_OFFSET 60
-
-/* New Executable format (Win or OS/2 1.x segmented) */
-#define NE_HEADER_SIZE 64
-#define NE_HEADER_SIGNATURE_OFFSET 0
-#define NE_HEADER_SIGNATURE 0x454E
-#define NE_HEADER_TARGET_OS_OFFSET 54
-#define NE_HEADER_TARGOS_WIN 0x02
-#define NE_HEADER_MINOR_VER_OFFSET 62
-#define NE_HEADER_MAJOR_VER_OFFSET 63
-
-/* Portable Executable format */
-#define PE_HEADER_SIZE 248
-#define PE_HEADER_SIGNATURE_OFFSET 0
-#define PE_HEADER_SIGNATURE 0x00004550
-#define PE_HEADER_MACHINE_OFFSET 4
-#define PE_HEADER_MACHINE_I386 0x14c
-#define PE_HEADER_NUMBER_OF_SECTIONS 6
-#define PE_HEADER_MAJOR_OS_VER_OFFSET 64
-#define PE_HEADER_MINOR_OS_VER_OFFSET 66
-#define PE_HEADER_MAJOR_IMG_VER_OFFSET 68
-#define PE_HEADER_MINOR_IMG_VER_OFFSET 70
-#define PE_HEADER_MAJOR_SS_VER_OFFSET 72
-#define PE_HEADER_MINOR_SS_VER_OFFSET 74
-#define PE_HEADER_SECT_HEADER_SIZE 40
-#define PE_HEADER_SECT_NAME_OFFSET 0
-#define PE_HEADER_SECT_SIZE_DATA_OFFSET 16
-#define PE_HEADER_SECT_PTR_DATA_OFFSET 20
-
-/* Microsoft file version format */
-#define VS_SIGNATURE "VS_VERSION_INFO"
-#define VS_MAGIC_VALUE 0xfeef04bd
-#define VS_MAJOR_OFFSET 8
-#define VS_MINOR_OFFSET 12
-#define VS_VERSION_INFO_UNICODE_SIZE (sizeof(VS_SIGNATURE)*2+4+VS_MINOR_OFFSET+4) /* not true size! */
-#define VS_VERSION_INFO_SIZE (sizeof(VS_SIGNATURE)+4+VS_MINOR_OFFSET+4) /* not true size! */
-#define VS_NE_BUF_SIZE 4096 /* Must be > 2*VS_VERSION_INFO_SIZE */
-
-/* Notify spoolss clients that something has changed. The
- notification data is either stored in two uint32 values or a
- variable length array. */
-
-#define SPOOLSS_NOTIFY_MSG_UNIX_JOBID 0x0001 /* Job id is unix */
-
-typedef struct spoolss_notify_msg {
- fstring printer; /* Name of printer notified */
- uint32 type; /* Printer or job notify */
- uint32 field; /* Notify field changed */
- uint32 id; /* Job id */
- uint32 len; /* Length of data, 0 for two uint32 value */
- uint32 flags;
- union {
- uint32 value[2];
- char *data;
- } notify;
-} SPOOLSS_NOTIFY_MSG;
-
-typedef struct {
- fstring printername;
- uint32 num_msgs;
- SPOOLSS_NOTIFY_MSG *msgs;
-} SPOOLSS_NOTIFY_MSG_GROUP;
-
-typedef struct {
- TALLOC_CTX *ctx;
- uint32 num_groups;
- SPOOLSS_NOTIFY_MSG_GROUP *msg_groups;
-} SPOOLSS_NOTIFY_MSG_CTR;
-
-#define PRINTER_HANDLE_IS_PRINTER 0
-#define PRINTER_HANDLE_IS_PRINTSERVER 1
-
-/* structure to store the printer handles */
-/* and a reference to what it's pointing to */
-/* and the notify info asked about */
-/* that's the central struct */
-typedef struct _Printer{
- struct _Printer *prev, *next;
- BOOL document_started;
- BOOL page_started;
- uint32 jobid; /* jobid in printing backend */
- BOOL printer_type;
- TALLOC_CTX *ctx;
- union {
- fstring handlename;
- fstring printerservername;
- } dev;
- uint32 type;
- uint32 access_granted;
- struct {
- uint32 flags;
- uint32 options;
- fstring localmachine;
- uint32 printerlocal;
- SPOOL_NOTIFY_OPTION *option;
- POLICY_HND client_hnd;
- BOOL client_connected;
- uint32 change;
- /* are we in a FindNextPrinterChangeNotify() call? */
- BOOL fnpcn;
- } notify;
- struct {
- fstring machine;
- fstring user;
- } client;
-
- /* devmode sent in the OpenPrinter() call */
- NT_DEVICEMODE *nt_devmode;
-
- /* cache the printer info */
- NT_PRINTER_INFO_LEVEL *printer_info;
-
-} Printer_entry;
-
-#endif /* NT_PRINTING_H_ */
diff --git a/source4/include/ntdomain.h b/source4/include/ntdomain.h
index 021ab115ab..813c229c6b 100644
--- a/source4/include/ntdomain.h
+++ b/source4/include/ntdomain.h
@@ -23,21 +23,9 @@
#ifndef _NT_DOMAIN_H /* _NT_DOMAIN_H */
#define _NT_DOMAIN_H
-/* dce/rpc support */
-#include "rpc_dce.h"
-
-/* miscellaneous structures / defines */
#include "rpc_misc.h"
-
#include "rpc_creds.h"
-
-#include "talloc.h"
-
-
-/* security descriptor structures */
#include "rpc_secdes.h"
-
-/* different dce/rpc pipes */
#include "rpc_lsa.h"
#include "rpc_netlogon.h"
diff --git a/source4/include/printing.h b/source4/include/printing.h
deleted file mode 100644
index 229b2e6923..0000000000
--- a/source4/include/printing.h
+++ /dev/null
@@ -1,102 +0,0 @@
-#ifndef PRINTING_H_
-#define PRINTING_H_
-
-/*
- Unix SMB/CIFS implementation.
- printing definitions
- Copyright (C) Andrew Tridgell 1992-2000
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-*/
-
-#include "includes.h"
-
-/*
- This file defines the low-level printing system interfaces used by the
- SAMBA printing subsystem.
-*/
-
-/* Information for print jobs */
-struct printjob {
- pid_t pid; /* which process launched the job */
- int sysjob; /* the system (lp) job number */
- int fd; /* file descriptor of open file if open */
- time_t starttime; /* when the job started spooling */
- int status; /* the status of this job */
- size_t size; /* the size of the job so far */
- int page_count; /* then number of pages so far */
- BOOL spooled; /* has it been sent to the spooler yet? */
- BOOL smbjob; /* set if the job is a SMB job */
- fstring filename; /* the filename used to spool the file */
- fstring jobname; /* the job name given to us by the client */
- fstring user; /* the user who started the job */
- fstring queuename; /* service number of printer for this job */
- NT_DEVICEMODE *nt_devmode;
-};
-
-/* Information for print interfaces */
-struct printif
-{
- int (*queue_get)(int snum, print_queue_struct **q,
- print_status_struct *status);
- int (*queue_pause)(int snum);
- int (*queue_resume)(int snum);
- int (*job_delete)(int snum, struct printjob *pjob);
- int (*job_pause)(int snum, struct printjob *pjob);
- int (*job_resume)(int snum, struct printjob *pjob);
- int (*job_submit)(int snum, struct printjob *pjob);
-};
-
-extern struct printif generic_printif;
-
-#ifdef HAVE_CUPS
-extern struct printif cups_printif;
-#endif /* HAVE_CUPS */
-
-/* PRINT_MAX_JOBID is now defined in local.h */
-#define UNIX_JOB_START PRINT_MAX_JOBID
-#define NEXT_JOBID(j) ((j+1) % PRINT_MAX_JOBID > 0 ? (j+1) % PRINT_MAX_JOBID : 1)
-
-#define MAX_CACHE_VALID_TIME 3600
-
-#define PRINT_SPOOL_PREFIX "smbprn."
-#define PRINT_DATABASE_VERSION 5
-
-/* There can be this many printing tdb's open, plus any locked ones. */
-#define MAX_PRINT_DBS_OPEN 1
-
-struct tdb_print_db {
- struct tdb_print_db *next, *prev;
- TDB_CONTEXT *tdb;
- int ref_count;
- fstring printer_name;
-};
-
-/*
- * Used for print notify
- */
-
-#define NOTIFY_PID_LIST_KEY "NOTIFY_PID_LIST"
-
-
-struct notify_queue {
- struct notify_queue *next, *prev;
- struct spoolss_notify_msg *msg;
- char *buf;
- size_t buflen;
-};
-
-
-#endif /* PRINTING_H_ */
diff --git a/source4/include/vt_mode.h b/source4/include/vt_mode.h
deleted file mode 100644
index 85b481122e..0000000000
--- a/source4/include/vt_mode.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/* vt_mode.h */
-/*
-support vtp-sessions
-
-written by Christian A. Lademann <cal@zls.com>
-*/
-
-/*
-02.05.95:cal:ported to samba-1.9.13
-*/
-
-#ifndef __vt_mode_h__
-# define __vt_mode_h__
-
-# define VT_CLOSED 0
-# define VT_OPEN 1
-
-# define MS_NONE 0
-# define MS_PTY 1
-# define MS_STREAM 2
-# define MS_VTY 3
-
-# define VT_MAXREAD 32
-
-
-# undef EXTERN
-
-# ifndef __vt_mode_c__
-# define EXTERN extern
-# define DEFAULT(v)
-# else
-# define EXTERN
-# define DEFAULT(v) =(v)
-# endif
-
- EXTERN int VT_Status DEFAULT(VT_CLOSED),
- VT_Fd DEFAULT(-1),
- VT_ChildPID DEFAULT(-1);
-
- EXTERN BOOL VT_Mode DEFAULT(False),
- VT_ChildDied DEFAULT(False);
-
- EXTERN char *VT_Line DEFAULT(NULL);
-
-# undef EXTERN
-
-
-#endif /* __vt_mode_h__ */