kmobiletools
KMobileTools::ServiceLoader Class Reference
#include <serviceloader.h>

Detailed Description
Definition at line 36 of file serviceloader.h.
Public Slots | |
| void | loadServices (const QString &deviceName) |
| void | unloadServices (const QString &deviceName) |
Signals | |
| void | aboutToUnloadService (const QString &deviceName, KMobileTools::CoreService *service) |
| void | serviceLoaded (const QString &deviceName, KMobileTools::CoreService *service) |
| void | serviceUnloaded (const QString &deviceName, KMobileTools::CoreService *service) |
Public Member Functions | |
| QList < KMobileTools::CoreService * > | service (const QString &deviceName, const QStringList &interfaces=QStringList()) const |
| ~ServiceLoader () | |
Static Public Member Functions | |
| static ServiceLoader * | instance () |
Constructor & Destructor Documentation
| KMobileTools::ServiceLoader::~ServiceLoader | ( | ) |
Definition at line 59 of file serviceloader.cpp.
Member Function Documentation
| void KMobileTools::ServiceLoader::aboutToUnloadService | ( | const QString & | deviceName, | |
| KMobileTools::CoreService * | service | |||
| ) | [signal] |
| ServiceLoader * KMobileTools::ServiceLoader::instance | ( | ) | [static] |
Returns a ServiceLoader instance.
- Returns:
- a service loader instance
Definition at line 53 of file serviceloader.cpp.
| void KMobileTools::ServiceLoader::loadServices | ( | const QString & | deviceName | ) | [slot] |
Tries to load services for the device with given deviceName Please note that loading services requires an already loaded device.
- Parameters:
-
deviceName a unique device name
Definition at line 71 of file serviceloader.cpp.
| QList< KMobileTools::CoreService * > KMobileTools::ServiceLoader::service | ( | const QString & | deviceName, | |
| const QStringList & | interfaces = QStringList() | |||
| ) | const |
Returns a list of services associated with the device which implement a given list of interfaces.
Please note that the services must have been loaded in advance.
- Parameters:
-
deviceName the device name interfaces a list of service interfaces that the service should implement
- Returns:
- a list of pointers to the services if available, else an empty QList
- Todo:
- implement me
Definition at line 142 of file serviceloader.cpp.
| void KMobileTools::ServiceLoader::serviceLoaded | ( | const QString & | deviceName, | |
| KMobileTools::CoreService * | service | |||
| ) | [signal] |
This signal is emitted whenever a service for the device was loaded.
- Parameters:
-
deviceName the device for which the service was loaded service the service that was loaded
| void KMobileTools::ServiceLoader::serviceUnloaded | ( | const QString & | deviceName, | |
| KMobileTools::CoreService * | service | |||
| ) | [signal] |
This signal is emitted when a service was unloaded.
- Warning:
- The returned service pointer is invalid! Use it to identify any reference to a service by address
- Parameters:
-
deviceName the device for which the service was unloaded service the service that was unloaded
| void KMobileTools::ServiceLoader::unloadServices | ( | const QString & | deviceName | ) | [slot] |
Tries to unload the services for the device with given deviceName.
- Parameters:
-
deviceName the device name
- Warning:
- deleting the service here could cause a problem since a slot that is connected to the aboutToUnloadService signal could work with the service while it could become invalid
Definition at line 122 of file serviceloader.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference