kmimetype.cpp
299 if (accurate) *accurate = !(_fast_mode) || ((mime->patternsAccuracy() == 100) && mime != defaultMimeTypePtr());
372 kdWarning(7009) << "mimetype not valid '" << m_strName << "' (missing entry in the file ?)" << endl;
380 kdWarning(7009) << "mimetype not valid '" << m_strName << "' (missing entry in the file ?)" << endl;
517 // and for the root of the protocol (e.g. trash:/) the protocol icon has priority over the mimetype icon
837 TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
883 TQString tmp = i18n("The desktop entry file\n%1\nis of type Link but has no URL=... entry.").arg( _url.prettyURL() );
920 TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::builtinServices( const KURL& _url )
939 TQString tmp = i18n("The desktop entry file\n%1\nis of type FSDevice but has no Dev=... entry.").arg( _url.path() );
973 TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, bool bLocalFiles )
979 TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, TDEConfig& cfg, bool bLocalFiles )
984 TQValueList<KDEDesktopMimeType::Service> KDEDesktopMimeType::userDefinedServices( const TQString& path, TDEConfig& cfg, bool bLocalFiles, const KURL::List & file_list )
1016 kdWarning() << "Desktop file " << path << " contains an invalid X-TDE-ShowIfDcopCall - the function must take the exact parameter (KURL::List) and must be specified." << endl;
1079 TQString tmp = i18n("The desktop entry file\n%1\n has an invalid menu entry\n%2.").arg( path ).arg( *it );
1087 void KDEDesktopMimeType::executeService( const TQString& _url, KDEDesktopMimeType::Service& _service )
1096 void KDEDesktopMimeType::executeService( const KURL::List& urls, KDEDesktopMimeType::Service& _service )
1104 KRun::run( _service.m_strExec, urls, _service.m_strName, _service.m_strIcon, _service.m_strIcon );
KMimeType(const TQString &_fullpath, const TQString &_type, const TQString &_icon, const TQString &_comment, const TQStringList &_patterns)
Constructor.
Definition: kmimetype.cpp:359
Represent a mime type, like "text/plain", and the data that is associated with it.
Definition: kmimetype.h:47
KMimeMagicResult * findBufferType(const TQByteArray &p)
Same functionality as above, except data is not read from a file.
Definition: kmimemagic.cpp:289
static Ptr findByPath(const TQString &path, mode_t mode=0, bool fast_mode=false)
Finds a KMimeType with the given _url.
Definition: kmimetype.cpp:308
static bool supportsListing(const KURL &url)
Returns whether the protocol can list files/objects.
Definition: kprotocolinfo.cpp:121
A service type is the generic notion for a mimetype, a type of service instead of a type of file.
Definition: kservicetype.h:45
TQString parentMimeType() const
If this mimetype inherits from ("is also") another mimetype, return the name of the parent.
Definition: kmimetype.cpp:561
TQString comment() const
Returns the descriptive comment associated with the MIME type.
Definition: kmimetype.h:202
virtual TQVariant property(const TQString &_name) const
Returns the property with the given _name.
Definition: kmimetype.cpp:437
This class implements synchronous unmounting of devices, It is a wrapper around the asychronous TDEIO...
Definition: kautomount.h:86
static TQString defaultMimetype(const KURL &url)
Returns default mimetype for this URL based on the protocol.
Definition: kprotocolinfo.cpp:249
static Ptr findByURL(const KURL &_url, mode_t _mode=0, bool _is_local_file=false, bool _fast_mode=false)
Finds a KMimeType with the given _url.
Definition: kmimetype.cpp:165
virtual TQStringList propertyNames() const
Returns the list of all properties of this service type.
Definition: kservicetype.cpp:191
virtual TQVariant property(const TQString &_name) const
Returns the requested property.
Definition: kservicetype.cpp:171
static Ptr findByContent(const TQByteArray &data, int *accuracy=0)
Tries to find out the MIME type of a data chunk by looking for certain magic numbers and characterist...
Definition: kmimetype.cpp:315
bool inherits(const TQString &servTypeName) const
Checks whether this service type is or inherits from servTypeName.
Definition: kservicetype.cpp:154
static bool determineMimetypeFromExtension(const TQString &protocol)
Returns whether mimetypes can be determined based on extension for this protocol.
KMimeMagicResult * findFileType(const TQString &_filename)
Try to find a MimeType for the given file.
Definition: kmimemagic.cpp:360
static pid_t run(const KURL &_url, bool _is_local)
Invokes the default action for the desktop entry.
Definition: kmimetype.cpp:790
Definition: kmimemagic.h:46
static TQPixmap pixmapForURL(const KURL &_url, mode_t _mode=0, TDEIcon::Group _group=TDEIcon::Desktop, int _force_size=0, int _state=0, TQString *_path=0L)
Convenience method to find the pixmap for a URL.
Definition: kmimetype.cpp:489
static TQString iconForURL(const KURL &_url, mode_t _mode=0)
The same functionality as pixmapForURL(), but this method returns the name of the icon to load.
Definition: kmimetype.cpp:507
virtual TQPixmap pixmap(const KURL &_url, TDEIcon::Group _group, int _force_size=0, int _state=0, TQString *_path=0L) const
Find the pixmap for a given file of this mimetype.
Definition: kmimetype.cpp:756
static Ptr mimeType(const TQString &_name)
Retrieve a pointer to the mime type _name or a pointer to the default mime type "application/octet-st...
Definition: kmimetype.cpp:141
virtual TQStringList propertyNames() const
Retrieves a list of all properties associated with this KMimeType.
Definition: kmimetype.cpp:445
static pid_t runURL(const KURL &_url, const TQString &_mimetype, bool tempFile, bool runExecutables)
Open the given URL.
Definition: krun.cpp:94
Structure representing a service, in the list of services returned by builtinServices and userDefined...
Definition: kmimetype.h:517
static KMimeMagic * self()
Returns a pointer to the unique KMimeMagic instance in this process.
Definition: kmimemagic.cpp:49
static pid_t run(const KService &_service, const KURL::List &_urls, TQWidget *window, bool tempFiles=false)
Open a list of URLs with a certain service (application).
Definition: krun.cpp:759
static Format findFormatByFileContent(const TQString &fileName)
Returns whether a file has an internal format that is human readable, or that would be human readable...
Definition: kmimetype.cpp:334
bool is(const TQString &mimeTypeName) const
Do not use name()=="somename" anymore, to check for a given mimetype.
Definition: kmimetype.cpp:567
static TQValueList< Service > builtinServices(const KURL &_url)
Returns a list of services for the given .desktop file that are handled by tdeio itself.
Definition: kmimetype.cpp:920
static void checkEssentialMimeTypes()
This function makes sure that vital mime types are installed.
Definition: kmimetype.cpp:97
TDEIO_EXPORT TQString findDeviceMountPoint(const TQString &device)
Returns the mount point where device is mounted right now.
Definition: global.cpp:1401
static void buildDefaultType()
This function makes sure that the default mime type exists.
Definition: kmimetype.cpp:68
static const TQString & defaultMimeType()
Returns the name of the default mimetype.
Definition: kmimetype.cpp:1160
static Ptr findByFileContent(const TQString &fileName, int *accuracy=0)
Tries to find out the MIME type of a file by looking for certain magic numbers and characteristic str...
Definition: kmimetype.cpp:323
virtual TQPixmap pixmap(TDEIcon::Group group, int force_size=0, int state=0, TQString *path=0L) const
Use this function only if you don't have a special URL for which you search a pixmap.
Definition: kmimetype.cpp:457
static TQValueList< Service > userDefinedServices(const TQString &path, bool bLocalFiles)
Returns a list of services defined by the user as possible actions on the given .desktop file.
Definition: kmimetype.cpp:973
static TQString favIconForURL(const KURL &url)
Return the "favicon" (see http://www.favicon.com) for the given url, if available.
Definition: kmimetype.cpp:536
This class implements synchronous mounting of devices, as well as showing a file-manager window after...
Definition: kautomount.h:41
static void executeService(const TQString &path, KDEDesktopMimeType::Service &service) KDE_DEPRECATED
Definition: kmimetype.cpp:1087
static void errorMissingMimeType(const TQString &_type)
Signal a missing mime type.
Definition: kmimetype.cpp:134
static TQString icon(const TQString &protocol)
Returns the name of the icon, associated with the specified protocol.
TQString icon() const
Returns the icon associated with this service type.
Definition: kservicetype.h:94