}
fprintf(stderr, "DEBUG: (monitor) job-state = %s\n",
- ippEnumString("job-state", monitor->job_state));
+ ippEnumString("job-state", (int)monitor->job_state));
if (!job_canceled &&
(monitor->job_state == IPP_JSTATE_CANCELED ||
ippDelete(response);
fprintf(stderr, "DEBUG: (monitor) job-state = %s\n",
- ippEnumString("job-state", monitor->job_state));
+ ippEnumString("job-state", (int)monitor->job_state));
if (!job_canceled &&
(monitor->job_state == IPP_JSTATE_CANCELED ||
f;
f = (_pwg_finishings_t *)cupsArrayNext(pc->finishings))
{
- DEBUG_printf(("_ppdCacheGetFinishingValues: Checking %d (%s)", f->value, ippEnumString("finishings", f->value)));
+ DEBUG_printf(("_ppdCacheGetFinishingValues: Checking %d (%s)", (int)f->value, ippEnumString("finishings", (int)f->value)));
for (i = f->num_options, option = f->options; i > 0; i --, option ++)
{
if (i == 0)
{
- DEBUG_printf(("_ppdCacheGetFinishingValues: Adding %d (%s)", f->value, ippEnumString("finishings", f->value)));
+ DEBUG_printf(("_ppdCacheGetFinishingValues: Adding %d (%s)", (int)f->value, ippEnumString("finishings", (int)f->value)));
- values[num_values ++] = f->value;
+ values[num_values ++] = (int)f->value;
if (num_values >= max_values)
break;
* Setup printer/job attributes...
*/
- Duplex = header->Duplex;
+ Duplex = (int)header->Duplex;
ColorBits = header->cupsBitsPerColor;
if ((!Duplex || (Page & 1)) && header->MediaPosition)
ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job->id);
ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_ENUM, "job-state",
- job->state_value);
+ (int)job->state_value);
ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_TEXT, "job-state-message", NULL, "");
ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-state-reasons",
NULL, job->reasons->values[0].string.text);
* Cancel all jobs on all printers...
*/
- cupsdCancelJobs(NULL, username, purge);
+ cupsdCancelJobs(NULL, username, (int)purge);
cupsdLogMessage(CUPSD_LOG_INFO, "All jobs were %s by \"%s\".",
purge == CUPSD_JOB_PURGE ? "purged" : "canceled",
* Cancel all of the jobs on the named printer...
*/
- cupsdCancelJobs(printer->name, username, purge);
+ cupsdCancelJobs(printer->name, username, (int)purge);
cupsdLogMessage(CUPSD_LOG_INFO, "All jobs on \"%s\" were %s by \"%s\".",
printer->name,
ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", job->id);
ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_ENUM, "job-state",
- job->state_value);
+ (int)job->state_value);
con->response->request.status.status_code = IPP_OK;
if (!ra || cupsArrayFind(ra, "printer-state"))
ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state",
- printer->state);
+ (int)printer->state);
if (!ra || cupsArrayFind(ra, "printer-state-change-date-time"))
ippAddDate(con->response, IPP_TAG_PRINTER, "printer-state-change-date-time", ippTimeToDate(printer->state_time));
add_printer_attributes:
ippAddBoolean(con->response, IPP_TAG_PRINTER, "printer-is-accepting-jobs", (char)printer->accepting);
- ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", printer->state);
+ ippAddInteger(con->response, IPP_TAG_PRINTER, IPP_TAG_ENUM, "printer-state", (int)printer->state);
add_printer_state_reasons(con, printer);
httpAssembleURIf(HTTP_URI_CODING_ALL, uri, sizeof(uri), httpIsEncrypted(con->http) ? "ipps" : "ipp", NULL, con->clientname, con->clientport, "/printers/%s", printer->name);
ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_INTEGER, "job-id", jobid);
ippAddInteger(con->response, IPP_TAG_JOB, IPP_TAG_ENUM, "job-state",
- job->state_value);
+ (int)job->state_value);
ippAddString(con->response, IPP_TAG_JOB, IPP_TAG_KEYWORD, "job-state-reasons",
NULL, job->reasons->values[0].string.text);
job->state_value = newstate;
if (job->state)
- job->state->values[0].integer = newstate;
+ job->state->values[0].integer = (int)newstate;
switch (newstate)
{
for (fin = (_pwg_finishings_t *)cupsArrayFirst(p->pc->finishings); fin; fin = (_pwg_finishings_t *)cupsArrayNext(p->pc->finishings))
{
if (num_finishings < (int)(sizeof(finishings) / sizeof(finishings[0])))
- finishings[num_finishings++] = fin->value;
+ finishings[num_finishings++] = (int)fin->value;
switch (fin->value)
{
"printer-name", NULL, dest->name);
ippAddInteger(temp->attrs, IPP_TAG_EVENT_NOTIFICATION, IPP_TAG_ENUM,
- "printer-state", dest->state);
+ "printer-state", (int)dest->state);
if (dest->num_reasons == 0)
ippAddString(temp->attrs, IPP_TAG_EVENT_NOTIFICATION,
ippAddInteger(temp->attrs, IPP_TAG_EVENT_NOTIFICATION, IPP_TAG_INTEGER,
"notify-job-id", job->id);
ippAddInteger(temp->attrs, IPP_TAG_EVENT_NOTIFICATION, IPP_TAG_ENUM,
- "job-state", job->state_value);
+ "job-state", (int)job->state_value);
if ((attr = ippFindAttribute(job->attrs, "job-name",
IPP_TAG_NAME)) != NULL)
*/
if (expressions && expressions->parent)
- logic = expressions->parent->op;
+ logic = (int)expressions->parent->op;
else
logic = IPPFIND_OP_AND;
httpClose(http);
_cupsLangPrintf(stdout, "%s %s %s %s", service->uri,
- ippEnumString("printer-state", pstate),
+ ippEnumString("printer-state", (int)pstate),
paccepting ? "accepting-jobs" : "not-accepting-jobs",
preasons);
}
if (!ra || cupsArrayFind(ra, "job-state"))
ippAddInteger(client->response, IPP_TAG_JOB, IPP_TAG_ENUM,
- "job-state", job->state);
+ "job-state", (int)job->state);
if (!ra || cupsArrayFind(ra, "job-state-message"))
{
if (!ra || cupsArrayFind(ra, "printer-state"))
ippAddInteger(client->response, IPP_TAG_PRINTER, IPP_TAG_ENUM,
- "printer-state", printer->state);
+ "printer-state", (int)printer->state);
if (!ra || cupsArrayFind(ra, "printer-state-change-date-time"))
ippAddDate(client->response, IPP_TAG_PRINTER, "printer-state-change-date-time", ippTimeToDate(printer->state_time));
group = attrptr ? attrptr->group_tag : IPP_TAG_ZERO;
attrptr;
attrptr = attrptr->next)
- print_attr(outfile, Output, attrptr, &group);
+ print_attr(outfile, (int)Output, attrptr, &group);
cupsFilePuts(outfile, "</dict>\n");
}
cupsFilePuts(outfile, "</array>\n");
group = attrptr ? attrptr->group_tag : IPP_TAG_ZERO;
attrptr;
attrptr = attrptr->next)
- print_attr(outfile, Output, attrptr, &group);
+ print_attr(outfile, (int)Output, attrptr, &group);
cupsFilePuts(outfile, "</dict>\n");
cupsFilePuts(outfile, "</array>\n");
}
{
if (!strcmp(displayed[i], attrptr->name))
{
- print_attr(outfile, Output, attrptr, NULL);
+ print_attr(outfile, (int)Output, attrptr, NULL);
break;
}
}