/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2013 Nexenta Systems, Inc. All rights reserved.
*/
/*
* SMB print interface.
*/
#include <smbsrv/smb_kproto.h>
#include <smbsrv/smb_share.h>
/*
* Starts the creation of a new printer file, which will be deleted
* automatically once it has been closed and printed.
*
* SetupLength is the number of bytes in the first part of the resulting
* print spool file which contains printer-specific control strings.
*
* Mode can have the following values:
* 0 Text mode. The server may optionally
* expand tabs to a series of spaces.
* 1 Graphics mode. No conversion of data
* should be done by the server.
*
* IdentifierString can be used by the server to provide some sort of
* per-client identifying component to the print file.
*
* When the file is closed, it will be sent to the spooler and printed.
*/
{
char *path;
char *identifier;
int rc;
if (rc == 0)
if (rc == 0) {
}
struct open_param *, op);
}
void
{
}
/*
* Creates a new spool file which will be later copied and
* deleted by cupsd. After the file is created, information
* related to the file will be placed in a spooldoc list
* to be later used by cupsd
*
* Return values
* rc 0 SDRC_SUCCESS
* rc non-zero SDRC_ERROR
*/
{
int rc;
return (SDRC_ERROR);
}
return (SDRC_ERROR);
}
return (SDRC_ERROR);
}
/* sp->sd_spool_num set by smb_spool_add_doc() */
}
}
/*
* Close the specified file handle and queue the file for printing.
* The fid refers to a file previously created as a print spool file.
* On successful completion of this request, the file is queued for
* printing by the server.
*
* Servers that negotiate LANMAN1.0 or later allow all the the fid
* to be closed and printed via any close request.
*/
{
int rc;
}
void
{
}
/*
*
* Adds the print file fid to a list to be used as a search
* key in the spooldoc list. It then wakes up the smbd
* spool monitor thread to copy the spool file.
*
* Return values
* rc - 0 success
*
*/
{
/*
* If sv_cfg.skc_print_enable somehow went false while
* we have a print FID open, close the FID. In this
* situation, smb_spool_add_fid() will do nothing.
*/
return (SDRC_ERROR);
}
return (rc);
}
/*
* Get a list of print queue entries on the server. Support for
* this request is optional (not required for Windows clients).
*/
{
return (SDRC_SUCCESS);
}
void
{
}
{
return (SDRC_ERROR);
return (SDRC_ERROR);
return (SDRC_SUCCESS);
}
/*
* Write (append) data to a print spool file. The fid must refer to
* a print spool file.
*
* The first SetupLength bytes (see SMB_COM_OPEN_PRINT_FILE) in the
* print spool file contain printer setup data.
*
* Servers that negotiate LANMAN1.0 or later also support the use of
* normal write requests with print spool files.
*/
{
int rc;
}
void
{
}
{
int rc;
return (SDRC_ERROR);
}
return (SDRC_ERROR);
}
if (rc != 0) {
return (SDRC_ERROR);
}
return (SDRC_ERROR);
}
return (SDRC_ERROR);
}
}