libsmbclient
Functions
Print Functions
Libsmbclient

Functions

int smbc_print_file (const char *fname, const char *printq)
int smbc_open_print_job (const char *fname)
int smbc_list_print_jobs (const char *purl, smbc_list_print_job_fn fn)
int smbc_unlink_print_job (const char *purl, int id)

Detailed Description

Functions used to access printing functionality


Function Documentation

int smbc_list_print_jobs ( const char *  purl,
smbc_list_print_job_fn  fn 
)

List the print jobs on a print share, for the moment, pass a callback

Parameters:
purlThe url of the print share to list the jobs of
fnCallback function the receives printjob info
Returns:
0 on success, < 0 on error with errno set:
  • EINVAL fname was NULL or smbc_init not called
  • EACCES ???
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:
fnameThe 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_print_file ( const char *  fname,
const char *  printq 
)

Print a file given the name in fname. It would be a URL ...

Parameters:
fnameThe URL of a file on a remote SMB server that the caller wants printed
printqThe URL of the print share to print the file to.
Returns:
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_unlink_print_job ( const char *  purl,
int  id 
)

Delete a print job

Parameters:
purlUrl of the print share
idThe id of the job to delete
Returns:
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?
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines