⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ntptr_interface.c

📁 samba最新软件
💻 C
📖 第 1 页 / 共 2 页
字号:
/*    Unix SMB/CIFS implementation.   NTPTR interface functions   Copyright (C) Stefan (metze) Metzmacher 2005   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 3 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, see <http://www.gnu.org/licenses/>.*/#include "includes.h"#include "ntptr/ntptr.h"/* PrintServer functions */WERROR ntptr_OpenPrintServer(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,			     struct spoolss_OpenPrinterEx *r,			     const char *printer_name,			     struct ntptr_GenericHandle **server){	if (!ntptr->ops->OpenPrintServer) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->OpenPrintServer(ntptr, mem_ctx, r, printer_name, server);}WERROR ntptr_XcvDataPrintServer(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				struct spoolss_XcvData *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->XcvDataPrintServer) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->XcvDataPrintServer(server, mem_ctx, r);}/* PrintServer PrinterData functions */WERROR ntptr_EnumPrintServerData(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				 struct spoolss_EnumPrinterData *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->EnumPrintServerData) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->EnumPrintServerData(server, mem_ctx, r);}WERROR ntptr_GetPrintServerData(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				struct spoolss_GetPrinterData *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->GetPrintServerData) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->GetPrintServerData(server, mem_ctx, r);}WERROR ntptr_SetPrintServerData(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				struct spoolss_SetPrinterData *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->SetPrintServerData) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->SetPrintServerData(server, mem_ctx, r);}WERROR ntptr_DeletePrintServerData(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				   struct spoolss_DeletePrinterData *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->DeletePrintServerData) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->DeletePrintServerData(server, mem_ctx, r);}/* PrintServer Form functions */WERROR ntptr_EnumPrintServerForms(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				  struct spoolss_EnumForms *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->EnumPrintServerForms) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->EnumPrintServerForms(server, mem_ctx, r);}WERROR ntptr_AddPrintServerForm(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				struct spoolss_AddForm *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->AddPrintServerForm) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->AddPrintServerForm(server, mem_ctx, r);}WERROR ntptr_SetPrintServerForm(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				struct spoolss_SetForm *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->SetPrintServerForm) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->SetPrintServerForm(server, mem_ctx, r);}WERROR ntptr_DeletePrintServerForm(struct ntptr_GenericHandle *server, TALLOC_CTX *mem_ctx,				   struct spoolss_DeleteForm *r){	if (server->type != NTPTR_HANDLE_SERVER) {		return WERR_FOOBAR;	}	if (!server->ntptr->ops->DeletePrintServerForm) {		return WERR_NOT_SUPPORTED;	}	return server->ntptr->ops->DeletePrintServerForm(server, mem_ctx, r);}/* PrintServer Driver functions */WERROR ntptr_EnumPrinterDrivers(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,				struct spoolss_EnumPrinterDrivers *r){	if (!ntptr->ops->EnumPrinterDrivers) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->EnumPrinterDrivers(ntptr, mem_ctx, r);}WERROR ntptr_AddPrinterDriver(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,			      struct spoolss_AddPrinterDriver *r){	if (!ntptr->ops->AddPrinterDriver) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->AddPrinterDriver(ntptr, mem_ctx, r);}WERROR ntptr_DeletePrinterDriver(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,				 struct spoolss_DeletePrinterDriver *r){	if (!ntptr->ops->DeletePrinterDriver) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->DeletePrinterDriver(ntptr, mem_ctx, r);}WERROR ntptr_GetPrinterDriverDirectory(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,				 struct spoolss_GetPrinterDriverDirectory *r){	if (!ntptr->ops->GetPrinterDriverDirectory) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->GetPrinterDriverDirectory(ntptr, mem_ctx, r);}/* Port functions */WERROR ntptr_EnumPorts(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,		       struct spoolss_EnumPorts *r){	if (!ntptr->ops->EnumPorts) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->EnumPorts(ntptr, mem_ctx, r);}WERROR ntptr_OpenPort(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,		      struct spoolss_OpenPrinterEx *r,		      const char *port_name,		      struct ntptr_GenericHandle **port){	if (!ntptr->ops->OpenPort) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->OpenPort(ntptr, mem_ctx, r, port_name, port);}WERROR ntptr_XcvDataPort(struct ntptr_GenericHandle *port, TALLOC_CTX *mem_ctx,			 struct spoolss_XcvData *r){	if (port->type != NTPTR_HANDLE_PORT) {		return WERR_FOOBAR;	}	if (!port->ntptr->ops->XcvDataPort) {		return WERR_NOT_SUPPORTED;	}	return port->ntptr->ops->XcvDataPort(port, mem_ctx, r);}/* Monitor functions */WERROR ntptr_EnumMonitors(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,			  struct spoolss_EnumMonitors *r){	if (!ntptr->ops->EnumMonitors) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->EnumMonitors(ntptr, mem_ctx, r);}WERROR ntptr_OpenMonitor(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,			 struct spoolss_OpenPrinterEx *r,			 const char *monitor_name,			 struct ntptr_GenericHandle **monitor){	if (!ntptr->ops->OpenMonitor) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->OpenMonitor(ntptr, mem_ctx, r, monitor_name, monitor);}WERROR ntptr_XcvDataMonitor(struct ntptr_GenericHandle *monitor, TALLOC_CTX *mem_ctx,			    struct spoolss_XcvData *r){	if (monitor->type != NTPTR_HANDLE_MONITOR) {		return WERR_FOOBAR;	}	if (!monitor->ntptr->ops->XcvDataMonitor) {		return WERR_NOT_SUPPORTED;	}	return monitor->ntptr->ops->XcvDataMonitor(monitor, mem_ctx, r);}/* PrintProcessor functions */WERROR ntptr_EnumPrintProcessors(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,				 struct spoolss_EnumPrintProcessors *r){	if (!ntptr->ops->EnumPrintProcessors) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->EnumPrintProcessors(ntptr, mem_ctx, r);}/* Printer functions */WERROR ntptr_EnumPrinters(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,			  struct spoolss_EnumPrinters *r){	if (!ntptr->ops->EnumPrinters) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->EnumPrinters(ntptr, mem_ctx, r);}WERROR ntptr_OpenPrinter(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,			 struct spoolss_OpenPrinterEx *r,			 const char *printer_name,			 struct ntptr_GenericHandle **printer){	if (!ntptr->ops->OpenPrinter) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->OpenPrinter(ntptr, mem_ctx, r, printer_name, printer);}WERROR ntptr_AddPrinter(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,			struct spoolss_AddPrinter *r,			struct ntptr_GenericHandle **printer){	if (!ntptr->ops->AddPrinter) {		return WERR_NOT_SUPPORTED;	}	return ntptr->ops->AddPrinter(ntptr, mem_ctx, r, printer);}WERROR ntptr_GetPrinter(struct ntptr_context *ntptr, TALLOC_CTX *mem_ctx,

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -