Retrieve a printer's CAPS Printer Device Parameter Directory.
More...
The base functions to work with the library and discover a printer device's specific CAPS Printer Device Parameter Directory.
◆ caps_si_create()
Initialize the library prior use
- Returns
- Library instance to be used by all other functions in this library
- Note
- Does not return in case of memory failure
- Postcondition
- The returned library instance handle needs to be freed after use via caps_si_destroy()
◆ caps_si_destroy()
Clean up resources
- Parameters
-
- Note
- This call will also close error message catching. Refer Error message handling for details.
◆ caps_si_char_device_node_check()
int caps_si_char_device_node_check |
( |
struct caps_si_handle * |
h, |
|
|
const char * |
f |
|
) |
| |
Check, if the given path/filename is a character device node
- Parameters
-
[in] | h | Library instance |
[in] | f | Path to check |
- Return values
-
1 | f points to a character device node |
0 | f doesn't point to a character device node |
-EINVAL | f is invalid |
- Precondition
- h must be a valid library instance handle returned by caps_si_create() call
◆ caps_si_dir_from_node_retrieve()
char * caps_si_dir_from_node_retrieve |
( |
struct caps_si_handle * |
h, |
|
|
const char * |
f |
|
) |
| |
◆ caps_si_dir_from_name_retrieve()
char * caps_si_dir_from_name_retrieve |
( |
struct caps_si_handle * |
h, |
|
|
const char * |
n |
|
) |
| |
Retrieve the CAPS Printer Device Parameter Directory from the printer's name
- Parameters
-
[in] | h | Library instance |
[in] | n | Name of the printer like the capsprinter list command returns it |
- Return values
-
- Note
- This function creates readable error messages (refer caps_si_error_messages_catch())
- Precondition
n
must be a name string
-
h must be a valid library instance handle returned by caps_si_create() call
- Postcondition
- The returned directory path string must be freed after use.