| 4085 | */ |
| 4086 | |
| 4087 | static int /* O - 1 to continue, 0 to stop */ |
| 4088 | cups_get_cb(_cups_getdata_t *data, /* I - Data from cupsGetDests */ |
| 4089 | unsigned flags, /* I - Enumeration flags */ |
| 4090 | cups_dest_t *dest) /* I - Destination */ |
| 4091 | { |
| 4092 | if (flags & CUPS_DEST_FLAGS_REMOVED) |
| 4093 | { |
| 4094 | /* |
| 4095 | * Remove destination from array... |
| 4096 | */ |
| 4097 | |
| 4098 | data->num_dests = cupsRemoveDest(dest->name, dest->instance, data->num_dests, &data->dests); |
| 4099 | } |
| 4100 | else |
| 4101 | { |
| 4102 | /* |
| 4103 | * Add destination to array... |
| 4104 | */ |
| 4105 | |
| 4106 | data->num_dests = cupsCopyDest(dest, data->num_dests, &data->dests); |
| 4107 | } |
| 4108 | |
| 4109 | return (1); |
| 4110 | } |
| 4111 | |
| 4112 | |
| 4113 | /* |
nothing calls this directly
no test coverage detected