Exemplo n.º 1
0
int					/* O - Job ID or 0 on error */
cupsPrintFile(const char    *name,	/* I - Destination name */
              const char    *filename,	/* I - File to print */
	      const char    *title,	/* I - Title of job */
              int           num_options,/* I - Number of options */
	      cups_option_t *options)	/* I - Options */
{
  DEBUG_printf(("cupsPrintFile(name=\"%s\", filename=\"%s\", "
                "title=\"%s\", num_options=%d, options=%p)",
                name, filename, title, num_options, options));

  return (cupsPrintFiles2(CUPS_HTTP_DEFAULT, name, 1, &filename, title,
                          num_options, options));
}
Exemplo n.º 2
0
int					/* O - Job ID */
cupsPrintFile2(http_t        *http,	/* I - HTTP connection */
               const char    *name,	/* I - Printer or class name */
               const char    *filename,	/* I - File to print */
               const char    *title,	/* I - Title of job */
               int           num_options,
               /* I - Number of options */
               cups_option_t *options)	/* I - Options */
{
    DEBUG_printf(("cupsPrintFile2(http=%p, name=\"%s\", filename=\"%s\", "
                  "title=\"%s\", num_options=%d, options=%p)\n",
                  http, name, filename, title, num_options, options));

    return (cupsPrintFiles2(http, name, 1, &filename, title, num_options, options));
}
Exemplo n.º 3
0
int					/* O - Job ID or 0 on error */
cupsPrintFile2(
    http_t        *http,		/* I - Connection to server */
    const char    *name,		/* I - Destination name */
    const char    *filename,		/* I - File to print */
    const char    *title,		/* I - Title of job */
    int           num_options,		/* I - Number of options */
    cups_option_t *options)		/* I - Options */
{
  DEBUG_printf(("cupsPrintFile2(http=%p, name=\"%s\", filename=\"%s\", "
                "title=\"%s\", num_options=%d, options=%p)",
                http, name, filename, title, num_options, options));

  return (cupsPrintFiles2(http, name, 1, &filename, title, num_options,
                          options));
}
Exemplo n.º 4
0
int					/* O - Job ID or 0 on error */
cupsPrintFiles(
    const char    *name,		/* I - Destination name */
    int           num_files,		/* I - Number of files */
    const char    **files,		/* I - File(s) to print */
    const char    *title,		/* I - Title of job */
    int           num_options,		/* I - Number of options */
    cups_option_t *options)		/* I - Options */
{
  DEBUG_printf(("cupsPrintFiles(name=\"%s\", num_files=%d, "
                "files=%p, title=\"%s\", num_options=%d, options=%p)",
                name, num_files, files, title, num_options, options));

 /*
  * Print the file(s)...
  */

  return (cupsPrintFiles2(CUPS_HTTP_DEFAULT, name, num_files, files, title,
                          num_options, options));
}
Exemplo n.º 5
0
int					/* O - Job ID */
cupsPrintFiles(const char    *name,	/* I - Printer or class name */
               int           num_files,	/* I - Number of files */
               const char    **files,	/* I - File(s) to print */
               const char    *title,	/* I - Title of job */
               int           num_options,
               /* I - Number of options */
               cups_option_t *options)	/* I - Options */
{
    _cups_globals_t *cg = _cupsGlobals();	/* Pointer to library globals */

    DEBUG_printf(("cupsPrintFiles(name=\"%s\", num_files=%d, "
                  "files=%p, title=\"%s\", num_options=%d, options=%p)\n",
                  name, num_files, files, title, num_options, options));


    /*
     * Setup a connection and request data...
     */

    if (!cups_connect(name, NULL, NULL))
    {
        DEBUG_printf(("cupsPrintFiles: Unable to open connection - %s.\n",
                      strerror(errno)));
        DEBUG_puts("Unable to connect to server!");

        return (0);
    }

    /*
     * Print the file(s)...
     */

    return (cupsPrintFiles2(cg->http, name, num_files, files, title,
                            num_options, options));
}