Qt API | Qtopia API | Qtopia Documentation |

# Service Class Reference

The Service class allows applications to provide services for other applications to use. More...

`#include <qtopia/services.h>`

List of all member functions.

## Static Public Members

- QStringList list ()
- QString binding ( const QString & service )
- QStringList apps ( const QString & service, bool automatics = TRUE )
- QString app ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )
- QString appConfig ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )
- QString config ( const QString & service )
- QStrList channels ( const QString & service, bool automatics = TRUE )
- QCString channel ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )
- AppLnk appLnk ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )

## Detailed Description

The Service class allows applications to provide services for other applications to use.

A Service is a named collection of features that an application may choose to provide. For example, web browsers might each provide the feature of displaying a web page given a URL.

Services allow the providers of a service (eg. a web browser) from the consumers of the service (eg. a mail reader that wanted the user to view a URL).

See also ServiceRequest and Qtopia Classes.

## Member Function Documentation

### QString Service::app ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )`[static]`

Returns the application that provides the service, or a null string if there is no such service.

If appname is provided, a specific binding to that application may be used rather than the global binding.

If automatics is TRUE (the default), and the service is not otherwise defined, the MimeType database and application executables are also searched for a service provider. The search of application executables is solely for backward compatibility.

### QString Service::appConfig ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )`[static]`

Returns the Config file defining the facilities provided by application that provides the service, or a null string if there is no such service.

The Config can be used to extract more detailed application-specific information about the application providing the service.

Note that the application always provides at least the services defined in the config() file - the information in the appConfig() is application-specific.

If appname is provided, a specific binding to that application may be used rather than the global binding.

If automatics is TRUE (the default), and the service is not otherwise defined, the MimeType database and application executables are also searched for a service provider. The search of application executables is solely for backward compatibility.

### AppLnk Service::appLnk ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )`[static]`

Returns an AppLnk to an application providing the service. If appname is provided, a specific binding to that application may be used rather than the global binding.

If automatics is TRUE (the default), the MimeType database and application executables are also searched for service providers. The search of application executables is solely for backward compatibility.

### QStringList Service::apps ( const QString & service, bool automatics = TRUE )`[static]`

Returns all applications that offer the service, or a null string if there is no such service offered.

If automatics is TRUE (the default), the MimeType database and application executables are also searched for service providers. The search of application executables is solely for backward compatibility.

### QString Service::binding ( const QString & service )`[static]`

Returns the name of the Config file defining the bindings which the user has selected for the service.

### QCString Service::channel ( const QString & service, const QString & appname = QString::null, bool automatics = TRUE )`[static]`

Returns the QCop channel for the given service, or a null string if there is no such service.

If appname is provided, a specific binding to that application may be used rather than the global binding.

If automatics is TRUE (the default), and the service is not otherwise defined, the MimeType database and application executables are also searched for a service provider. The search of application executables is solely for backward compatibility.

### QStrList Service::channels ( const QString & service, bool automatics = TRUE )`[static]`

Returns the QCop channels for all applications that offer service.

If automatics is TRUE (the default), and the service is not otherwise defined, the MimeType database and application executables are also searched for a service provider. The search of application executables is solely for backward compatibility.

### QString Service::config ( const QString & service )`[static]`

Returns the name of the Config file defining the facilities that are provided by all applications that provide the service, or a null string if there is no such service.

Applications providing the service may have additional configuration defined in the appConfig()) file.

### QStringList Service::list ()`[static]`

Returns a list of available services.

This file is part of the Qtopia , copyright © 1995-2002 Trolltech, all rights reserved.