kio Library API Documentation

KServiceTypeFactory Class Reference

Inheritance diagram for KServiceTypeFactory:

Inheritance graph
[legend]
Collaboration diagram for KServiceTypeFactory:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 KServiceTypeFactory ()
virtual ~KServiceTypeFactory ()
virtual KSycocaEntrycreateEntry (const QString &, const char *)
virtual KServiceTypefindServiceTypeByName (const QString &_name)
QVariant::Type findPropertyTypeByName (const QString &_name)
KMimeTypefindFromPattern (const QString &_filename, QString *match=0)
KMimeType::List allMimeTypes ()
KServiceType::List allServiceTypes ()
bool checkMimeTypes ()

Static Public Member Functions

static KServiceTypeFactoryself ()

Protected Member Functions

virtual KServiceTypecreateEntry (int offset)
virtual void virtual_hook (int id, void *data)

Protected Attributes

int m_fastPatternOffset
int m_otherPatternOffset
QMap< QString, int > m_propertyTypeDict

Detailed Description

Definition at line 45 of file kservicetypefactory.h.


Constructor & Destructor Documentation

KServiceTypeFactory::KServiceTypeFactory  ) 
 

Create factory.

Definition at line 33 of file kservicetypefactory.cpp.

References KSycoca::flagError(), QMap::insert(), m_fastPatternOffset, m_otherPatternOffset, m_propertyTypeDict, KSycocaFactory::m_str, and KSycocaEntry::read().

Referenced by self().


Member Function Documentation

virtual KSycocaEntry* KServiceTypeFactory::createEntry const QString ,
const char * 
[inline, virtual]
 

Not meant to be called at this level.

Implements KSycocaFactory.

Definition at line 59 of file kservicetypefactory.h.

Referenced by findFromPattern(), and findServiceTypeByName().

KServiceType * KServiceTypeFactory::findServiceTypeByName const QString _name  )  [virtual]
 

Find a service type in the database file (allocates it) Overloaded by KBuildServiceTypeFactory to return a memory one.

Definition at line 80 of file kservicetypefactory.cpp.

References createEntry(), KSycocaDict::find_string(), KSycocaFactory::m_sycocaDict, KServiceType::name(), KSycocaFactory::offset(), and KSycoca::self().

Referenced by KMimeType::mimeType(), KServiceType::offers(), KServiceType::parentType(), and KServiceType::serviceType().

QVariant::Type KServiceTypeFactory::findPropertyTypeByName const QString _name  ) 
 

Find a the property type of a named property.

Definition at line 98 of file kservicetypefactory.cpp.

References QMapConstIterator::data(), QMap::end(), QMap::find(), m_propertyTypeDict, KSycocaFactory::m_sycocaDict, and KSycoca::self().

Referenced by KService::property().

KMimeType * KServiceTypeFactory::findFromPattern const QString _filename,
QString match = 0
 

Find a mimetype from a filename (using the pattern list).

Parameters:
match if provided, returns the pattern that matched.

Definition at line 113 of file kservicetypefactory.cpp.

References QValueVector::begin(), QString::compare(), createEntry(), QDataStream::device(), QString::findRev(), QString::isEmpty(), KSycocaEntry::isType(), QString::leftJustify(), QString::length(), m_fastPatternOffset, m_otherPatternOffset, KSycocaFactory::m_str, KStringHandler::matchFileName(), QValueVector::push_back(), KSycocaEntry::read(), QString::right(), and QValueVector::size().

Referenced by KMimeType::diagnoseFileName(), KMimeType::findByURL(), and KFilePropsPlugin::KFilePropsPlugin().

KMimeType::List KServiceTypeFactory::allMimeTypes  ) 
 

Returns:
all mimetypes Slow and memory consuming, avoid using

Definition at line 214 of file kservicetypefactory.cpp.

References KSycocaFactory::allEntries(), QValueList::append(), QValueList::begin(), QValueList::end(), and QValueList< Ptr >::Iterator().

Referenced by KMimeType::allMimeTypes().

KServiceType::List KServiceTypeFactory::allServiceTypes  ) 
 

Returns:
all servicetypes Slow and memory consuming, avoid using

Definition at line 229 of file kservicetypefactory.cpp.

References KSycocaFactory::allEntries(), QValueList::append(), QValueList::begin(), QValueList::end(), and QValueList< Ptr >::Iterator().

Referenced by KServiceType::allServiceTypes().

bool KServiceTypeFactory::checkMimeTypes  ) 
 

Returns:
true if at least one mimetype is present Safety test

Definition at line 248 of file kservicetypefactory.cpp.

References KSycocaFactory::factoryId(), KSycoca::findFactory(), KSycocaFactory::m_beginEntryOffset, KSycocaFactory::m_endEntryOffset, and KSycoca::self().

KServiceTypeFactory * KServiceTypeFactory::self  )  [static]
 

Returns:
the unique servicetype factory, creating it if necessary

Definition at line 73 of file kservicetypefactory.cpp.

References KServiceTypeFactory().

Referenced by KMimeType::allMimeTypes(), KServiceType::allServiceTypes(), KMimeType::buildDefaultType(), KMimeType::checkEssentialMimeTypes(), KMimeType::diagnoseFileName(), KMimeType::findByURL(), KFilePropsPlugin::KFilePropsPlugin(), KMimeType::mimeType(), KServiceType::offers(), KServiceType::parentType(), KService::property(), and KServiceType::serviceType().


The documentation for this class was generated from the following files:
KDE Logo
This file is part of the documentation for kio Library Version 3.4.2.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Sep 16 06:59:08 2005 by doxygen 1.4.4 written by Dimitri van Heesch, © 1997-2003