|
|
Represents a service, i.e. an application bound to one or several mimetypes (or servicetypes) as written in its desktop entry file. A service may be a library, too. The starting point you need is often the static methods.
|
Construct a service and take all informations from a config file
Parameters:
_fullpath | full path to the config file |
_relpath | relative path wrt to $KDEDIRS/+resource |
|
Construct a service and take all informations from a desktop file
|
The stream must already be positionned at the correct offset
QString |
[const virtual]
Returns: the type of the service ("Application" or "Service").
QString |
[const virtual]
Returns: the name of the service.
Reimplemented from KSycocaEntry
QString |
[const]
Returns: the command that the service executes.
QString |
[const]
Returns: the name of the library that contains the services implementation.
int |
[const]
Returns: the major number of the library.
See also: library, libraryMinor
int |
[const]
Returns: the minor number of the library.
See also: library, libraryMajor
QStringList |
[const]
Returns: the libraries on which this service depends. That is only of interest if the service itelf is a library.
QString |
[const]
Returns: the icon associated with the service.
QPixmap |
[const]
Returns: a pixmap for this service (finds and loads icon())
bool |
[const]
Returns: Run the service in a terminal?
QString |
[const]
Returns: any options associated with the terminal the service runs in, if it requires a terminal. The service must be a tty-oriented program).
bool |
[const]
Returns: If the service has to be run under a different uid.
QString |
[const]
Returns: The username as which the service has to be run.
QString |
[const]
This is a relative path if the desktop entry was found in any of the locations pointed to by $KDEDIRS (e.g. "Internet/kppp.desktop") It is a full path if the desktop entry originates from another location.
Returns: the path to the location where the service desktop entry is stored.
QString |
[const]
Returns: the filename of the service desktop entry without any extension. E.g. "kppp"
enum |
DCOPServiceType_t |
[const]
Returns: The DCOPServiceType supported by this service.
QString |
[const]
Returns: the working directory to run the program in
QString |
[const]
Returns: the descriptive comment for the service, if there is one.
QStringList |
[const]
Returns: the service types that this service supports
bool |
[const]
Parameters:
_service | is the name of the service type you are interested in determining whether this services supports. |
Returns: TRUE if the service you specified is supported, otherwise FALSE.
bool |
[const]
Returns: TRUE if the service may be used as a default setting, for example in a file manager. Usually that is the case, but some services may only be started when the user selected them. This kind of services returns FALSE here.
QVariant |
[const virtual]
It depends upon the serviceTypes of this service which properties a service can have.
Returns: the requested properties. Some often used properties have convenience access functions like exec, serviceTypes etc.
QStringList |
[const virtual]
Returns: the list of all properties that this service can have. That means, that some properties may be empty.
bool |
[const]
Returns: true if the service is valid (e.g. name is not empty)
Reimplemented from KSycocaEntry
void |
[virtual]
Load the service from a stream.
Reimplemented from KSycocaEntry
void |
[virtual]
Save the service to a stream.
Reimplemented from KSycocaEntry
int |
Starts a service.
Parameters:
URL | - if not empty this URL is passed to the service |
Returns: On failure, 'error' contains a description of the error that occured.
Ptr |
[static]
Returns: a pointer to the requested service or 0 if the service is unknown. VERY IMPORTANT : don't store the result in a KService * !
Ptr |
[static]
Returns: a pointer to the requested service or 0 if the service is unknown. VERY IMPORTANT : don't store the result in a KService * !
Ptr |
[static]
Returns: a pointer to the requested service or 0 if the service is unknown. VERY IMPORTANT : don't store the result in a KService * !
Ptr |
[static]
Returns: a pointer to the requested service or 0 if the service is unknown. VERY IMPORTANT : don't store the result in a KService * !
List |
[static]
Returns: the whole list of services. Useful for being able to to display them in a list box, for example. Very memory consuming, don't use unless really necessary.