Lines Matching refs:device

86     ESCL_Device *device;
182 escl_free_device(handler->device);
186 SANE_Status escl_parse_name(SANE_String_Const name, ESCL_Device *device);
298 DBG (10, "New device allocation failure.\n");
419 DBG( 1, "Escl add device : %s\n", tmp);
478 * This function will first close all device handles that still might be open.
504 * Thus, this function parses the config' file to use the device of the user with the information below :
518 if (strncmp(line, "device", 6) == 0) {
557 if (strncmp(line, "[device]", 8) == 0) {
1135 escl_parse_name(SANE_String_Const name, ESCL_Device *device)
1140 if (name == NULL || device == NULL) {
1149 device->unix_socket = strndup(socket, name - socket);
1154 device->https = SANE_TRUE;
1155 device->type = strdup("https");
1158 device->https = SANE_FALSE;
1159 device->type = strdup("http");
1172 device->port_nb = atoi(port_str);
1173 if (device->port_nb < 1 || device->port_nb > 65535) {
1178 device->ip_address = strndup(host, port_str - host - 1);
1183 _get_hack(SANE_String_Const name, ESCL_Device *device)
1188 if (device->model_name &&
1189 (strcasestr(device->model_name, "LaserJet FlowMFP M578") ||
1190 strcasestr(device->model_name, "LaserJet MFP M630"))) {
1191 device->hack = curl_slist_append(NULL, "Host: localhost");
1206 * used are device to try to attach
1213 DBG (3, "_get_hack: device found\n");
1214 device->hack = curl_slist_append(NULL, "Host: localhost");
1241 * used are device to try to attach
1259 * \brief Function that establishes a connection with the device named by 'name',
1277 ESCL_Device *device = calloc(1, sizeof(ESCL_Device));
1278 if (device == NULL) {
1279 DBG (10, "Handle device allocation failure.\n");
1282 status = escl_parse_name(name, device);
1284 escl_free_device(device);
1290 escl_free_device(device);
1293 handler->device = device; // Handler owns device now.
1295 handler->scanner = escl_capabilities(device, blacklist, &status);
1300 _get_hack(name, device);
1329 * pending operation of the device represented by 'SANE_Handle h'.
1344 escl_scanner(handler->device, handler->scanner->scanJob, handler->result);
1353 * \brief Function that closes the communication with the device represented by 'SANE_Handle h'.
1541 * \brief Function that initiates acquisition of an image from the device represented by handle 'h'.
1556 if (handler->device == NULL) {
1557 DBG(1, "Missing handler device.\n");
1565 SANE_Status st = escl_status(handler->device,
1698 handler->result = escl_newjob(handler->scanner, handler->device, &status);
1705 SANE_Status st = escl_status(handler->device,
1716 status = escl_scan(handler->scanner, handler->device, handler->scanner->scanJob, handler->result);
1758 * \brief Function that retrieves the device parameters represented by 'h' and stores them in 'p'.
1787 * \brief Function that's used to read image data from the device represented by handle 'h'.
1838 SANE_Status st = escl_status(handler->device,
1866 * \fn void escl_curl_url(CURL *handle, const ESCL_Device *device, SANE_String_Const path)
1867 * \brief Uses the device info in 'device' and the path from 'path' to construct
1872 escl_curl_url(CURL *handle, const ESCL_Device *device, SANE_String_Const path)
1878 (device->https ? "https" : "http"), device->ip_address,
1879 device->port_nb, path);
1883 (device->https ? "https" : "http"), device->ip_address,
1884 device->port_nb, path);
1890 if (device->hack) {
1892 curl_easy_setopt(handle, CURLOPT_HTTPHEADER, device->hack);
1895 if (device->https) {
1899 if (device->tls > 0)
1900 curl_easy_setopt(handle, CURLOPT_SSLVERSION, device->tls);
1902 if (device->unix_socket != NULL) {
1903 DBG( 1, "Using local socket %s\n", device->unix_socket );
1905 device->unix_socket);