Logo Search packages:      
Sourcecode: samba-doc-ja version File versions

int smbc_open_print_job ( const char *  fname  ) 

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 ...

Parameters:
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

Definition at line 2479 of file libsmbclient.c.

References smbc_open().

Referenced by smbc_print_file().

{
      fstring server, share, user, password;
      pstring path;
      
      if (!smbc_initialized) {

            errno = EINVAL;
            return -1;
    
      }

      if (!fname) {

            errno = EINVAL;
            return -1;

      }
  
      DEBUG(4, ("smbc_open_print_job(%s)\n", fname));

      smbc_parse_path(fname, server, share, path, user, password); /*FIXME, errors*/

      /* What if the path is empty, or the file exists? */

      return smbc_open(fname, O_WRONLY, 666);

}


Generated by  Doxygen 1.6.0   Back to index