Home | History | Annotate | Download | only in cups

Lines Matching defs:instance

154 static cups_dest_t	*cups_add_dest(const char *name, const char *instance,
234 static int cups_find_dest(const char *name, const char *instance,
239 size_t namesize, const char **instance);
254 * destination or instance.
257 * returned unchanged. Adding a new instance of a destination creates
266 const char *instance, /* I - Instance name or @code NULL@ for none/primary */
280 if (!cupsGetDest(name, instance, num_dests, *dests))
282 if (instance && !cupsGetDest(name, NULL, num_dests, *dests))
285 if ((dest = cups_add_dest(name, instance, &num_dests, dests)) == NULL)
294 if (instance && parent && parent->num_options > 0)
830 if ((new_dest = cupsGetDest(dest->name, dest->instance, num_dests,
850 new_dest = cups_add_dest(dest->name, dest->instance, &num_dests, dests);
855 return (cupsRemoveDest(dest->name, dest->instance, num_dests, dests));
1042 _cupsStrFree(dest->instance);
1060 const char *instance, /* I - Instance name or @code NULL@ */
1089 * Lookup name and optionally the instance...
1092 match = cups_find_dest(name, instance, num_dests, dests, -1, &diff);
1252 * Use the service instance name...
1639 *instance, /* Pointer to instance name */
1734 * Separate printer and instance name...
1737 if ((instance = strchr(name, '/')) != NULL)
1738 *instance++ = '\0';
1741 * Lookup the printer and instance and make it the default...
1744 if ((dest = cupsGetDest(name, instance, data.num_dests, data.dests)) != NULL)
1748 instance = NULL;
1789 data.num_dests = cupsRemoveDest(dest->name, dest->instance, data.num_dests, &data.dests);
1839 const char *instance) /* I - Instance name or @code NULL@ */
1852 DEBUG_printf(("cupsGetNamedDest(http=%p, name=\"%s\", instance=\"%s\")", (void *)http, name, instance));
1872 instance = ptr;
1875 instance = NULL;
1885 dest_name = cups_get_default(filename, defname, sizeof(defname), &instance);
1895 dest_name = cups_get_default(filename, defname, sizeof(defname), &instance);
1940 if (instance)
1941 dest->instance = _cupsStrAlloc(instance);
1951 cups_get_dests(filename, dest_name, instance, 1, 1, &dest);
1957 cups_get_dests(filename, dest_name, instance, 1, 1, &dest);
1971 * Removing a destination/instance does not delete the class or printer
1972 * queue, merely the lpoptions for that destination/instance. Use the
1981 const char *instance, /* I - Instance name or @code NULL@ */
1993 if ((dest = cupsGetDest(name, instance, num_dests, *dests)) == NULL)
2001 _cupsStrFree(dest->instance);
2028 const char *instance, /* I - Instance name or @code NULL@ */
2050 ((!instance && !dest->instance) ||
2051 (instance && dest->instance &&
2052 !_cups_strcasecmp(instance, dest->instance)));
2180 * Dest name[/instance] options
2181 * Default name[/instance] options
2185 if (dest->instance != NULL || dest->num_options != 0 || dest->is_default)
2190 if (dest->instance)
2191 fprintf(fp, "/%s", dest->instance);
2198 if ((temp = cupsGetDest(dest->name, dest->instance, num_temps, temps)) == NULL)
2229 if (dest->instance)
2230 fprintf(fp, "/%s", dest->instance);
2544 const char *instance, /* I - Instance or NULL */
2575 insert = cups_find_dest(name, instance, *num_dests, *dests, *num_dests - 1,
2597 dest->instance = _cupsStrAlloc(instance);
2635 else if (a->instance && b->instance)
2636 return (_cups_strcasecmp(a->instance, b->instance));
2638 return ((a->instance && !b->instance) - (!a->instance && b->instance));
3552 *instance, /* Pointer to instance name */
3633 * Separate printer and instance name...
3636 if ((instance = strchr(name, '/')) != NULL)
3637 *instance++ = '\0';
3640 * Lookup the printer and instance and make it the default...
3643 if ((dest = cupsGetDest(name, instance, num_dests, dests)) != NULL)
3659 if (!dest->instance && (device_uri = cupsGetOption("device-uri", dest->num_options, dest->options)) != NULL && !strncmp(device_uri, "dnssd://", 8))
3984 const char *instance, /* I - Instance or NULL */
3998 key.instance = (char *)instance;
4096 data->num_dests = cupsRemoveDest(dest->name, dest->instance, data->num_dests, &data->dests);
4119 const char **instance) /* I - Instance */
4148 *instance = nameptr;
4168 const char *match_inst, /* I - Instance name we want */
4179 *instance; /* Instance of destination */
4195 * Dest name[/instance] options
4196 * Default name[/instance] options
4219 * Search for an instance...
4228 * Found an instance...
4232 instance = lineptr;
4235 * Search for an instance...
4242 instance = NULL;
4247 DEBUG_printf(("9cups_get_dests: name=\"%s\", instance=\"%s\"", name,
4248 instance));
4251 * See if the primary instance of the destination exists; if not,
4258 (!instance && match_inst) ||
4259 (instance && !match_inst) ||
4260 (instance && _cups_strcasecmp(instance, match_inst)))
4276 num_dests = cupsAddDest(name, instance, num_dests, dests);
4278 if ((dest = cupsGetDest(name, instance, num_dests, *dests)) == NULL)
4428 if (!(flags & CUPS_DEST_FLAGS_REMOVED) && !dest->instance && !strcasecmp(data->name, dest->name))