Lines Matching refs:type

47 	MIME type.
48 The supplied string must specify a valid MIME type or supertype.
68 /*! \brief Initializes this object to the supplied MIME type.
69 The supplied string must specify a valid MIME type or supertype.
143 /*! \brief Returns whether the object represents a valid MIME type.
176 //! Returns whether or not this type is currently installed in the MIME database
177 /*! To add the MIME type to the database, call \c Install().
178 To remove the MIME type from the database, call \c Delete().
181 - \c true: The MIME type is currently installed in the database
182 - \c false: The MIME type is not currently installed in the database
191 /*! \brief Returns the supertype of the MIME type represented by this object.
229 /*! \brief Returns whether this and the supplied MIME type are equal.
232 \param type The BMimeType to be compared with.
236 BMimeType::operator==(const BMimeType &type) const
241 if (InitCheck() == B_OK && type.InitCheck() == B_OK) {
244 err = toLower(type.Type(), lower2);
248 } else if (InitCheck() == B_NO_INIT && type.InitCheck() == B_NO_INIT) {
256 /*! \brief Returns whether this and the supplied MIME type are equal.
260 \param type The MIME string to be compared with.
264 BMimeType::operator==(const char *type) const
267 if (type)
268 mime.SetTo(type);
273 /*! \brief Returns whether this MIME type is a supertype of or equals the
275 \param type The MIME type.
276 \return \c true, if this MIME type is a supertype of or equals the
280 BMimeType::Contains(const BMimeType *type) const
282 if (!type)
284 if (*this == *type)
287 if (type->GetSupertype(&super) == B_OK && *this == super)
293 /*! \brief Returns whether the given string represents a valid MIME type.
295 \return \c true, if the given string represents a valid MIME type.
344 /*! \brief Initializes this object to the supplied MIME type.
356 BMimeType::GuessMimeType(const entry_ref *ref, BMimeType *type)
358 if (!ref || !type)
371 // check entry type
373 return type->SetType("application/x-vnd.be-directory");
375 return type->SetType("application/x-vnd.be-symlink");
384 return GuessMimeType(buffer, 4, type);
388 return type->SetType(B_FILE_MIME_TYPE);
393 BMimeType::GuessMimeType(const void *_buffer, int32 length, BMimeType *type)
396 if (!buffer || !type)
402 return type->SetType(B_ELF_APP_MIME_TYPE);
405 return type->SetType(B_FILE_MIME_TYPE);
410 BMimeType::GuessMimeType(const char *filename, BMimeType *type)
412 if (!filename || !type)
417 return (error == B_OK ? GuessMimeType(&ref, type) : error);