Home | History | Annotate | Download | only in cups

Lines Matching refs:instance

134 static cups_dest_t	*cups_add_dest(const char *name, const char *instance,
212 static int cups_find_dest(const char *name, const char *instance,
216 size_t namesize, const char **instance);
229 * destination or instance.
232 * returned unchanged. Adding a new instance of a destination creates
241 const char *instance, /* I - Instance name or @code NULL@ for none/primary */
255 if (!cupsGetDest(name, instance, num_dests, *dests))
257 if (instance && !cupsGetDest(name, NULL, num_dests, *dests))
260 if ((dest = cups_add_dest(name, instance, &num_dests, dests)) == NULL)
269 if (instance && parent && parent->num_options > 0)
787 if ((new_dest = cupsGetDest(dest->name, dest->instance, num_dests,
807 new_dest = cups_add_dest(dest->name, dest->instance, &num_dests, dests);
812 return (cupsRemoveDest(dest->name, dest->instance, num_dests, dests));
911 * receives the @code user_data@ pointer, destination name, instance, number of
938 *instance, /* Pointer to instance name */
996 * Separate printer and instance name...
999 if ((instance = strchr(name, '/')) != NULL)
1000 *instance++ = '\0';
1003 * Lookup the printer and instance and make it the default...
1006 if ((dest = cupsGetDest(name, instance, num_dests, dests)) != NULL)
1246 * destination name, instance, number of options, and options which can be used
1289 _cupsStrFree(dest->instance);
1307 const char *instance, /* I - Instance name or @code NULL@ */
1336 * Lookup name and optionally the instance...
1339 match = cups_find_dest(name, instance, num_dests, dests, -1, &diff);
1467 * Use the service instance name...
1833 *instance, /* Pointer to instance name */
1899 * Separate printer and instance name...
1902 if ((instance = strchr(name, '/')) != NULL)
1903 *instance++ = '\0';
1906 * Lookup the printer and instance and make it the default...
1909 if ((dest = cupsGetDest(name, instance, num_dests, *dests)) != NULL)
1913 instance = NULL;
1956 num_dests = cupsRemoveDest(dest->name, dest->instance, num_dests,
2003 const char *instance) /* I - Instance name or @code NULL@ */
2031 instance = ptr;
2034 instance = NULL;
2044 name = cups_get_default(filename, defname, sizeof(defname), &instance);
2055 name = cups_get_default(filename, defname, sizeof(defname), &instance);
2075 if (instance)
2076 dest->instance = _cupsStrAlloc(instance);
2086 cups_get_dests(filename, name, instance, 1, 1, &dest);
2092 cups_get_dests(filename, name, instance, 1, 1, &dest);
2106 * Removing a destination/instance does not delete the class or printer
2107 * queue, merely the lpoptions for that destination/instance. Use the
2116 const char *instance, /* I - Instance name or @code NULL@ */
2128 if ((dest = cupsGetDest(name, instance, num_dests, *dests)) == NULL)
2136 _cupsStrFree(dest->instance);
2163 const char *instance, /* I - Instance name or @code NULL@ */
2185 ((!instance && !dest->instance) ||
2186 (instance && dest->instance &&
2187 !_cups_strcasecmp(instance, dest->instance)));
2313 * Dest name[/instance] options
2314 * Default name[/instance] options
2318 if (dest->instance != NULL || dest->num_options != 0 || dest->is_default)
2323 if (dest->instance)
2324 fprintf(fp, "/%s", dest->instance);
2331 if ((temp = cupsGetDest(dest->name, dest->instance, num_temps, temps)) == NULL)
2362 if (dest->instance)
2363 fprintf(fp, "/%s", dest->instance);
2677 const char *instance, /* I - Instance or NULL */
2708 insert = cups_find_dest(name, instance, *num_dests, *dests, *num_dests - 1,
2730 dest->instance = _cupsStrAlloc(instance);
2768 else if (a->instance && b->instance)
2769 return (_cups_strcasecmp(a->instance, b->instance));
2771 return ((a->instance && !b->instance) - (!a->instance && b->instance));
3629 const char *instance, /* I - Instance or NULL */
3643 key.instance = (char *)instance;
3734 const char **instance) /* I - Instance */
3763 *instance = nameptr;
3783 const char *match_inst, /* I - Instance name we want */
3794 *instance; /* Instance of destination */
3810 * Dest name[/instance] options
3811 * Default name[/instance] options
3834 * Search for an instance...
3843 * Found an instance...
3847 instance = lineptr;
3850 * Search for an instance...
3857 instance = NULL;
3862 DEBUG_printf(("9cups_get_dests: name=\"%s\", instance=\"%s\"", name,
3863 instance));
3866 * See if the primary instance of the destination exists; if not,
3873 (!instance && match_inst) ||
3874 (instance && !match_inst) ||
3875 (instance && _cups_strcasecmp(instance, match_inst)))
3891 num_dests = cupsAddDest(name, instance, num_dests, dests);
3893 if ((dest = cupsGetDest(name, instance, num_dests, *dests)) == NULL)