Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 1699

qt-mobility-doc-1.2.0-13.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qservicemanager.cpp -->
  <title>Qt Mobility 1.2: QServiceManager Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtserviceframework.html">QtServiceFramework</a></li>
<li>QServiceManager</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QServiceManager Class Reference</h1>
<!-- $$$QServiceManager-brief -->
<p>The QServiceManager class enables the loading of service plugins and the (de)registration of services. <a href="#details">More...</a></p>
<!-- @@@QServiceManager -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QServiceManager&gt;</span></pre><p><b>Inherits: </b><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a>.</p>
<p>This class was introduced in Qt Mobility 1.0.</p>
<ul>
<li><a href="qservicemanager-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#Error-enum">Error</a></b> { NoError, StorageAccessError, InvalidServiceLocation, InvalidServiceXml, ..., UnknownError }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#QServiceManager">QServiceManager</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#QServiceManager-2">QServiceManager</a></b> ( QService::Scope <i>scope</i>, QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#dtor.QServiceManager">~QServiceManager</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#addService">addService</a></b> ( const QString &amp; <i>xmlFilePath</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#addService-2">addService</a></b> ( QIODevice * <i>device</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> Error </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#error">error</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QServiceInterfaceDescriptor&gt; </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#findInterfaces">findInterfaces</a></b> ( const QServiceFilter &amp; <i>filter</i> = QServiceFilter() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QServiceInterfaceDescriptor&gt; </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#findInterfaces-2">findInterfaces</a></b> ( const QString &amp; <i>serviceName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#findServices">findServices</a></b> ( const QString &amp; <i>interfaceName</i> = QString() ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QServiceInterfaceDescriptor </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#interfaceDefault">interfaceDefault</a></b> ( const QString &amp; <i>interfaceName</i> ) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QObject * </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#loadInterface">loadInterface</a></b> ( const QString &amp; <i>interfaceName</i>, QServiceContext * <i>context</i> = 0, QAbstractSecuritySession * <i>session</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QObject * </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#loadInterface-2">loadInterface</a></b> ( const QServiceInterfaceDescriptor &amp; <i>descriptor</i>, QServiceContext * <i>context</i> = 0, QAbstractSecuritySession * <i>session</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T * </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#loadLocalTypedInterface">loadLocalTypedInterface</a></b> ( const QString &amp; <i>interfaceName</i>, QServiceContext * <i>context</i> = 0, QAbstractSecuritySession * <i>session</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> T * </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#loadLocalTypedInterface-2">loadLocalTypedInterface</a></b> ( const QServiceInterfaceDescriptor &amp; <i>serviceDescriptor</i>, QServiceContext * <i>context</i> = 0, QAbstractSecuritySession * <i>session</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#removeService">removeService</a></b> ( const QString &amp; <i>serviceName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QService::Scope </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#scope">scope</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#setInterfaceDefault">setInterfaceDefault</a></b> ( const QString &amp; <i>service</i>, const QString &amp; <i>interfaceName</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#setInterfaceDefault-2">setInterfaceDefault</a></b> ( const QServiceInterfaceDescriptor &amp; <i>descriptor</i> )</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#serviceAdded">serviceAdded</a></b> ( const QString &amp; <i>serviceName</i>, QService::Scope <i>scope</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qservicemanager.html#serviceRemoved">serviceRemoved</a></b> ( const QString &amp; <i>serviceName</i>, QService::Scope <i>scope</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-slots">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-variables">QObject</a></li>
<li class="fn">4 static public members inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#static-public-members">QObject</a></li>
<li class="fn">7 protected functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QServiceManager-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QServiceManager class enables the loading of service plugins and the (de)registration of services.</p>
<p>A service is a stand-alone component that can be used by multiple clients. Each service implementation must derive from <a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a>. Clients request a reference to a service via <a href="qservicemanager.html#loadInterface">loadInterface</a>() or <a href="qservicemanager.html#loadLocalTypedInterface">loadLocalTypedInterface</a>().</p>
<p>Services are separate deliveries in the form of plug-ins. New services can be (de)registered at any time via <a href="qservicemanager.html#addService">addService</a>() and <a href="qservicemanager.html#removeService">removeService</a>() respectively. Such an event is published via the <a href="qservicemanager.html#serviceAdded">serviceAdded</a>() and <a href="qservicemanager.html#serviceRemoved">serviceRemoved</a>() signal. Each service plug-in must implement <a href="qserviceplugininterface.html">QServicePluginInterface</a>.</p>
<p>Each plug-in may support multiple interfaces and may even provide multiple implementations for the same interface. Individual implementations are identified via <a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a>. For a more detailed explanation of services and how they relate to interface and their implementations please see <a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a>.</p>
</div>
<p><b>See also </b><a href="qserviceplugininterface.html">QServicePluginInterface</a>, <a href="qservicecontext.html">QServiceContext</a>, and <a href="qabstractsecuritysession.html">QAbstractSecuritySession</a>.</p>
<!-- @@@QServiceManager -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$NoError$$$StorageAccessError$$$InvalidServiceLocation$$$InvalidServiceXml$$$InvalidServiceInterfaceDescriptor$$$ServiceAlreadyExists$$$ImplementationAlreadyExists$$$PluginLoadingFailed$$$ComponentNotFound$$$ServiceCapabilityDenied$$$UnknownError -->
<h3 class="fn"><a name="Error-enum"></a>enum QServiceManager::<span class="name">Error</span></h3>
<p>Defines the possible errors for the service manager.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QServiceManager::NoError</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">No error occurred.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::StorageAccessError</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The service data storage is not accessible. This could be because the caller does not have the required permissions.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::InvalidServiceLocation</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The service was not found at its specified <a href="qserviceinterfacedescriptor.html#Attribute-enum">location</a>.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::InvalidServiceXml</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">The XML defining the service metadata is invalid.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::InvalidServiceInterfaceDescriptor</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">The service interface descriptor is invalid, or refers to an interface implementation that cannot be accessed in the current scope.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::ServiceAlreadyExists</tt></td><td class="topAlign"><tt>5</tt></td><td class="topAlign">Another service has previously been registered with the same <a href="qserviceinterfacedescriptor.html#Attribute-enum">location</a>.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::ImplementationAlreadyExists</tt></td><td class="topAlign"><tt>6</tt></td><td class="topAlign">Another service that implements the same interface version has previously been registered.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::PluginLoadingFailed</tt></td><td class="topAlign"><tt>7</tt></td><td class="topAlign">The service plugin cannot be loaded.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::ComponentNotFound</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">The service or interface implementation has not been registered.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::ServiceCapabilityDenied</tt></td><td class="topAlign"><tt>9</tt></td><td class="topAlign">The security session does not permit service access based on its capabilities.</td></tr>
<tr><td class="topAlign"><tt>QServiceManager::UnknownError</tt></td><td class="topAlign"><tt>100</tt></td><td class="topAlign">An unknown error occurred.</td></tr>
</table>
<!-- @@@Error -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QServiceManager[overload1]$$$QServiceManagerQObject* -->
<h3 class="fn"><a name="QServiceManager"></a>QServiceManager::<span class="name">QServiceManager</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Creates a service manager with the given <i>parent</i>.</p>
<p>The scope will default to <a href="qservice.html#Scope-enum">QService::UserScope</a>.</p>
<!-- @@@QServiceManager -->
<!-- $$$QServiceManager$$$QServiceManagerQService::ScopeQObject* -->
<h3 class="fn"><a name="QServiceManager-2"></a>QServiceManager::<span class="name">QServiceManager</span> ( <span class="type"><a href="qservice.html#Scope-enum">QService::Scope</a></span> <i>scope</i>, <span class="type"><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a></span> * <i>parent</i> = 0 )</h3>
<p>Creates a service manager with the given <i>scope</i> and <i>parent</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@QServiceManager -->
<!-- $$$~QServiceManager[overload1]$$$~QServiceManager -->
<h3 class="fn"><a name="dtor.QServiceManager"></a>QServiceManager::<span class="name">~QServiceManager</span> ()</h3>
<p>Destroys the service manager.</p>
<!-- @@@~QServiceManager -->
<!-- $$$addService[overload1]$$$addServiceconstQString& -->
<h3 class="fn"><a name="addService"></a><span class="type">bool</span> QServiceManager::<span class="name">addService</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>xmlFilePath</i> )</h3>
<p>Registers the service defined by the XML file at <i>xmlFilePath</i>. Returns true if the registration succeeded, and false otherwise.</p>
<p>If a previously unkown interface is added the newly registered service automatically becomes the new default service provider for the new interface.</p>
<p>A service plugin cannot be added if another service is already registered with the same plugin file path. A service plugin also cannot be added if the service is already registered and implements any of the same interface versions that the new plugin implements.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#removeService">removeService</a>() and <a href="qservicemanager.html#setInterfaceDefault">setInterfaceDefault</a>().</p>
<!-- @@@addService -->
<!-- $$$addService$$$addServiceQIODevice* -->
<h3 class="fn"><a name="addService-2"></a><span class="type">bool</span> QServiceManager::<span class="name">addService</span> ( <span class="type"><a href="http://qt.nokia.com/doc/4.7/qiodevice.html">QIODevice</a></span> * <i>device</i> )</h3>
<p>Registers the service defined by the XML data from the given <i>device</i>. Returns true if the registration succeeded, and false otherwise. If a previously unkown interface is added the newly registered service automatically becomes the new default service provider for the new interface.</p>
<p>Registering a service also causes <a href="qserviceplugininterface.html#installService">QServicePluginInterface::installService</a>() to be called on the service. If the service plugin is not accessible (e.g&#x2e; if the plugin file is not found) and <tt>installService()</tt> cannot be invoked on the service, the registration fails and this method returns false.</p>
<p>A service plugin cannot be added if another service is already registered with the same plugin file path. A service plugin also cannot be added if the service is already registered and implements any of the same interface versions that the new plugin implements.</p>
<p>Services are always added based on the <a href="qservicemanager.html#scope">scope</a>() of the current service manager instance.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#removeService">removeService</a>() and <a href="qservicemanager.html#setInterfaceDefault">setInterfaceDefault</a>().</p>
<!-- @@@addService -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn"><a name="error"></a><span class="type"><a href="qservicemanager.html#Error-enum">Error</a></span> QServiceManager::<span class="name">error</span> () const</h3>
<p>Returns the type of error that last occurred.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@error -->
<!-- $$$findInterfaces[overload1]$$$findInterfacesconstQServiceFilter& -->
<h3 class="fn"><a name="findInterfaces"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span>&lt;<span class="type"><a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a></span>&gt; QServiceManager::<span class="name">findInterfaces</span> ( const <span class="type"><a href="qservicefilter.html">QServiceFilter</a></span> &amp; <i>filter</i> = QServiceFilter() ) const</h3>
<p>Returns a list of the interfaces that match the specified <i>filter</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@findInterfaces -->
<!-- $$$findInterfaces$$$findInterfacesconstQString& -->
<h3 class="fn"><a name="findInterfaces-2"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span>&lt;<span class="type"><a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a></span>&gt; QServiceManager::<span class="name">findInterfaces</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>serviceName</i> ) const</h3>
<p>Returns a list of the interfaces provided by the service named <i>serviceName</i>. If <i>serviceName</i> is empty, this function returns a list of all available interfaces in this manager's scope.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@findInterfaces -->
<!-- $$$findServices[overload1]$$$findServicesconstQString& -->
<h3 class="fn"><a name="findServices"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstringlist.html">QStringList</a></span> QServiceManager::<span class="name">findServices</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>interfaceName</i> = QString() ) const</h3>
<p>Returns a list of the services that provide the interface specified by <i>interfaceName</i>. If <i>interfaceName</i> is empty, this function returns a list of all available services in this manager's scope.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@findServices -->
<!-- $$$interfaceDefault[overload1]$$$interfaceDefaultconstQString& -->
<h3 class="fn"><a name="interfaceDefault"></a><span class="type"><a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a></span> QServiceManager::<span class="name">interfaceDefault</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>interfaceName</i> ) const</h3>
<p>Returns the default interface implementation for the given <i>interfaceName</i>.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#setInterfaceDefault">setInterfaceDefault</a>().</p>
<!-- @@@interfaceDefault -->
<!-- $$$loadInterface[overload1]$$$loadInterfaceconstQString&QServiceContext*QAbstractSecuritySession* -->
<h3 class="fn"><a name="loadInterface"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a></span> * QServiceManager::<span class="name">loadInterface</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>interfaceName</i>, <span class="type"><a href="qservicecontext.html">QServiceContext</a></span> * <i>context</i> = 0, <span class="type"><a href="qabstractsecuritysession.html">QAbstractSecuritySession</a></span> * <i>session</i> = 0 )</h3>
<p>Loads and returns the interface specified by <i>interfaceName</i>, as provided by the default service for this interface, using the given <i>context</i> and <i>session</i>. <i>context</i> and <i>session</i> object are owned by the caller of this function.</p>
<p>The caller takes ownership of the returned pointer.</p>
<p>This function returns a null pointer if the requested service cannot be found.</p>
<p>The security session object is not mandatory. If the session pointer is null, the service manager will not perform any checks. Therefore it is assumed that the service manager client is trusted as it controls whether service capabilities are enforced during service loading.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#setInterfaceDefault">setInterfaceDefault</a>() and <a href="qservicemanager.html#interfaceDefault">interfaceDefault</a>().</p>
<!-- @@@loadInterface -->
<!-- $$$loadInterface$$$loadInterfaceconstQServiceInterfaceDescriptor&QServiceContext*QAbstractSecuritySession* -->
<h3 class="fn"><a name="loadInterface-2"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a></span> * QServiceManager::<span class="name">loadInterface</span> ( const <span class="type"><a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a></span> &amp; <i>descriptor</i>, <span class="type"><a href="qservicecontext.html">QServiceContext</a></span> * <i>context</i> = 0, <span class="type"><a href="qabstractsecuritysession.html">QAbstractSecuritySession</a></span> * <i>session</i> = 0 )</h3>
<p>Loads and returns the interface specified by <i>descriptor</i> using the given <i>context</i> and <i>session</i>. <i>context</i> and <i>session</i> object are owned by the caller of this function.</p>
<p>The caller takes ownership of the returned pointer.</p>
<p>This function returns a null pointer if the requested service cannot be found.</p>
<p>The security session object is not mandatory. If the session pointer is null, the service manager will not perform any checks. Therefore it is assumed that the service manager client is trusted as it controls whether service capabilities are enforced during service loading.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@loadInterface -->
<!-- $$$loadLocalTypedInterface[overload1]$$$loadLocalTypedInterfaceconstQString&QServiceContext*QAbstractSecuritySession* -->
<h3 class="fn"><a name="loadLocalTypedInterface"></a><span class="type">T</span> * QServiceManager::<span class="name">loadLocalTypedInterface</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>interfaceName</i>, <span class="type"><a href="qservicecontext.html">QServiceContext</a></span> * <i>context</i> = 0, <span class="type"><a href="qabstractsecuritysession.html">QAbstractSecuritySession</a></span> * <i>session</i> = 0 )</h3>
<p>Loads the service object implementing <i>interfaceName</i>, as provided by the default service for this interface, using the given <i>context</i> and <i>session</i>. <i>context</i> and <i>session</i> object are owned by the caller of this function. The template class must be derived from <a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a>.</p>
<p>If <i>interfaceName</i> is not a known interface the returned pointer will be null.</p>
<p>Note that using this function implies that service and client share the implementation of T which means that service and client become tightly coupled. This may cause issue during later updates as certain changes may require code changes to the service and client.</p>
<p>The caller takes ownership of the returned pointer.</p>
<p>The security session object is not mandatory. If the session pointer is null, the service manager will not perform any checks. Therefore it is assumed that the service manager client is trusted as it controls whether service capabilities are enforced during service loading.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#setInterfaceDefault">setInterfaceDefault</a>() and <a href="qservicemanager.html#interfaceDefault">interfaceDefault</a>().</p>
<!-- @@@loadLocalTypedInterface -->
<!-- $$$loadLocalTypedInterface$$$loadLocalTypedInterfaceconstQServiceInterfaceDescriptor&QServiceContext*QAbstractSecuritySession* -->
<h3 class="fn"><a name="loadLocalTypedInterface-2"></a><span class="type">T</span> * QServiceManager::<span class="name">loadLocalTypedInterface</span> ( const <span class="type"><a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a></span> &amp; <i>serviceDescriptor</i>, <span class="type"><a href="qservicecontext.html">QServiceContext</a></span> * <i>context</i> = 0, <span class="type"><a href="qabstractsecuritysession.html">QAbstractSecuritySession</a></span> * <i>session</i> = 0 )</h3>
<p>Loads the service object identified by <i>serviceDescriptor</i> using the given <i>context</i> and <i>session</i>. <i>context</i> and <i>session</i> object are owned by the caller of this function. The template class must be derived from <a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a>.</p>
<p>If the <i>serviceDescriptor</i> is not valid the returned pointer will be null.</p>
<p>Note that using this function implies that service and client share the implementation of T which means that service and client become tightly coupled. This may cause issue during later updates as certain changes may require code changes to the service and client.</p>
<p>The caller takes ownership of the returned pointer.</p>
<p>The security session object is not mandatory. If the session pointer is null, the service manager will not perform any checks. Therefore it is assumed that the service manager client is trusted as it controls whether service capabilities are enforced during service loading.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@loadLocalTypedInterface -->
<!-- $$$removeService[overload1]$$$removeServiceconstQString& -->
<h3 class="fn"><a name="removeService"></a><span class="type">bool</span> QServiceManager::<span class="name">removeService</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>serviceName</i> )</h3>
<p>Unregisters the service specified by <i>serviceName</i>.</p>
<p>Returns true if the unregistration succeeded, and false otherwise.</p>
<p>If a default service implementation is removed and there are other implementations for the same interface, the service manager chooses the implementation with the highest version number as the new default. If there is more than one serivce with the same version number, the service manager makes a random choice with regards to the new default implementation. If this is not the desired behaviour the default selection should be updated via <a href="qservicemanager.html#setInterfaceDefault">setInterfaceDefault</a>().</p>
<p>Services are always removed based on the <a href="qservicemanager.html#scope">scope</a>() of the current service manager instance.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#addService">addService</a>().</p>
<!-- @@@removeService -->
<!-- $$$scope[overload1]$$$scope -->
<h3 class="fn"><a name="scope"></a><span class="type"><a href="qservice.html#Scope-enum">QService::Scope</a></span> QServiceManager::<span class="name">scope</span> () const</h3>
<p>Returns the scope used for registering and searching of services.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@scope -->
<!-- $$$serviceAdded[overload1]$$$serviceAddedconstQString&QService::Scope -->
<h3 class="fn"><a name="serviceAdded"></a><span class="type">void</span> QServiceManager::<span class="name">serviceAdded</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>serviceName</i>, <span class="type"><a href="qservice.html#Scope-enum">QService::Scope</a></span> <i>scope</i> )<tt> [signal]</tt></h3>
<p>This signal is emited whenever a new service with the given <i>serviceName</i> has been registered with the service manager. <i>scope</i> indicates where the service was added.</p>
<p>If the manager scope is <a href="qservice.html#Scope-enum">QService::SystemScope</a>, it will not receive notifications about services added in the user scope.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#addService">addService</a>().</p>
<!-- @@@serviceAdded -->
<!-- $$$serviceRemoved[overload1]$$$serviceRemovedconstQString&QService::Scope -->
<h3 class="fn"><a name="serviceRemoved"></a><span class="type">void</span> QServiceManager::<span class="name">serviceRemoved</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>serviceName</i>, <span class="type"><a href="qservice.html#Scope-enum">QService::Scope</a></span> <i>scope</i> )<tt> [signal]</tt></h3>
<p>This signal is emited whenever a service with the given <i>serviceName</i> has been deregistered with the service manager. <i>scope</i> indicates where the service was added.</p>
<p>If the manager scope is <a href="qservice.html#Scope-enum">QService::SystemScope</a>, it will not receive notifications about services removed in the user scope.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#removeService">removeService</a>().</p>
<!-- @@@serviceRemoved -->
<!-- $$$setInterfaceDefault[overload1]$$$setInterfaceDefaultconstQString&constQString& -->
<h3 class="fn"><a name="setInterfaceDefault"></a><span class="type">bool</span> QServiceManager::<span class="name">setInterfaceDefault</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>service</i>, const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>interfaceName</i> )</h3>
<p>Sets the default interface implementation for <i>interfaceName</i> to the matching interface implementation provided by <i>service</i>.</p>
<p>If <i>service</i> provides more than one interface implementation for <i>interfaceName</i>, the newest version of the interface is set as the default.</p>
<p>Returns true if the operation succeeded, and false otherwise.</p>
<p><b>Note:</b> When in system scope, the <i>service</i> must be a system-wide service rather than a user-specific service; otherwise, this will fail.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<p><b>See also </b><a href="qservicemanager.html#interfaceDefault">interfaceDefault</a>().</p>
<!-- @@@setInterfaceDefault -->
<!-- $$$setInterfaceDefault$$$setInterfaceDefaultconstQServiceInterfaceDescriptor& -->
<h3 class="fn"><a name="setInterfaceDefault-2"></a><span class="type">bool</span> QServiceManager::<span class="name">setInterfaceDefault</span> ( const <span class="type"><a href="qserviceinterfacedescriptor.html">QServiceInterfaceDescriptor</a></span> &amp; <i>descriptor</i> )</h3>
<p>This is an overloaded function.</p>
<p>Sets the interface implementation specified by <i>descriptor</i> to be the default implementation for the particular interface specified in the descriptor.</p>
<p>Returns true if the operation succeeded, and false otherwise.</p>
<p><b>Note:</b> When in system scope, the <i>descriptor</i> must refer to a system-wide service rather than a user-specific service; otherwise, this will fail.</p>
<p>This function was introduced in Qt Mobility 1.0.</p>
<!-- @@@setInterfaceDefault -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 2008-2011 Nokia Corporation and/or its
     subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
     in Finland and/or other countries worldwide.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    Licensees holding valid Qt Commercial licenses may use this document in accordance with the    Qt Commercial License Agreement provided with the Software or, alternatively, in accordance    with the terms contained in a written agreement between you and Nokia.</p>
  <p>
    Alternatively, this document may be used under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU
    Free Documentation License version 1.3</a>
    as published by the Free Software Foundation.</p>
</div>
</body>
</html>