Lines Matching refs:type

47 	\brief A parsed sniffer rule and its corresponding mime type and rule string
100 return left.type > right.type;
141 /*! \brief Guesses a MIME type for the supplied entry_ref.
148 \param type Pointer to a pre-allocated BString which is set to the
149 resulting MIME type.
152 - \c Mime::kMimeGuessFailure: no match found (\a type is left unmodified)
156 SnifferRules::GuessMimeType(const entry_ref *ref, BString *type)
158 status_t err = ref && type ? B_OK : B_BAD_VALUE;
190 err = GuessMimeType(&file, buffer, bytes, type);
198 /*! \brief Guesses a MIME type for the given chunk of data.
205 \param type Pointer to a pre-allocated BString which is set to the
206 resulting MIME type.
209 - \c Mime::kMimeGuessFailure: no match found (\a type is left unmodified)
213 SnifferRules::GuessMimeType(const void *buffer, int32 length, BString *type)
215 return GuessMimeType(NULL, buffer, length, type);
219 /*! Updates the sniffer rule for the given type
221 If the a rule currently exists in the rule list for the given type,
226 \param type The type of interest
233 SnifferRules::SetSnifferRule(const char *type, const char *rule)
235 status_t err = type && rule ? B_OK : B_BAD_VALUE;
247 item.type = type;
254 // Remove any previous rule for this type
256 err = DeleteSnifferRule(type);
277 /*! \brief Removes the sniffer rule for the given type from the rule list
278 \param type The type of interest
280 - \c B_OK: success (even if no rule existed for the given type)
284 SnifferRules::DeleteSnifferRule(const char *type)
286 status_t err = type ? B_OK : B_BAD_VALUE;
293 if (i->type == type) {
315 printf("%s: '%s'\n", i->type.c_str(), i->rule_string.c_str());
418 /*! \brief Guesses a MIME type for the supplied chunk of data.
430 \param type Pointer to a pre-allocated BString which is set to the
431 resulting MIME type.
434 - \c Mime::kMimeGuessFailure: no match found (\a type is left unmodified)
439 BString *type)
441 status_t err = buffer && type ? B_OK : B_BAD_VALUE;
451 // first ask the MIME sniffer for a suitable type
466 // If an add-on identified the type with a priority at least
468 // processing and return the type found by the add-on.
470 *type = mimeType.Type();
475 type->SetTo(i->type.c_str());
480 "NULL sniffer_rule::rule member found in rule list for type == '%s', "
482 i->type.c_str(), i->rule_string.c_str()));
489 *type = mimeType.Type();
528 the given mime type.
532 \param type The mime type of interest. The mime string is expected to be valid
545 SnifferRules::ProcessType(const char *type, ssize_t *bytesNeeded)
547 status_t err = type && bytesNeeded ? B_OK : B_BAD_VALUE;
560 err = fDatabaseLocation->ReadStringAttribute(type, kSnifferRuleAttr,
574 rule.type = type;