Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QAbstractIpcInterfaceGroupManager Class Reference
[QtBaseModule]

The QAbstractIpcInterfaceGroupManager class provides a method to discover the active IPC interfaces and server interface groups. More...

    #include <QAbstractIpcInterfaceGroupManager>

Inherits QObject.

Inherited by QCommServiceManager, QHardwareManager, and QUsbManager.

Public Functions

  • 29 public functions inherited from QObject

Signals

Additional Inherited Members

  • 1 property inherited from QObject
  • 1 public slot inherited from QObject
  • 1 public type inherited from QObject
  • 4 static public members inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

The QAbstractIpcInterfaceGroupManager class provides a method to discover the active IPC interfaces and server interface groups.

This class is used to query which IPC groups and interfaces are currently present in the system, using groups() and interfaces() respectively. It can also be used to receive notification of when IPC groups are added to or removed from the system, using groupAdded() and groupRemoved() respectively.

Each server interface group has a unique name, such as modem, voip, etc. Within each group is a list of interfaces for functionality areas, which have names such as QNetworkRegistration, QSMSSender, etc.

Interface names correspond to class names elsewhere in the Qt Extended API's. To use an interface, the caller creates an instance of the corresponding class. The caller can specify an explicit group name, if more than one group implements the same interface, or leave the group name empty to use the default group for that interface.

See the documentation for QAbstractIpcInterface for more information on writing and using interface classes.

See also QAbstractIpcInterface and QAbstractIpcInterfaceGroup.


Member Function Documentation

QAbstractIpcInterfaceGroupManager::QAbstractIpcInterfaceGroupManager ( const QString & valueSpaceLocation, QObject * parent = 0 )

Construct a new server interface group manager and attach it to parent.

The valueSpaceLocation parameter specifies the location in the value space to place all information about interfaces. Subclasses such as QCommServiceManager will set this to a particular value meeting their requirements.

See also QCommServiceManager.

QAbstractIpcInterfaceGroupManager::QAbstractIpcInterfaceGroupManager ( const QString & valueSpaceLocation, const QString & interface, QObject * parent = 0 )

Construct a new server interface group manager and attach it to parent.

The valueSpaceLocation parameter specifies the location in the value space to place all information about interfaces. Subclasses such as QCommServiceManager will set this to a particular value meeting their requirements.

In some use cases it might be only necessary to monitor the groups which support a particular interface. This constructor's additional interface parameter acts as such a filter. The constructed object entirely ignores server interface groups which support other interfaces but not the given one.

    QAbstractIpcInterfaceGroupManager* man = new QAbstractIpcInterfaceGroupManager( vsp, "QNetworkRegistration" );

    QStringList groupList = man->groups(); //all groups which support QNetworkRegistration

    QStringList ifaces = man->interfaces( "voip" );
    //ifaces is empty if VoIP doesn't support QNetworkRegistration
    //otherwise has exactly one entry being QNetworkRegistration

If interface is empty, this manager object will behave as if no filtering is required.

See also QCommServiceManager and QHardwareManager.

QAbstractIpcInterfaceGroupManager::~QAbstractIpcInterfaceGroupManager ()

Destroy this server interface group manager.

void QAbstractIpcInterfaceGroupManager::groupAdded ( const QString & group )   [signal]

Signal that is emitted when group is added. A group is considered to have been added when its first interface is constructed.

void QAbstractIpcInterfaceGroupManager::groupRemoved ( const QString & group )   [signal]

Signal that is emitted when group is removed. A group is considered to have been removed when its last interface is deleted.

QStringList QAbstractIpcInterfaceGroupManager::groups () const

Returns the list of all groups that are currently active within the system or within the particular interface that this object could be limited to.

void QAbstractIpcInterfaceGroupManager::groupsChanged ()   [signal]

Signal that is emitted when the list of groups changes, if the interfaces on a group has changed, or if the priority assignments have changed.

See also groupAdded() and groupRemoved().

QStringList QAbstractIpcInterfaceGroupManager::interfaces ( const QString & group ) const

Returns the list of interfaces that are supported by group.

If this object is limited to just one interface this function only ever returns a list with either zero or at most one entry.

int QAbstractIpcInterfaceGroupManager::priority ( const QString & group ) const

Returns the priority of the interface T within group. The priority determines which group will be selected by default if an explicit group name is not supplied when constructing an interface object.

Returns the default priority of zero if the interface or group name does not exist.

See the documentation for QAbstractIpcInterface for more information on how priorities affect the choice of a default interface implementation.

See also QAbstractIpcInterface.

QStringList QAbstractIpcInterfaceGroupManager::supports () const

Returns the list of groups that support the interface T. The following example demonstrates how to get the list of groups that supports the QNetworkRegistration interface:

    QAbstractIpcInterfaceGroupManager manager("/Communications");
    QStringList list = manager.supports<QNetworkRegistration>();

bool QAbstractIpcInterfaceGroupManager::supports ( const QString & group ) const

This is an overloaded member function, provided for convenience.

Determines if group supports the interface T. The following example demonstrates how to determine if the modem group supports the QNetworkRegistration interface:

    QAbstractIpcInterfaceGroupManager manager("/Communications");
    if ( manager.supports<QNetworkRegistration>( "modem" ) )
        ...

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 85
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  4. BlackBerry 10 : premières images du prochain OS de RIM qui devrait intégrer des widgets et des tuiles inspirées de Windows Phone 0
  5. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 19
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Adieu qmake, bienvenue qbs : Qt Building Suite, un outil déclaratif et extensible pour la compilation de projets Qt 17
Page suivante

Le Qt Quarterly au hasard

Logo

Requête de données génériques avec QtXmlPatterns et XQuery

Qt Quarterly est la revue trimestrielle proposée par Nokia et à destination des développeurs Qt. Ces articles d'une grande qualité technique sont rédigés par des experts Qt. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt qtextended4.4
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web